CMS 3D CMS Logo

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