PVreplicate name

Hi all,

I generate a 2D array by G4PVPrelica.
I use a G4PVPrelica to generate an array in x-direction.
The logicalvolume is “pixelColsLV” and the name is “PixelCols” .

Then I use G4PVPrelica (logicalcolume=pixelColsLV) to generate an array in z-direction.
The logicalvolume is “PixelarrayLV” and the name is “Pixelarray”.

Then I obtain a 2D array.
I set the “Pixelarray “as the SensitiveDetector. Then I only get the z-direction data.
E.g.:
G4ThreeVector* posDetector =physVol->GetTranslation();
postDetector.x() = 0
postDetector.y() = 0
postDetector.z() = 0.5

How could I obtain the 2D data?

Hello Allen,

After you have created the nested replicas, you can call to the copy number in SensitiveDetector. Here is an example with 3D replica voxelization:

G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle();

G4int VolNumZ = theTouchable->GetCopyNumber(0);
G4int VolNumX = theTouchable->GetCopyNumber(1);
G4int VolNumY = theTouchable->GetCopyNumber(2);

where the different copy number levels correspond to the level of nesting when you defined the replicas in DetectorConstruction.

Hopefully this answers your question.

Thanks,
James