MdGroundPropagatorAG/SteppingAction.h
Go to the documentation of this file.
1 #ifndef _GroundPropagatorAG_SteppingAction_h_
2 #define _GroundPropagatorAG_SteppingAction_h_
3 
4 #include <globals.hh>
5 #include <G4UserSteppingAction.hh>
6 
7 #include <utl/Particle.h>
8 #include <utl/LameShadowPtr.h>
9 #include <det/Detector.h>
10 
11 #include <vector>
12 #include <string>
13 using std::vector;
14 using std::string;
15 
16 
17 namespace GroundPropagatorAG {
18 
19 #if __cplusplus >= 201103L
20 # include <memory>
21 typedef std::shared_ptr<utl::Particle> smartPointer;
22 #else
23 # include <boost/shared_ptr.hpp>
24 typedef boost::shared_ptr<utl::Particle> smartPointer;
25 #endif /* __cplusplus >= 201103L */
26 
27 class PartData {
28 public:
30  {
31  Pname = "unknown";
32  PDGCode = -1;
33  x = 0;
34  y = 0;
35  z = 0;
36  px = 0;
37  py = 0;
38  pz = 0;
39  KinE = 0;
40  Time = 0;
41  }
42 
43  string Pname;
44  int PDGCode;
45  int TrackID;
47  //Position
48  double x;
49  double y;
50  double z;
51  //Direction
52  double px;
53  double py;
54  double pz;
55  //Energy & Time
56  double KinE;
57  double Time;
58 };
59 
60 
61 class SteppingAction : public G4UserSteppingAction {
62 
63 public:
64  typedef vector<PartData> PartCollection;
65  typedef vector<PartData>::iterator PartCollectionIt;
66 
67  SteppingAction(double depth);
68  virtual ~SteppingAction();
69 
70  virtual void UserSteppingAction(const G4Step*);
71 
72  void
74  {
75  fPData.PParent = p;
76 #ifdef AMIGA_DEBUG
77  G4cerr << "Setting parent to "
78  << fPData.PParent->GetType() << '\n';
79 #endif
80  }
81 
84 
85 private:
86  G4double fDepth;
88 
89 };
90 
91 }
92 
93 
94 #endif
boost::shared_ptr< utl::Particle > smartPointer

, generated on Tue Sep 26 2023.