30 #include "TrackingAction.hh"
36 #include "DetectorConstruction.hh"
58 if(fTargetRegion == 0)
60 fTargetRegion = fDetector->GetTargetRegion();
65 int N = fTargetRegion->GetNumberOfRootVolumes();
66 std::vector<G4LogicalVolume*>::iterator it_logicalVolumeInRegion =
67 fTargetRegion->GetRootLogicalVolumeIterator();
69 bool inside_target =
false;
71 for(
int i = 0; i < N ; i++, it_logicalVolumeInRegion++)
73 EInside test_status = (*it_logicalVolumeInRegion)->GetSolid()->Inside(position) ;
86 if(inside_target ==
true)
88 fNParticleInTarget[particleDefinition]++;
92 fNParticleInWorld[particleDefinition]++;
CLHEP::Hep3Vector G4ThreeVector
const G4ThreeVector & GetPosition() const
static G4Electron * Definition()
void PreUserTrackingAction(const G4Track *)
const G4ParticleDefinition * GetParticleDefinition() const
Detector construction class to demonstrate various ways of placement.
static G4Gamma * Definition()