How to set multiple logical volumes as single sensitive detector

The geometry of the detector I have constructed consists of two separate logical volumes, but I want to get an output from these as if they were a single detector. Is there a way to set a sensitive detector using two logical volumes?


It is possible. Just add your second detector in ConstructSD(). For example:

void YourGeometry::ConstructSD(){

G4SDManager* SDman = G4SDManager::GetSDMpointer();
SensitiveDetector *detector = new SensitiveDetector(“detector”);
SetSensitiveDetector(“name_logical_volume_1”, detector);
SetSensitiveDetector(“name_logical_volume_2”, detector);


Brilliant. Thanks very much I’ll try that

did it work that way for you? @stephen-mul