-
Notifications
You must be signed in to change notification settings - Fork 60
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
Migrate IDEA dual-readout calorimeter geometry #292
Conversation
Could you edit your post and only put the changes in the release notes? The rest you can put outside. This is how the release notes end up looking like: |
Hi Sungwon, thanks a lot for initiating this! Here are a few general comments:
|
Hi @swkim95, would you mind pulling this commit? |
Update DRC geometry migration
Hi, I updated the PR with latest k4geo & dual-readout changes applied. (7-Dec-2023)
I haven't added detector builder README.md yet. |
|
||
// verify assumptions | ||
if ( std::abs(ymax+ymin) > TGeoShape::Tolerance() ) | ||
throw std::runtime_error("Envelop of full length fibers (fullBox) is not located at the centre of the tower!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this commit still hasn't been pulled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unfortunately, as such, the detector can not really be integrated in the full IDEA. Building its ROOT geometry alone already takes 14 minutes and 13 GB of RAM. This should be improved, we will provide support (also for the migration to ddsim). Other comments can meanwhile be addressed.
return drDet; | ||
} | ||
} // namespace detector | ||
DECLARE_DETELEMENT(ddDRcalo, ddDRcalo::create_detector) // factory method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the name so that it does not clash with https://github.com/HEP-FCC/dual-readout/blob/master/Detector/DRcalo/src/DRgeo.cpp#L74 ? In general we try to have the name of the file matching the name of the factory and we version it. Since we have several dual readout calorimeters, may I suggest to rename the file and the factory to something like FiberDualReadoutCalo_o1_v01
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Brieuc, thanks for the comments!
You mean like DRgeo.cpp
-> FiberDualReadoutCalo_o1_v01.cpp
and
DECLARE_DETELEMENT(ddDRcalo, ddDRcalo::create_detector)
->
DECLARE_DETELEMENT(FiberDualReadoutCalo_o1_v01, ddDRcalo::create_detector)
, right?
I'll update like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes :-)
CMakeLists.txt
Outdated
@@ -112,7 +116,7 @@ INSTALL(FILES ${hfiles} | |||
|
|||
#--- install compact files------------------------------ | |||
if(INSTALL_COMPACT_FILES) | |||
INSTALL(DIRECTORY CaloTB CLIC FCalTB FCCee ILD fieldmaps SiD DESTINATION share/k4geo ) | |||
INSTALL(DIRECTORY CaloTB CLIC FCalTB FCCee ILD fieldmaps SiD IDEA DESTINATION share/k4geo ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be removed and the detector should be integrated to FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml
. Can you also make sure that the dimensions are compatible with the one here: https://fcc-ee-detector-full-sim.docs.cern.ch/IDEA/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is compatible but not 100% sure...
I'll ask Sanghyun about it.
About various DRcalo xml files, I'm also not sure which one to use.
I'll also discuss this with Sanghyun and fix which xml file to include.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be split:
- global "envelope parameters" should go to
FCCee/IDEA/compact/IDEA_o1_v02/DectDimensions_IDEA_o1_v01.xml
(please profit from this occasion to remove all the other ECAL/HCAL dimensions which will no longer be used in this file) - detector specific parameters should go to a dedicated file that I propose to name
FCCee/IDEA/compact/IDEA_o1_v02/FiberDualReadoutCalo_o1_v01.xml
- missing materials/elements should go to
FCCee/IDEA/compact/IDEA_o1_v02/elements_o1_v01.xml
andFCCee/IDEA/compact/IDEA_o1_v02/materials_o1_v01.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try to keep one file for the detector description (see the other comment on FCCee/IDEA/compact/IDEA_o1_v02/DRcalo_Wratten9_S13615-1025.xml
)
Update k4geo to latest commit & split detector xml files
…) in CMakeList compact file installation part
…RC detector constructors, plugins for running simluation with IDEA DRC using ddsim
PR update with latest k4geo master branch & adding IDEA DRC simulation
…ies in materials_o1_v01.xml and move them to DRC xml file), remove duplicated DRC geo constructor (DRgeo.cpp), update DRconstructor.cpp to remove commented out codes etc..., remove scripts for debug in plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swkim95 there are some places still need to be cleaned up
<constant name="FiberDRCalo_barrel_inner_radius" value="2.5*m"/> | ||
<constant name="FiberDRCalo_barrel_nphi" value="144"/> | ||
<constant name="FiberDRCalo_endcap_height" value="2.*m"/> | ||
<constant name="FiberDRCalo_endcap_inner_radius" value="2.5*m"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind changing FiberDRCalo_endcap_inner_radius
to FiberDRCalo_endcap_z_start
? (as discussed in the mattermost)
|
||
private: | ||
void implementTowers(xml_comp_t& x_theta, dd4hep::DDSegmentation::DRparamBase_k4geo* param); | ||
// void placeAssembly(xml_comp_t& x_theta, xml_comp_t& x_wafer, dd4hep::DDSegmentation::DRparamBase_k4geo* param, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better to clean up comments (in other places as well)
namespace ddDRcalo { | ||
static dd4hep::Ref_t create_detector( dd4hep::Detector &description, xml_h xmlElement, dd4hep::SensitiveDetector sensDet ) { | ||
// For Debug | ||
// std::cout << __PRETTY_FUNCTION__ << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
@@ -52,6 +52,9 @@ | |||
|
|||
<!-- Import Endcap plate absorber --> | |||
<include ref="EndPlateAbsorber_o1_v01.xml"/> | |||
|
|||
<!-- Import fiber-based dual-readout calorimeter --> | |||
<include ref="FiberDualReadoutCalo_o1_v01.xml"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only need to push to the v03, not v02 (as we discussed in the working meeting)
plugins/DRCaloFastSimModel.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix indents
plugins/FiberDRCaloSDAction.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above (indents)
plugins/FiberDRCaloSDAction.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above (indents)
Hi, I just updated the codes based on Sanghyun's comments |
@@ -52,7 +52,7 @@ | |||
|
|||
<!-- Import Endcap plate absorber --> | |||
<include ref="EndPlateAbsorber_o1_v01.xml"/> | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a major comment but it's a good practice to revert your changes using git checkout -- <filename>
or equivalent instead of removing texts by hands... (so that you don't screw up commit histories)
BEGINRELEASENOTES
detector/IDEA
directoryIDEA
directorydetector/IDEA
ENDRELEASENOTES
Purpose
Tests