33 #include "TrackingAction.hh"
39 #include "DetectorConstruction.hh"
61 if(fTargetRegion == 0)
63 fTargetRegion = fDetector->GetTargetRegion();
68 int N = fTargetRegion->GetNumberOfRootVolumes();
69 std::vector<G4LogicalVolume*>::iterator it_logicalVolumeInRegion =
70 fTargetRegion->GetRootLogicalVolumeIterator();
72 bool inside_target =
false;
74 for(
int i = 0; i < N ; i++, it_logicalVolumeInRegion++)
76 EInside test_status = (*it_logicalVolumeInRegion)->GetSolid()->Inside(position) ;
89 if(inside_target ==
true)
91 fNParticleInTarget[particleDefinition]++;
95 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()