-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include dual-readout endcap tubes calorimeter in IDEA_o2 xml file #411
Conversation
Hi Lorenzo, great! Can you add a test similar to https://github.com/key4hep/k4geo/blob/main/test/CMakeLists.txt#L93 ? Since #406 is orthogonal, I think we can proceed with this PR regardless and add the crystals when ready. |
@BrieucF I added a test for IDEA_o2_v01, it takes about 211 s on lxplus9 machines largely dominated by the construction time of the DREndcapTubes subdetector. I agree this PR can proceed regardless of the crystal one. |
Hi @lopezzot thanks for this PR, looks great! I have only 2 questions:
Thank you for your time. |
Can you also explain the hot spot at z ~2800? I naively would not expect that with 50 GeV K_longs... |
Hello @atolosadelgado and @BrieucF, thank you for your time and very good questions.
EDIT: I added a commit below to use the steering file in the test. It takes about 350 s on lxplus9, I believe it is still acceptable. |
Hi @andresailer, @atolosadelgado, @BrieucF while I was trying to add a "system" id for the DREndcapTubes subdetector I think I spotted a problem with DD4hep Assembly volumes. In my code, I use an assembly volume to place inside it phi-slices volumes. I do this placement in a for loop over j and assign j as geant4 copynumber and dd4hep volID to the volumes placed inside the Assembly https://github.com/lopezzot/k4geo/blob/lp-idea_o2/detector/calorimeter/dual-readout-tubes/src/DREndcapTubes_o1_v01.cpp#L167. |
Yes, please open an issue for this in DD4hep. |
Thanks for the explanation. Some more questions. Do you also store the single hits into CaloHitContributions? Do you set the position to the "real" hit position (instead of the fiber front) for those? Will this be enough to perform studies on possible longitudinal information from timing? |
Good point. For the moment I do not save calohitcontributions. Our experience with test-beam data, and standalone simulations of the 4pi geometry, show that having only the fibre tip position is already good enough for the vast majority of studies we want to do. Also note that in IDEA_o2 crystals will be positioned before this calo, and the need for longitudinal segmentation in the fiber-dr calorimeter is then reduced. In any case, for longitudinal studies it would certainly be possible to add calohitcontributions and save the true hit position and timing of each hit inside fibers. I believe a dedicated PR with some full-sim studies could be open just after this one. |
Alright, for another PR then! Thanks |
Can you update the branch? Are we good to go? |
This PR AIDASoft/DD4hep#1362 fixes the problem I mentioned above. Therefore for what concerns my code, I believe we are good to go. Just two last questions:
|
|
Add geometry for the dual-readout tubes-based endcap calorimeter (taken from https://github.com/lopezzot/DREndcapTube/tree/v0.3). Add CMake code to compile geometries under detector/calorimeter/dual-readout-tubes/*, the barrel geometry will be added there.
Add xml description file for IDEA_o2_v01. It includes the dual-readout-tubes endcap calorimeter. As this option will include a crystal em-section, the preshower is removed from the xml file.
Add DRTubesSDAction as in lopezzot/DREndcapTube v0.3. Comment out RunAction and EventAction classes which are not needed for execution inside k4geo. File name changed from DREndcapTubesSDAction to DRTubesSDAction as this SDAction code will be used for DR barrel detector using capillary tubes.
Rename DREndcapTubesSDData to DRTubesSDData as DRTubesSDAction will be common for endcap and barrel tubes calorimeter. Also typedef to DRTubesSDAction.
RunAction and EventAction will not be used in key4geo simulation. They were used in standalone simulation to produced plain root files with G4AnalysisManager.
Same as SteeringFile_IDEA_o1_v03.py file but lines for DRC have been removed and those specific for the DRTubes subdetector have been added (e.g. regexSD).
Remove elements.xml file, it is identical to the one sourced from IDEA_o1_v03 directory. Also fix typos in IDEA//README.md IDEA_o2 description.
Add XML file for materials definition for IDEA_o2. At the moment is identical to IDEA_o1_v03 but new materials (e.g. crystal ones) will be included. Also remove Vacuum and Air material definition from DREndcapTubes_o1_v01 XML file.
Add XML file with dimensions for IDEA_o2. Same as DectDimensions_IDEA_o1_v01 but Fiber dual-readout calorimeter dimensions have been removed and dual-readout-tubes endcap calorimeter dimensions have been added. Also DREndcapTubes DetID is set in DectDimensions_IDEA_o2_v01. In future the preshower dimensions should be removed as well.
Move vis attributes definition for dual-readout-tubes endcap calorimeter inside DectDimensions_IDEA_o2_v01. Remove vis attributes from dr fiber calorimeter.
Fix bug in SteeringFile_IDEA_o2_v01.py, the DRTubesSDAction was assigned to every calorimeter, it should be assigned only to DREndcapTubes (and later on to the dual-readout-tubes barrel calorimeter).
The calo.filter="edep0" in SteeringFile_IDEA_o2_v01.py did not let the DRTubesSDAction be executed on opticalphotons which did not deposit energy in fibers. However the SDAction must be executed on those steps as they are counted to create the Cherenkov signal and they are killed to speedup the simulation. Replace to calo.filter=None. Also set the physicsList as FTFP_BERT. And the beam to 10 GeV e- shot directly into the endcap calorimeter to monitor the time per event.
According to indications from the IDEA members, the new dimensions for the calorimeter are: inner radius 2.8 m and length 1.8 m. Also changed the number of rotations around Z-axis to 72.
The new em-crystal section will be included inside the solenoid. The solenoid dimensions are changes to inner radius 2.5 m and outer radius 2.8 m.
IDEA_o2 will not include the preshower, therefore I remove it from IDEA_o2_v01.xml file. Also the preshower dimensions are removed from DectDimensions_IDEA_o2_v01.xml.
The DREndcapTubes phi air staves reached the beam pipe (y=0), this was clearly causing an overlap with the compensating solenoid. To fix this a new variable set the starting y of the phi air staves to 22 cm from the z-axis. This commit was checked for overlaps with a tolerance of 10 um (fibers not included in towers) and no overlaps were detected.
To monitor the event rate 1000 events are needed to get stable results. With this example we have around 0.8-1.0 s/evt for 10 GeV e- showeing in the endcap calorimeter.
Adding a CMake test for IDEA_o2_v01. ctest -R t_test_IDEA_o2_v01 takes about 211 s on lxplus9 machines. This test spotted one "Error" keyword due to anticlockwise ordering of G4GenericTrap constructor edges (they were internally reordered by root). To fix it I reordered them clockwise.
Fix indentation of SteeringFile_IDEA_o2_v01.py file causing an error against pre-commit hook.
Change cmake test for IDEA_o2 in order to use the IDEA_o2 example steering file. This test takes about 350 s on lxplus9 machines and correctly fills DREndcapTubes calo hit with 1 event.
Fix comment for unit translation from Geant4 units to EDM4hep units. Co-authored-by: Andre Sailer <[email protected]>
Add a comment to explain how photoelectrons are computed from Monte Carlo information: energy deposited in S fibers and number of C photons trapped in fibers.
Add comment about using our custom Birks' Law implementation in the SDAction. In particular to avoid potential double application of Birks' correction if the Geant4StepHandler is used on this subdetector.
Add "system" id to DREndcapTubes xml file and assign it to the highest volume in the geometry node. While recreating the volumeID in the DRTubesSDAction, "system" id is set as in DectDimensions_IDEA_o2_v01.xml file. In both xml files add a comment on ids to prevent unwanted modifications.
Add a comment in DRTubesSDAction to check that 64-bits volumeIDs created with g4-copynumbers are identical to the original DD4hep volumeIDs.
clang-format .cpp and .hh files for DREndcapTubes subdetector. I checked that this formatting does not change physics results.
Formatted and rebased. |
Just a small correction to the previous testing: the memory footprint is now around 2.5 Gb, that's because the tower granularity was increased from 36 to 72 rotations around the beam axis. Less unique tubes are now inserted inside a phi-slice and more unique tubes are replicated in phi-slices, therefore the memory footprint is reduced. |
Yes, I was leaving some time for people to comment about the clang formatting. Looks like there is no complain. Thanks Lorenzo! |
BEGINRELEASENOTES
DREndcapTubes
subdetector, changes the solenoid inner radius and removes the preshower. XML files for IDEA_o2 dimensions and materials are included as well. IDEA_o2 will be completed with the new crystal em calorimeter and the dual-readout capillary-tubes-based barrel calorimeter.example/SteeringFile_IDEA_o2_v01.py
is included to run a simulation with the IDEA_o2 concept.DRTubesSDAction
) is included and applied to theDREndcapTubes
subdetector viaregexSD
inexample/SteeringFile_IDEA_o2_v01.py
, this speeds up the event rate w.r.t. previous dual-readout calorimetry simulations and reduces the memory fooprint as explained hereENDRELEASENOTES
Hello,
This PR should be the starting point for the new IDEA concept as proposed by INFN. The inner part of IDEA up to the Silicon Wrapper is not touched. The solenoid inner radius is increased and between the SiWrapper and the solenoid a new crystal dual-readout em calorimeter will be included. When PR #406 is merged crystals will be included in the IDEA_o2 XML file. The preshower is removed. The hadronic endcap calorimeter is the new
DREndcapTubes
which uses the INFN Hidra-like technology. A new PR will be created with the barrel hadronic calorimeter. The muon system inner radius will have to be changed accordingly and for the moment it is commented-out in the IDEA_o2 XML file.Testing:
regexSD
the memory footprint of this partial IDEA_o2 configuration is 4.5 Gb (previously it was 15 Gb).To do in the next PRs:
DRTubesSDAction
to the barrel calorimeter and to adjust the muon system dimensions to avoid overlaps with the barrel calorimeter at theta=90 degree.Please let me know if you agree with this strategy for IDEA option2. Thanks!