Identifying each sensitive detector copy

To identify each detector unit individually you have to give a different detector unit ID to each copy of your sensitive detectors (each G4VTouchable in Geant4 terminology). GAMOS does this automatically for you. If you use the GmSDSimple class, it will give each SD copy a detector unit ID that will be the

copy number of physical volume + 100 * copy number of parent physical volume + 100*100* copy number of grandparent physical volume

You can change the number of ancestor volumes to build the detector unit ID with the parameter

/gamos/setParam SD:DetUnitID:NAncestors:SDTYPE VALUE

that takes a default value of 3. These ancestors include the detector itself, i.e. if set to 1 it is only the detector, without looking at the geometry hierarchy.

The ID is made multiplying the copy number of each ancestor by a fixed value NShift to the power of the ancestor level minus 1:

ID = copyNo_1 + copyNo_2 * NShift + copyNo_3 * pow(NShift,2)+

You can change the value of the NShift that multiplies each ancestor copy number using the parameter

/gamos/setParam SD:DetUnitID:NShift:SDTYPE VALUE

that takes a default value of 100.