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

List All Readout Channels #580

Closed
vvolkl opened this issue Oct 16, 2019 · 3 comments
Closed

List All Readout Channels #580

vvolkl opened this issue Oct 16, 2019 · 3 comments
Labels

Comments

@vvolkl
Copy link
Contributor

vvolkl commented Oct 16, 2019

Looking for some advice: Is there a good, generic way to list all the possible readout channels of a detector? That is all sensitive volumes including segmentations. Example: I have defined a detector with readout:

<readout name="ECalBarrelPhiEta">
  <segmentation type="FCCSWGridPhiEta" grid_size_eta="0.01" phi_bins="704" offset_eta="-1.68024" offset_phi="-pi+(pi/704.)"/>
  <id>system:4,cryo:1,type:3,subtype:3,layer:8,eta:9,phi:10</id>
</readout>

and want (to add some noise for example) to create an exhaustive list of all cellIDs that Geant4 might deposit energy in.

I think it should be straightforward enough to iterate over sensitive DetElements, but to find all possible segmentation cells is a bit trickier; is there already some generic code to do that?

@vvolkl vvolkl changed the title Question: List All Readout Channels List All Readout Channels Oct 16, 2019
@MarkusFrankATcernch
Copy link
Contributor

MarkusFrankATcernch commented Oct 16, 2019

I am not aware of generic code to perform this. However, I can see the usefulness - in fact I would be interested in such code as soon as I start with the digitization package....

It is also not clear how do do this, unless your sensitive volume is read-out throughout; ie without taking into account possible dead zones around the edges, cut-outs etc. I think to really describe such segmentations taking into account such effects is more complex than our simple bit-field.

@MarkusFrankATcernch
Copy link
Contributor

MarkusFrankATcernch commented Oct 25, 2019

Hi Valentin,
I just remembered this. This command does not give you all readout channels, but at least all sensitive volumes together with their corresponding id decoding (x/y or eta/phi decoding not present):

$> geoPluginRun -input ../checkout/DDDetectors/compact/SiD.xml -volmgr \
-plugin DD4hep_VolumeDump -detector EcalBarrel -sensitive -volume_ids

(add -help for details about arguments)
Output is then something like this:

VolumeDump       INFO  001    EcalBarrel_42    (TGeoPgon)           VolID: system: 6 barrel: 0
VolumeDump       INFO  002      stave_0          (TGeoTrd2)         VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 
VolumeDump       INFO  003        layer1_0         (TGeoBBox)       VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 1 
VolumeDump       INFO  004          slice1_0         (TGeoBBox)          S  VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 1 slice: 1  (0x00208806) 
VolumeDump       INFO  004          slice2_1         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 1 slice: 2 
VolumeDump       INFO  004          slice3_2         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 1 slice: 3 
VolumeDump       INFO  004          slice4_3         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 1 slice: 4 
VolumeDump       INFO  003        layer2_1         (TGeoBBox)       VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 
VolumeDump       INFO  004          slice1_0         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 slice: 1 
VolumeDump       INFO  004          slice2_1         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 slice: 2 
VolumeDump       INFO  004          slice3_2         (TGeoBBox)          S  VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 slice: 3  (0x00610806) 
VolumeDump       INFO  004          slice4_3         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 slice: 4 
VolumeDump       INFO  004          slice5_4         (TGeoBBox)             VolID: system: 6 barrel: 0 system: 6 barrel: 0 module: 1 layer: 2 slice: 5 

Does this partially help you?

@vvolkl
Copy link
Contributor Author

vvolkl commented Nov 1, 2023

Sorry for the very late reply, this is actually very nice! I think we can close.

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

3 participants