CMS 3D CMS Logo

G4SimTrack.h
Go to the documentation of this file.
1 #ifndef SimG4Core_G4SimTrack_H
2 #define SimG4Core_G4SimTrack_H
3 
8 #include <vector>
9 #include <cmath>
10 
11 class G4SimTrack {
12 public:
14 
15  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie)
16  : id_(iid),
17  ipart_(ipart),
18  ip_(ip),
19  ie_(ie),
20  ivert_(-1),
21  igenpart_(-1),
22  parentID_(-1),
23  parentMomentum_(math::XYZVectorD(0., 0., 0.)),
24  tkSurfacePosition_(math::XYZVectorD(0., 0., 0.)),
25  tkSurfaceMomentum_(math::XYZTLorentzVectorD(0., 0., 0., 0.)),
27 
28  G4SimTrack(int iid, int ipart, const math::XYZVectorD& ip, double ie, int iv, int ig, const math::XYZVectorD& ipmom)
29  : id_(iid),
30  ipart_(ipart),
31  ip_(ip),
32  ie_(ie),
33  ivert_(iv),
34  igenpart_(ig),
35  parentMomentum_(ipmom),
36  tkSurfacePosition_(math::XYZVectorD(0., 0., 0.)),
37  tkSurfaceMomentum_(math::XYZTLorentzVectorD(0., 0., 0., 0.)),
39 
40  G4SimTrack(int iid,
41  int ipart,
42  const math::XYZVectorD& ip,
43  double ie,
44  int iv,
45  int ig,
46  const math::XYZVectorD& ipmom,
47  const math::XYZVectorD& tkpos,
48  const math::XYZTLorentzVectorD& tkmom)
49  : id_(iid),
50  ipart_(ipart),
51  ip_(ip),
52  ie_(ie),
53  ivert_(iv),
54  igenpart_(ig),
55  parentMomentum_(ipmom),
56  tkSurfacePosition_(tkpos),
57  tkSurfaceMomentum_(tkmom),
59 
61 
62  int id() const { return id_; }
63  int part() const { return ipart_; }
64  const math::XYZVectorD& momentum() const { return ip_; }
65  double energy() const { return ie_; }
66  int ivert() const { return ivert_; }
67  int igenpart() const { return igenpart_; }
68  // parent momentum at interaction
69  const math::XYZVectorD& parentMomentum() const { return parentMomentum_; }
70  // Information at level of tracker surface
73  // parent track ID (only stored if parent momentum at interaction
74  // is stored, else = -1)
75  int parentID() const { return parentID_; }
76 
78  if (track->crossedBoundary()) {
79  crossedBoundary_ = track->crossedBoundary();
80  idAtBoundary_ = track->getIDAtBoundary();
81  positionAtBoundary_ = track->getPositionAtBoundary();
82  momentumAtBoundary_ = track->getMomentumAtBoundary();
83  }
84  }
85  bool crossedBoundary() const { return crossedBoundary_; }
88  int getIDAtBoundary() const { return idAtBoundary_; }
89 
90 private:
91  int id_;
92  int ipart_;
94  double ie_;
95  int ivert_;
96  int igenpart_;
97  int parentID_;
105 };
106 
107 #endif
G4SimTrack::idAtBoundary_
int idAtBoundary_
Definition: G4SimTrack.h:102
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
funct::false
false
Definition: Factorize.h:29
G4SimTrack::getPositionAtBoundary
const math::XYZTLorentzVectorF & getPositionAtBoundary() const
Definition: G4SimTrack.h:86
G4SimTrack::getMomentumAtBoundary
const math::XYZTLorentzVectorF & getMomentumAtBoundary() const
Definition: G4SimTrack.h:87
G4SimTrack::ivert
int ivert() const
Definition: G4SimTrack.h:66
G4SimTrack::ip_
math::XYZVectorD ip_
Definition: G4SimTrack.h:93
G4SimTrack::crossedBoundary
bool crossedBoundary() const
Definition: G4SimTrack.h:85
math::XYZTLorentzVectorF
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:22
gpuVertexFinder::iv
int32_t *__restrict__ iv
Definition: gpuClusterTracksDBSCAN.h:42
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
TrackWithHistory
Definition: TrackWithHistory.h:16
G4SimTrack::G4SimTrack
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:40
G4SimTrack::ipart_
int ipart_
Definition: G4SimTrack.h:92
XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Definition: SimpleZSPJPTJetCorrector.cc:16
G4SimTrack::G4SimTrack
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie)
Definition: G4SimTrack.h:15
G4SimTrack
Definition: G4SimTrack.h:11
G4SimTrack::tkSurfacePosition_
math::XYZVectorD tkSurfacePosition_
Definition: G4SimTrack.h:99
G4SimTrack::momentum
const math::XYZVectorD & momentum() const
Definition: G4SimTrack.h:64
G4SimTrack::G4SimTrack
G4SimTrack(int iid, int ipart, const math::XYZVectorD &ip, double ie, int iv, int ig, const math::XYZVectorD &ipmom)
Definition: G4SimTrack.h:28
G4SimTrack::energy
double energy() const
Definition: G4SimTrack.h:65
G4SimTrack::parentMomentum_
math::XYZVectorD parentMomentum_
Definition: G4SimTrack.h:98
G4SimTrack::ie_
double ie_
Definition: G4SimTrack.h:94
math::XYZVectorD
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
G4SimTrack::positionAtBoundary_
math::XYZTLorentzVectorF positionAtBoundary_
Definition: G4SimTrack.h:103
G4SimTrack::tkSurfaceMomentum_
math::XYZTLorentzVectorD tkSurfaceMomentum_
Definition: G4SimTrack.h:100
G4SimTrack::momentumAtBoundary_
math::XYZTLorentzVectorF momentumAtBoundary_
Definition: G4SimTrack.h:104
G4SimTrack::igenpart
int igenpart() const
Definition: G4SimTrack.h:67
LorentzVector.h
G4SimTrack::part
int part() const
Definition: G4SimTrack.h:63
G4SimTrack::igenpart_
int igenpart_
Definition: G4SimTrack.h:96
G4SimTrack::trackerSurfaceMomentum
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: G4SimTrack.h:72
G4SimTrack::parentID
int parentID() const
Definition: G4SimTrack.h:75
G4SimTrack::copyCrossedBoundaryVars
void copyCrossedBoundaryVars(const TrackWithHistory *track)
Definition: G4SimTrack.h:77
G4SimTrack::parentMomentum
const math::XYZVectorD & parentMomentum() const
Definition: G4SimTrack.h:69
math
Definition: choleskyInversion.h:19
G4SimTrack::getIDAtBoundary
int getIDAtBoundary() const
Definition: G4SimTrack.h:88
Exception.h
G4SimTrack::~G4SimTrack
~G4SimTrack()
Definition: G4SimTrack.h:60
G4SimTrack::ivert_
int ivert_
Definition: G4SimTrack.h:95
G4SimTrack::trackerSurfacePosition
const math::XYZVectorD & trackerSurfacePosition() const
Definition: G4SimTrack.h:71
G4SimTrack::id_
int id_
Definition: G4SimTrack.h:91
G4SimTrack::G4SimTrack
G4SimTrack()
Definition: G4SimTrack.h:13
Vector3D.h
G4SimTrack::id
int id() const
Definition: G4SimTrack.h:62
G4SimTrack::parentID_
int parentID_
Definition: G4SimTrack.h:97
TrackWithHistory.h
G4SimTrack::crossedBoundary_
bool crossedBoundary_
Definition: G4SimTrack.h:101