Skip to content
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

multiple actions within same subdetector #1372

Open
danieljeans opened this issue Dec 17, 2024 · 5 comments
Open

multiple actions within same subdetector #1372

danieljeans opened this issue Dec 17, 2024 · 5 comments
Labels

Comments

@danieljeans
Copy link
Contributor

danieljeans commented Dec 17, 2024

we're simulating a calorimeter with a mix of scintillator and cerenkov layers.
For the scint layers, we'd like to use the usual default calorimeter action, while for the cerenkov ones we'd like to use a new user-defined action.
what's the best way to implement this? should we define a single new action which can differentiate between C and S layers and apply the appropriate method, or is there some smarter way to do it, e.g. based on the "slice" index within a layer, which could avoid the need to duplicate the scintillator part?

a second question:
in ddsim, we can control which action to use using e.g. in the case of ILD, we have
SIM.action.mapActions['tpc'] = "TPCSDAction"
what exactly is the string 'tpc' matched with?
in ILD/compact/ILD_common_v02/tpc10_01.xml
we define

    <detector name="TPC" type="TPC10" vis="ILD_TPCVis2" id="ILDDetID_TPC" limits="Tracker_limits" readout="TPCCollection" insideTrackingVolume="true">

my guess is that's it a case-insensitive match to the ' name="TPC" ' ; if you could confirm or correct, that would be helpful.

many thanks,
Daniel.

@atolosadelgado
Copy link
Contributor

we're simulating a calorimeter with a mix of scintillator and cerenkov layers. For the scint layers, we'd like to use the usual default calorimeter action, while for the cerenkov ones we'd like to use a new user-defined action. what's the best way to implement this? should we define a single new action which can differentiate between C and S layers and apply the appropriate method, or is there some smarter way to do it, e.g. based on the "slice" index within a layer, which could avoid the need to duplicate the scintillator part?

a second question: in ddsim, we can control which action to use using e.g. in the case of ILD, we have SIM.action.mapActions['tpc'] = "TPCSDAction" what exactly is the string 'tpc' matched with? in ILD/compact/ILD_common_v02/tpc10_01.xml we define

    <detector name="TPC" type="TPC10" vis="ILD_TPCVis2" id="ILDDetID_TPC" limits="Tracker_limits" readout="TPCCollection" insideTrackingVolume="true">

my guess is that's it a case-insensitive match to the ' name="TPC" ' ; if you could confirm or correct, that would be helpful.

many thanks, Daniel.

Hi Daniel,

A straightforward approach that requires no additional code is to use an optical tracker sensitive detector action. This action records photon information (time, energy, cellID, etc) as they enter the sensitive volume and immediately kills the photons. While Geant4 handles optical photon generation, solving a photon transport equation can be much faster than Geant4 tracking. I guess that by encoding into the segmentation whether the layer is C or S, the corresponding signal can then be reconstructed.

Perhaps you have already considered this approach and found reasons not to use it. Regardless, I’d be interested in learning what you think is the best option for your needs! :)

I had the same question about the map of actions when I started with DD4hep :)
The key of the map is the name of the detector. To avoid further confusions I usually append "_T" (for detector type) to the name of the detector constructor., eg here

@andresailer
Copy link
Member

Question 2, as also stated by Alvaro:

For specific subdetectors specific sensitive detectors can be set based on patterns in the name of the subdetector.
>>> SIM = DD4hepSimulation()
>>> SIM.action.mapActions['tpc'] = "TPCSDAction"

Question 1:

I think this should be possible with multiple readouts, as there is an example here

# Setup the parallel readout for the detector EcalBarrel

And I wanted to implement this for ddsim, but I am not sure this will happen this year.

@atolosadelgado
Copy link
Contributor

It is also possible that one sensitive detector action creates 2 output collections with one readout, right?

@MarkusFrankATcernch
Copy link
Contributor

Yes. This should be possible. See here for an example:

https://github.com/AIDASoft/DD4hep/blob/master/examples/ClientTests/compact/MultiCollections.xml

@danieljeans
Copy link
Contributor Author

thanks to all for your useful inputs!

regarding the action for the cerenkov sensitive detector, we are currently using a simplified approach, taking the sum of step lengths of charged particles with v>c/n within a cell as an ansatz for the cerenkov signal, to be converted to a sipm signal in a later digitisation step.
I guess that this should be much faster than doing the proper optical treatment? (I have not tested this assumption, and am open to being corrected!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants