CMS 3D CMS Logo

CoreSimTrack.h
Go to the documentation of this file.
1 #ifndef CoreSimTrack_H
2 #define CoreSimTrack_H
3 
6 
8 
9 class CoreSimTrack {
10 public:
12  CoreSimTrack() : tId(0), thePID(0) {}
13  CoreSimTrack(int ipart, const math::XYZTLorentzVectorD& p) : tId(0), thePID(ipart), theMomentum(p) {}
14 
15  CoreSimTrack(int ipart, math::XYZVectorD& ip, double ie) : tId(0), thePID(ipart) {
16  theMomentum.SetXYZT(ip.x(), ip.y(), ip.z(), ie);
17  }
18 
19  const math::XYZTLorentzVectorD& momentum() const { return theMomentum; }
20 
22  int type() const { return thePID; }
23 
25  float charge() const;
26 
28  EncodedEventId eventId() const { return eId; }
29 
30  void setTrackId(unsigned int t) { tId = t; }
31  unsigned int trackId() const { return tId; }
32 
33 private:
35  unsigned int tId;
36  int thePID;
38 };
39 
40 #include <iosfwd>
41 std::ostream& operator<<(std::ostream& o, const CoreSimTrack& t);
42 
43 #endif
CoreSimTrack(int ipart, const math::XYZTLorentzVectorD &p)
Definition: CoreSimTrack.h:13
EncodedEventId eventId() const
Definition: CoreSimTrack.h:28
unsigned int tId
Definition: CoreSimTrack.h:35
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
void setEventId(EncodedEventId e)
Definition: CoreSimTrack.h:27
float charge() const
charge
Definition: CoreSimTrack.cc:17
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
Definition: Vector3D.h:8
std::ostream & operator<<(std::ostream &o, const CoreSimTrack &t)
Definition: CoreSimTrack.cc:69
CoreSimTrack(int ipart, math::XYZVectorD &ip, double ie)
Definition: CoreSimTrack.h:15
CoreSimTrack()
constructors
Definition: CoreSimTrack.h:12
EncodedEventId eId
Definition: CoreSimTrack.h:34
unsigned int trackId() const
Definition: CoreSimTrack.h:31
void setTrackId(unsigned int t)
Definition: CoreSimTrack.h:30
math::XYZTLorentzVectorD theMomentum
Definition: CoreSimTrack.h:37
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19