Skip to content

High-Granular Calorimeters

Michal Mazurek requested to merge mimazure-high-granul-calo into master

needs LHCb!3691 (merged)

@gcorti @kreps @adavis @landerli @mrama @rribatti @fedor @arogache

I tried to come up with the easiest and the least invasive implementation of the high granularity calorimeters. The general idea of this MR is to give an overview of the files that have to be modified in order to achieve this. All the comments related to the strategy are very welcome. The code will be improved and tested once we converge with the ideas. I tried to put extra info in the comments as well.

The ideas presented here are as follows:

  • extend MCCaloHit to MCSmallCaloHit and dynamic_cast whenever necessary (implemented here: LHCb!3432 (merged)),
  • introduce SmallCaloCell just in Gauss that corresponds to LHCb::Calo::CaloCellID and helps in looking up the positions of each hit,
  • introduce a new hash map that will be used to look up the CaloHits by using a unique index of each SmallCaloCells

Update 06/04/22:

The MR is now complete and consists of the following changes:

  • extend MCCaloHit to MCSmallCaloHit and static_cast whenever necessary (implemented here: LHCb!3432 (merged))
  • introduce SmallCaloCell that corresponds to LHCb::Calo::CaloCellID; the linking to CaloHits will be stored in GaudiUtils::HashMap<SmallCaloCell, CaloHit*>,
  • introduce a high-level configurable HighGranularCalo that handles all the necessary configuration of C++ classes that take part in the high-granularity simulation i.e. CaloXYZSensDet, GetCaloHitsAlg and CaloCollectors for ntuple writing,
  • integration test that verifies whether we get the same number of hits when running standard simulation and one with high-grranularity on with ncols=1 and nrows=1,
  • added support for all the calorimeters i.e. Prs, Spd, Ecal & Hcal
  • added some documentation in between the lines, so it will be picked up in the upcoming readthedocs-like documentation
  • examples, datasets, options file and visualzation helper tools can be accessed from here: https://gitlab.cern.ch/mimazure/gausstrainingsample/-/tree/high-granularity

In order to activate the high granularity feature, for example in the inner region of Ecal, the only necessary configuration is shown below. The rest is handled in the background.

from GaussCalo.HighGranularity import HighGranularCalo
hcg = HighGranularCalo()
hcg.Ecal["Inner"]["NRows"] = 4 # will split the standard cell in 4 rows (y-axis)
hcg.Ecal["Inner"]["NCols"] = 4 # will split the standard cell in 4 columns (x-azis)

Examples

Here are a few examples of how one can use the High Granularity feature. In all these examples you will find the same setup:

  • Run2 geometry: Prs, Spd, Ecal & Hcal
  • 20 MCCollectors distributed evenly between the IP and Prs
  • QuadrupoleCaloCollector that will gather information about the hits in all the calorimeters and incident particles info

The granularity is fixed to be the same in every calorimeter ( ~ 10cm x 10cm). The configuration for this is:

# implement high granularity in all calos
from GaussCalo.HighGranularity import HighGranularCalo
hcg = HighGranularCalo()
hcg.Ecal["Inner"]["NRows"] = 4
hcg.Ecal["Inner"]["NCols"] = 4
hcg.Ecal["Middle"]["NRows"] = 6
hcg.Ecal["Middle"]["NCols"] = 6
hcg.Ecal["Outer"]["NRows"] = 12
hcg.Ecal["Outer"]["NCols"] = 12

hcg.Spd["Inner"]["NRows"] = 4
hcg.Spd["Inner"]["NCols"] = 4
hcg.Spd["Middle"]["NRows"] = 6
hcg.Spd["Middle"]["NCols"] = 6
hcg.Spd["Outer"]["NRows"] = 12
hcg.Spd["Outer"]["NCols"] = 12

hcg.Prs["Inner"]["NRows"] = 4
hcg.Prs["Inner"]["NCols"] = 4
hcg.Prs["Middle"]["NRows"] = 6
hcg.Prs["Middle"]["NCols"] = 6
hcg.Prs["Outer"]["NRows"] = 12
hcg.Prs["Outer"]["NCols"] = 12

hcg.Hcal["Inner"]["NRows"] = 13
hcg.Hcal["Inner"]["NCols"] = 13
hcg.Hcal["Outer"]["NRows"] = 26
hcg.Hcal["Outer"]["NCols"] = 26

8 x 8 100 GeV electrons

Link to the notebook: https://gitlab.cern.ch/mimazure/gausstrainingsample/-/blob/high-granularity/highgranularity_description_electrons.ipynb

standard granularity

hg_el_off

high granularity

hg_el_on

64 x 52 2 GeV neutrons

Link to the notebook: https://gitlab.cern.ch/mimazure/gausstrainingsample/-/blob/high-granularity/highgranularity_description_neutrons.ipynb

standard granularity

hg_gamma_off

high granularity

hg_gamma_on

64 x 52 500 MeV gammas

Link to the notebook: https://gitlab.cern.ch/mimazure/gausstrainingsample/-/blob/high-granularity/highgranularity_description_gammas.ipynb

standard granularity

hg_neutron_off

high granularity

hg_neutron_on

Edited by Gloria Corti

Merge request reports