255 G4int isBornInTheSample=0;
259 if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()==
"Sample"){
260 G4ThreeVector creationPos = aStep->GetTrack()->GetVertexPosition();
270 (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary)
274 particleType = aStep->GetTrack()->GetDynamicParticle()->GetDefinition();
275 momentum = aStep->GetTrack()->GetDynamicParticle()->GetMomentum();
276 particleEnergy = aStep->GetPreStepPoint()->GetKineticEnergy();
277 if (creationPosVolume->
GetName() ==
"Sample" ) {
278 isBornInTheSample = 1;
289 if(aStep->GetTrack()->GetCreatorProcess())
291 parentProcess = aStep->GetTrack()->GetCreatorProcess()->GetProcessName();
294 if (parentProcess ==
"") parent = 0;
295 if (parentProcess ==
"ioni") parent = 1;
296 if (parentProcess ==
"LowEnPhotoElec") parent = 2;
297 if (parentProcess ==
"Transportation") parent = 3;
298 if (parentProcess ==
"initStep") parent = 4;
301 parentProcess =
"Not Known -- (primary generator + Rayleigh)";
305 if(aStep->GetTrack()){
306 sampleMaterial = aStep->GetTrack()->GetMaterial()->GetName();
307 if (sampleMaterial == (
"Dolorite" ||
"Anorthosite" ||
"Mars1" ||
"IceBasalt" ||
"HPGe")) sampleMat=1;
337 if(aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()==
"Sample"){
339 if(aStep->GetTrack()->GetNextVolume()->GetName() ==
"World" ) {
341 if ((aStep->GetTrack()->GetDynamicParticle()
346 aStep->GetPreStepPoint()->GetKineticEnergy();
350 else if ((aStep->GetTrack()->GetDynamicParticle()
354 aStep->GetPreStepPoint()->GetKineticEnergy();
357 else if ((aStep->GetTrack()->GetDynamicParticle()
361 protonsLeavSam = aStep->GetPreStepPoint()->GetKineticEnergy();
367 if((aStep->GetTrack()->GetDynamicParticle()
370 if(aStep->GetTrack()->GetCurrentStepNumber() == 1)
372 if(aStep->GetTrack()->GetParentID() != 0)
374 if(aStep->GetTrack()->GetVolume()->GetName() ==
"Sample")
377 aStep->GetPreStepPoint()->GetKineticEnergy();
383 else if ((aStep->GetTrack()->GetDynamicParticle()
386 if(aStep->GetTrack()->GetCurrentStepNumber() == 1)
388 if(aStep->GetTrack()->GetParentID() != 0)
390 if(aStep->GetTrack()->GetVolume()->GetName() ==
"Sample")
393 aStep->GetPreStepPoint()->GetKineticEnergy();
401 if(aStep->GetTrack()->GetNextVolume())
405 if(aStep->GetTrack()->GetNextVolume()->GetName() ==
"HPGeDetector")
408 if ((aStep->GetTrack()->GetDynamicParticle()
413 aStep->GetPreStepPoint()->GetKineticEnergy();
416 else if ((aStep->GetTrack()->GetDynamicParticle()
420 aStep->GetPreStepPoint()->GetKineticEnergy();
421 man->
FillH1(8,protonsAtTheDetPre);
CLHEP::Hep3Vector G4ThreeVector
static G4Electron * Definition()
static XrayFluoDetectorConstruction * GetInstance()
static G4Proton * Definition()
G4bool FillNtupleIColumn(G4int id, G4int value)
G4bool FillNtupleDColumn(G4int id, G4double value)
const G4String & GetName() const
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4LogicalVolume * GetLogicalVolume() const
G4VSolid * GetSolid() const
static G4Gamma * Definition()
G4Navigator * GetGeometryNavigator() const