Deprecated/UpgradeASCIITests/G4TankSimulatorASCII/G4TankSteppingAction.cc
Go to the documentation of this file.
1 #include "G4TankSteppingAction.h"
2 #include "G4TankTrackingAction.h"
3 
4 #include <G4Step.hh>
5 
6 #include <G4VProcess.hh>
7 #include <sstream>
8 
9 using namespace G4TankSimulatorASCII;
10 using namespace std;
11 
13 
15 {
16 }
17 
19 {
20 }
21 
22 void G4TankSteppingAction::UserSteppingAction(const G4Step *theStep) {
23 
24  // Optical photons
25  fgParticleId = theStep->GetTrack()->GetDefinition()->GetPDGEncoding();
26 
27  if (fgParticleId == 0) {
28 
29  if (theStep->GetTrack()->GetNextVolume() != 0) {
30 
31  if (theStep->GetTrack()->GetNextVolume()->GetName() == "top" ||
32  theStep->GetTrack()->GetNextVolume()->GetName() == "side" ||
33  theStep->GetTrack()->GetNextVolume()->GetName() == "bottom") {
34 
36 
37  }
38  }
39  }
40  // Track of the primary in water
41  if ( theStep->GetTrack()->GetTrackID() ==1 && theStep->GetTrack()->GetMaterial()->GetName()=="Water" )
42  G4TankTrackingAction::WCD_Track_p += (theStep->GetStepLength());
43 
44  // Muon decay
45  const G4VProcess* theProcess = theStep->GetPostStepPoint()->GetProcessDefinedStep();
46  if( theProcess!=0 && theStep->GetTrack()->GetTrackID() ==1 )
47  if ( theProcess->GetProcessName() == "Decay" )
49 
50 }

, generated on Tue Sep 26 2023.