-
Notifications
You must be signed in to change notification settings - Fork 100
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
Added implementation for hexagonal segmentation and also staggered square segmentations #1161
Conversation
Hi @sebouh137 , many thanks for your contribution! I am wondering if we could merge the SquareGrid with the existing CartesionGrid segmentation implementation? Also it should be possible to use the "MultiSegmentation" and different offsets to achieve the same result as with the staggered SquareGrid? Finally some example XML snippets would be good, a test that uses the hexgrid segmentation even better. Thanks again! |
Co-authored-by: Andre Sailer <[email protected]>
Co-authored-by: Andre Sailer <[email protected]>
Co-authored-by: Andre Sailer <[email protected]>
Co-authored-by: Andre Sailer <[email protected]>
removed commented code; fixed indentations
added license information
added license
Hi @sebouh137 Any thoughts on what I proposed before #1161 (comment) ? |
Hi @andresailer. Sorry for the delay. Here are my thoughts about your comments. I'll get around to implementing these changes either by the end of this week or early next week. "I am wondering if we could merge the SquareGrid with the existing CartesionGrid segmentation implementation?" I agree that would be much simpler. When I was writing this code and testing it for a paper, I could have modified the CartesianGrid segmentation code, but it seemed easier at the time to write a new class as a plugin rather than re-compile the whole dd4hep code (especially since dd4hep was pre-compiled inside a container). But yes it would be possible to replace the SquareGrid with an implementation of a staggering option in CartesianGrid, separately for x, y and z as appropriate. "Also it should be possible to use the "MultiSegmentation" and different offsets to achieve the same result as with the staggered SquareGrid?" "Finally some example XML snippets would be good, a test that uses the hexgrid segmentation event better." Thanks again! |
Dear @andresailer, |
Dear @andresailer , The following tests FAILED: |
Hi @sebouh137, The checksum is a validity check for detector models to ensure that a detector model still looks exactly the same when changes are made in DD4hep or how DD4hep is compiled, for example when enabling GEANT4_UNITS. This checksum includes the segmentations, so with the modifications this is somehow changed. Is is probably OK to just update the expected checksums, but maybe @MarkusFrankATcernch can comment on this? |
The segmentation description in the checksum enumerates all parameters,
That is likely the cause for the change in checksum since new parameters were added to CartesianGridXY. |
So you changed the segmentation and consequently the checksum changed. No ? This is in principle the expected behavior. In principle the dump shows the various contributions to the checksum:
Are your changes only affecting the readout, idddesc and segment part of the detector elements? |
Dear @MarkusFrankATcernch @wdconinc and @andresailer , |
@sebouh137 @andresailer @wdconinc
in
Both is not really satisfactory, but I see no other way. |
Dear @MarkusFrankATcernch , |
@sebouh137 |
I have now implemented this change. You can run the checks again now. |
added "CartesianGridXYStaggered::" to the cellDimensions method in CartesianGridXYStaggered.cpp.
Dear @andresailer, |
Actually I forgot the Thanks for adding the missing piece! |
Dear @andresailer , |
Thanks again for your contribution! |
### Briefly, what does this PR introduce? This backports support for AIDASoft/DD4hep#1161.
Implemented segmentation variations with hexagonal and square cells, with and without staggering. See arXiv:2308.06939
BEGINRELEASENOTES
ENDRELEASENOTES