CMS 3D CMS Logo

G4SimTrack.h
Go to the documentation of this file.
1 #ifndef SimG4Core_G4SimTrack_H
2 #define SimG4Core_G4SimTrack_H
3 
6 #include <vector>
7 #include <cmath>
8 
9 class G4SimTrack {
10 public:
12 
13  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie)
14  : id_(iid),
15  ipart_(ipart),
16  ip_(ip),
17  ie_(ie),
18  ivert_(-1),
19  igenpart_(-1),
20  parentID_(-1),
21  parentMomentum_(math::XYZVectorD(0., 0., 0.)),
22  tkSurfacePosition_(math::XYZVectorD(0., 0., 0.)),
23  tkSurfaceMomentum_(math::XYZTLorentzVectorD(0., 0., 0., 0.)) {}
24 
25  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie, int iv, int ig, const math::XYZVectorD& ipmom)
26  : id_(iid),
27  ipart_(ipart),
28  ip_(ip),
29  ie_(ie),
30  ivert_(iv),
31  igenpart_(ig),
32  parentMomentum_(ipmom),
33  tkSurfacePosition_(math::XYZVectorD(0., 0., 0.)),
34  tkSurfaceMomentum_(math::XYZTLorentzVectorD(0., 0., 0., 0.)) {}
35 
36  G4SimTrack(int iid,
37  int ipart,
38  const math::XYZVectorD& ip,
39  double ie,
40  int iv,
41  int ig,
42  const math::XYZVectorD& ipmom,
43  const math::XYZVectorD& tkpos,
44  const math::XYZTLorentzVectorD& tkmom)
45  : id_(iid),
46  ipart_(ipart),
47  ip_(ip),
48  ie_(ie),
49  ivert_(iv),
50  igenpart_(ig),
51  parentMomentum_(ipmom),
52  tkSurfacePosition_(tkpos),
53  tkSurfaceMomentum_(tkmom) {}
54 
56 
57  int id() const { return id_; }
58  int part() const { return ipart_; }
59  const math::XYZVectorD& momentum() const { return ip_; }
60  double energy() const { return ie_; }
61  int ivert() const { return ivert_; }
62  int igenpart() const { return igenpart_; }
63  // parent momentum at interaction
64  const math::XYZVectorD& parentMomentum() const { return parentMomentum_; }
65  // Information at level of tracker surface
68  // parent track ID (only stored if parent momentum at interaction
69  // is stored, else = -1)
70  int parentID() const { return parentID_; }
71 
72 private:
73  int id_;
74  int ipart_;
76  double ie_;
77  int ivert_;
78  int igenpart_;
79  int parentID_;
83 };
84 
85 #endif
int ipart_
Definition: G4SimTrack.h:74
double energy() const
Definition: G4SimTrack.h:60
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
int ivert_
Definition: G4SimTrack.h:77
int part() const
Definition: G4SimTrack.h:58
int ivert() const
Definition: G4SimTrack.h:61
math::XYZVectorD parentMomentum_
Definition: G4SimTrack.h:80
const math::XYZVectorD & trackerSurfacePosition() const
Definition: G4SimTrack.h:66
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie, int iv, int ig, const math::XYZVectorD &ipmom, const math::XYZVectorD &tkpos, const math::XYZTLorentzVectorD &tkmom)
Definition: G4SimTrack.h:36
math::XYZTLorentzVectorD tkSurfaceMomentum_
Definition: G4SimTrack.h:82
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
int igenpart_
Definition: G4SimTrack.h:78
int parentID() const
Definition: G4SimTrack.h:70
math::XYZVectorD tkSurfacePosition_
Definition: G4SimTrack.h:81
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
Definition: Error.h:15
math::XYZVectorD ip_
Definition: G4SimTrack.h:75
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie, int iv, int ig, const math::XYZVectorD &ipmom)
Definition: G4SimTrack.h:25
int igenpart() const
Definition: G4SimTrack.h:62
int id() const
Definition: G4SimTrack.h:57
const math::XYZVectorD & parentMomentum() const
Definition: G4SimTrack.h:64
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie)
Definition: G4SimTrack.h:13
int parentID_
Definition: G4SimTrack.h:79
double ie_
Definition: G4SimTrack.h:76
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: G4SimTrack.h:67
const math::XYZVectorD & momentum() const
Definition: G4SimTrack.h:59