Public Member Functions | Public Attributes | List of all members
TrackPoint_t Class Reference

#include <TrackPoint_t.hh>

Public Member Functions

 TrackPoint_t ()
 
virtual ~TrackPoint_t ()
 
void Print ()
 
Int_t GetParticleType () const
 
Int_t GetTrackID () const
 
Int_t GetGeneration () const
 
Double_t GetImpWeight () const
 
Float_t GetPosition (int i) const
 
Float_t GetPosition (const std::string &pos) const
 
Float_t GetMomentum (int i) const
 
Float_t GetMomentum (const std::string &pos) const
 
TrackPoint_toperator= (const TrackPoint_t &rhs)
 

Public Attributes

Int_t type
 
Int_t trkid
 
Int_t gen
 
Double_t impwt
 
Float_t x
 
Float_t y
 
Float_t z
 
Float_t px
 
Float_t py
 
Float_t pz
 

Detailed Description

Definition at line 23 of file TrackPoint_t.hh.

Constructor & Destructor Documentation

TrackPoint_t::TrackPoint_t ( )
TrackPoint_t::~TrackPoint_t ( )
virtual

Definition at line 34 of file TrackPoint_t.cc.

35 {
36  // TrackPoint_t destructor
37 }

Member Function Documentation

Int_t TrackPoint_t::GetGeneration ( ) const
inline

Definition at line 92 of file TrackPoint_t.hh.

92 { return gen; }
Double_t TrackPoint_t::GetImpWeight ( ) const
inline

Definition at line 93 of file TrackPoint_t.hh.

93 { return impwt; }
Double_t impwt
Definition: TrackPoint_t.hh:51
Float_t TrackPoint_t::GetMomentum ( int  i) const

Definition at line 69 of file TrackPoint_t.cc.

70 {
71  if (i == 0) return px;
72  else if(i == 1) return py;
73  else if(i == 2) return pz;
74  else
75  {
76  std::cout << "TrackPoint_t::GetMomentum - invalid momentum index " << i
77  << ". Valid indices are 0, 1, and 2. " << std::endl;
78  return -999999.0;
79  }
80 }
QTextStream & endl(QTextStream &s)
Float_t TrackPoint_t::GetMomentum ( const std::string pos) const

Definition at line 83 of file TrackPoint_t.cc.

84 {
85  if (pos == "x" || pos == "X") return px;
86  else if(pos == "y" || pos == "Y") return py;
87  else if(pos == "z" || pos == "Z") return pz;
88  else
89  {
90  std::cout << "TrackPoint_t::GetMomentum - invalid momentum direction \"" << pos
91  << "\". Valid directions are x, y, z, X, Y and Z. " << std::endl;
92  return -999999.0;
93  }
94 }
QTextStream & endl(QTextStream &s)
Int_t TrackPoint_t::GetParticleType ( ) const
inline

Definition at line 90 of file TrackPoint_t.hh.

90 { return type; }
Float_t TrackPoint_t::GetPosition ( int  i) const

Definition at line 41 of file TrackPoint_t.cc.

42 {
43  if (i == 0) return x;
44  else if(i == 1) return y;
45  else if(i == 2) return z;
46  else
47  {
48  std::cout << "TrackPoint_t::GetPosition - invalid position index " << i
49  << ". Valid indices are 0, 1, and 2. " << std::endl;
50  return -999999.0;
51  }
52 }
QTextStream & endl(QTextStream &s)
Float_t TrackPoint_t::GetPosition ( const std::string pos) const

Definition at line 55 of file TrackPoint_t.cc.

56 {
57  if (pos == "x" || pos == "X") return x;
58  else if(pos == "y" || pos == "Y") return y;
59  else if(pos == "z" || pos == "Z") return z;
60  else
61  {
62  std::cout << "TrackPoint_t::GetPosition - invalid position \"" << pos
63  << "\". Valid positions are x, y, z, X, Y and Z. " << std::endl;
64  return -999999.0;
65  }
66 }
QTextStream & endl(QTextStream &s)
Int_t TrackPoint_t::GetTrackID ( ) const
inline

Definition at line 91 of file TrackPoint_t.hh.

91 { return trkid; }
TrackPoint_t& TrackPoint_t::operator= ( const TrackPoint_t rhs)
inline

Definition at line 62 of file TrackPoint_t.hh.

63  {
64  if (this != &rhs) // protect against invalid self-assignment
65  {
66  type = rhs.type;
67  trkid = rhs.trkid;
68  gen = rhs.gen;
69  impwt = rhs.impwt;
70  x = rhs.x;
71  y = rhs.y;
72  z = rhs.z;
73  px = rhs.px;
74  py = rhs.py;
75  pz = rhs.pz;
76 
77  }
78  // by convention, always return *this
79  return *this;
80  }
Double_t impwt
Definition: TrackPoint_t.hh:51
void TrackPoint_t::Print ( )

Definition at line 97 of file TrackPoint_t.cc.

98 {
99 
100  std::cout << "TrackPoint_t::Print - " << std::endl;
101  std::cout << " type = " << type << std::endl;
102  std::cout << " track ID = " << trkid << std::endl;
103  std::cout << " generation = " << gen << std::endl;
104  std::cout << " impwt = " << impwt << std::endl;
105  std::cout << " x = " << x << std::endl;
106  std::cout << " y = " << y << std::endl;
107  std::cout << " z = " << z << std::endl;
108  std::cout << " px = " << px << std::endl;
109  std::cout << " py = " << py << std::endl;
110  std::cout << " pz = " << pz << std::endl;
111 }
Double_t impwt
Definition: TrackPoint_t.hh:51
QTextStream & endl(QTextStream &s)

Member Data Documentation

Int_t TrackPoint_t::gen

Definition at line 50 of file TrackPoint_t.hh.

Double_t TrackPoint_t::impwt

Definition at line 51 of file TrackPoint_t.hh.

Float_t TrackPoint_t::px

Definition at line 55 of file TrackPoint_t.hh.

Float_t TrackPoint_t::py

Definition at line 56 of file TrackPoint_t.hh.

Float_t TrackPoint_t::pz

Definition at line 57 of file TrackPoint_t.hh.

Int_t TrackPoint_t::trkid

Definition at line 49 of file TrackPoint_t.hh.

Int_t TrackPoint_t::type

Definition at line 48 of file TrackPoint_t.hh.

Float_t TrackPoint_t::x

Definition at line 52 of file TrackPoint_t.hh.

Float_t TrackPoint_t::y

Definition at line 53 of file TrackPoint_t.hh.

Float_t TrackPoint_t::z

Definition at line 54 of file TrackPoint_t.hh.


The documentation for this class was generated from the following files: