Question about LogicalVolume

Hello,

I would like to clarify something regarding Logical Volumes in Geant4. For example I have 868 similar strips in my detector which I need to set all of them as sensitive.

Should I create 868 logical volumes for strips or just one logical volume? Does Geant4 know that there are 868 sensitive volumes if I create just one logical volume for them? (cause they are similar). The preliminary code looks like this:

// 1. create solid for strips
G4Box* stripSV = …
G4LogicalVolume* stripLV = …

//2. placing all 868 strips inside the mother volume in the for loop
for(int i=0; i<868; i++){
//…
}

//3. setting sensitive volume
SetSensitiveDetector(stripLV, /second argument/);

Best,
Aizat

1 Like

Hi Aizat,

Do the size or shape of the strips in your detector change? If they do not, then you should only need one logical volume with many physical placements.

If it is the case that you want to place a volume with the same size and shape many repeated times I would encourage you to look into G4Replica, it may make this process easier, and also each of your detectors can then be indexed by copyNumber which can make your data output simpler.

Best,

Joseph