FSParticle.cxx
Go to the documentation of this file.
1 /*
2  * FSParticle.cxx
3  *
4  * Created on: Feb 9, 2021
5  * Author: chilgenb
6  */
7 
9 #include <climits>
10 
11 using namespace garana;
12 
13  FSParticle::FSParticle(const int& trackid, const int& pdg, const float& x, const float& y, const float& z, const float& t,
14  const float& px, const float& py, const float& pz, const float& e):
15  fTrackId(trackid),
16  fPdg(pdg),
17  fR(TLorentzVector(x,y,z,t)),
18  fP(TLorentzVector(px,py,pz,e))
19  {}
20 
21  FSParticle::FSParticle(const int& trackid, const int& pdg, const TLorentzVector& r, const TLorentzVector& p):
22  fTrackId(trackid),
23  fPdg(pdg),
24  fR(r),
25  fP(p)
26  {}
27 
28 
29  int const& FSParticle::TrackId() const { return fTrackId; }
30  int const& FSParticle::PDG() const { return fPdg; }
31  const TLorentzVector& FSParticle::Pos4() const { return fR; }
32  const TLorentzVector& FSParticle::Mom4() const { return fP; }
33  float FSParticle::X() const { return fR.X(); }
34  float FSParticle::Y() const { return fR.Y(); }
35  float FSParticle::Z() const { return fR.Z(); }
36  float FSParticle::T() const { return fR.T(); }
37  float FSParticle::Px() const { return fP.Px(); }
38  float FSParticle::Py() const { return fP.Py(); }
39  float FSParticle::Pz() const { return fP.Pz(); }
40  float FSParticle::P() const { return fP.P(); }
41  float FSParticle::E() const { return fP.E(); }
42  float FSParticle::KE() const { return E()-sqrt(E()*E()-P()*P()); }
43 
44 
45 //ClassImp(FSParticle)
float KE() const
Definition: FSParticle.cxx:42
int fPdg
particle PDG code
Definition: FSParticle.h:43
float Py() const
return momentum y-component [GeV/c]
Definition: FSParticle.cxx:38
int const & TrackId() const
Definition: FSParticle.cxx:29
float X() const
return position x-component [GeV/c]
Definition: FSParticle.cxx:33
float Px() const
return momentum x-component [GeV/c]
Definition: FSParticle.cxx:37
TLorentzVector fR
final particle 4-position in lab frame [cm,ns]
Definition: FSParticle.h:44
int const & PDG() const
Definition: FSParticle.cxx:30
const double e
const TLorentzVector & Pos4() const
Definition: FSParticle.cxx:31
float E() const
return total energy [GeV]
Definition: FSParticle.cxx:41
p
Definition: test.py:223
float Y() const
return position y-component [GeV/c]
Definition: FSParticle.cxx:34
TLorentzVector fP
final particle 4-momentum in lab frame [GeV/c,GeV]
Definition: FSParticle.h:45
float P() const
return magnitude of particle momentum [GeV/c]
Definition: FSParticle.cxx:40
const TLorentzVector & Mom4() const
Definition: FSParticle.cxx:32
float Pz() const
return momentum z-component [GeV/c]
Definition: FSParticle.cxx:39
int fTrackId
generator track ID
Definition: FSParticle.h:42
float Z() const
return position z-component [GeV/c]
Definition: FSParticle.cxx:35
list x
Definition: train.py:276
float T() const
return time [ns]
Definition: FSParticle.cxx:36