3 #include <fwk/CentralConfig.h>
4 #include <utl/ErrorLogger.h>
5 #include <utl/Reader.h>
6 #include <utl/MathConstants.h>
9 #include <G4SteppingManager.hh>
12 #include <G4StepPoint.hh>
13 #include <G4TrackStatus.hh>
14 #include <G4VPhysicalVolume.hh>
15 #include <G4ParticleDefinition.hh>
16 #include <G4ParticleTypes.hh>
23 using namespace EdepSimulatorAG;
25 SteppingAction::SteppingAction () : fScintID(-1){}
32 G4Track* theTrack = theStep->GetTrack ( );
33 G4double edep = theStep->GetTotalEnergyDeposit();
38 G4StepPoint * thePostPoint = theStep->GetPostStepPoint ( );
40 G4ParticleDefinition * particleType = theTrack->GetDefinition ( );
42 G4String process =
"Undefined";
43 if ( thePostPoint->GetProcessDefinedStep() != NULL)
44 process = thePostPoint->GetProcessDefinedStep()->GetProcessName();
46 G4double x = theStep->GetPostStepPoint()->GetPosition().x();
47 G4double y = theStep->GetPostStepPoint()->GetPosition().y();
48 G4double z = theStep->GetPostStepPoint()->GetPosition().z();
49 G4VPhysicalVolume *thePrePV = theStep->GetPreStepPoint ( )->GetPhysicalVolume ( );
50 string prePVName = string (thePrePV->GetName());
51 string postPVName =
"OutOfWorld";
53 G4int trackid = theTrack->GetTrackID();
54 G4int parentid = theTrack->GetParentID();
58 if ( prePVName ==
"RightScint" )
60 else if ( prePVName ==
"LeftScint" )
64 if( sId == 65 || sId == 0 )
66 else if(
fScintID == 32 && sId == 33 )
68 else if(
fScintID == 33 && sId == 32 )
82 stepd.
Sname = prePVName;
83 stepd.
Pname = particleType->GetParticleName();
84 stepd.
PDGCode = particleType->GetPDGEncoding();
90 stepd.
px = theStep->GetPreStepPoint()->GetMomentumDirection().x();
91 stepd.
py = theStep->GetPreStepPoint()->GetMomentumDirection().y();
92 stepd.
pz = theStep->GetPreStepPoint()->GetMomentumDirection().z();
93 stepd.
KinE = theStep->GetPreStepPoint()->GetKineticEnergy();
95 stepd.
Time = theStep->GetPreStepPoint()->GetGlobalTime();
virtual ~SteppingAction()
virtual void UserSteppingAction(const G4Step *)