CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
11 public:
13 
14  G4SimTrack(int iid, int ipart, const math::XYZVectorD & ip, double ie)
15  : id_(iid), ipart_(ipart), ip_(ip), ie_(ie),ivert_(-1),igenpart_(-1), parentID_(-1),
16  parentMomentum_(math::XYZVectorD(0.,0.,0.)),tkSurfacePosition_(math::XYZVectorD(0.,0.,0.)),
17  tkSurfaceMomentum_(math::XYZTLorentzVectorD(0.,0.,0.,0.)){}
18 
19  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie,
20  int iv, int ig, const math::XYZVectorD& ipmom)
21  : id_(iid),ipart_(ipart),ip_(ip),ie_(ie),ivert_(iv),igenpart_(ig),parentMomentum_(ipmom),
22  tkSurfacePosition_(math::XYZVectorD(0.,0.,0.)),tkSurfaceMomentum_(math::XYZTLorentzVectorD(0.,0.,0.,0.)) {}
23 
24  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie,
25  int iv, int ig, const math::XYZVectorD& ipmom,
26  const math::XYZVectorD & tkpos, const math::XYZTLorentzVectorD & tkmom)
27  : id_(iid),ipart_(ipart),ip_(ip),ie_(ie),ivert_(iv),igenpart_(ig),parentMomentum_(ipmom),
28  tkSurfacePosition_(tkpos),tkSurfaceMomentum_(tkmom) {}
29 
31 
32  const int id() const { return id_; }
33  const int part() const { return ipart_; }
34  const math::XYZVectorD & momentum() const { return ip_; }
35  const double energy() const { return ie_; }
36  int const ivert() const { return ivert_; }
37  int const igenpart() const { return igenpart_; }
38  // parent momentum at interaction
39  const math::XYZVectorD & parentMomentum() const { return parentMomentum_; }
40  // Information at level of tracker surface
43  // parent track ID (only stored if parent momentum at interaction
44  // is stored, else = -1)
45  const int parentID() const { return parentID_; }
46 private:
47  int id_;
48  int ipart_;
50  double ie_;
51  int ivert_;
52  int igenpart_;
53  int parentID_;
57 };
58 
59 #endif
const double energy() const
Definition: G4SimTrack.h:35
int ipart_
Definition: G4SimTrack.h:48
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:51
math::XYZVectorD parentMomentum_
Definition: G4SimTrack.h:54
const math::XYZVectorD & trackerSurfacePosition() const
Definition: G4SimTrack.h:41
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:24
const int part() const
Definition: G4SimTrack.h:33
math::XYZTLorentzVectorD tkSurfaceMomentum_
Definition: G4SimTrack.h:56
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
int igenpart_
Definition: G4SimTrack.h:52
math::XYZVectorD tkSurfacePosition_
Definition: G4SimTrack.h:55
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
const int parentID() const
Definition: G4SimTrack.h:45
math::XYZVectorD ip_
Definition: G4SimTrack.h:49
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie, int iv, int ig, const math::XYZVectorD &ipmom)
Definition: G4SimTrack.h:19
int const ivert() const
Definition: G4SimTrack.h:36
int const igenpart() const
Definition: G4SimTrack.h:37
const math::XYZVectorD & parentMomentum() const
Definition: G4SimTrack.h:39
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie)
Definition: G4SimTrack.h:14
int parentID_
Definition: G4SimTrack.h:53
double ie_
Definition: G4SimTrack.h:50
const int id() const
Definition: G4SimTrack.h:32
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: G4SimTrack.h:42
const math::XYZVectorD & momentum() const
Definition: G4SimTrack.h:34