4 #include "StMcBTofHit.hh"
5 #include "StMcTrack.hh"
6 #include "StParticleDefinition.hh"
10 StMcBTofHit::StMcBTofHit()
11 : mTray(0),mModule(0),mCell(0),mdE(0),mPathLength(0),mTime(0),mTof(0),mCharge(0),mPosition(0.,0.,0.),mParentTrack(0),mParentTrackId(0)
14 StMcBTofHit::StMcBTofHit(
int t,
int m,
int c,
float de,
float pl,
float time,
float tof,
float q)
15 :mTray(t),mModule(m),mCell(c),mdE(de),mPathLength(pl),mTime(time),mTof(tof),mCharge(q),mPosition(0.,0.,0.),mParentTrack(0),mParentTrackId(0)
19 :mTray(t),mModule(m),mCell(c),mdE(de),mPathLength(pl),mTime(time),mTof(tof),mCharge(q),mPosition(x),mParentTrack(parent),mParentTrackId(0)
22 StMcBTofHit::~StMcBTofHit() { }
24 int StMcBTofHit::operator==(
const StMcBTofHit& h)
const
28 return h.mTray == mTray && h.mModule == mModule && h.mCell == mCell
29 && h.mPathLength == mPathLength && h.mTime == mTime
30 && h.mTof == mTof && h.mCharge == mCharge
31 && h.mPosition == mPosition
32 && ( (h.mParentTrack == mParentTrack) || (h.mParentTrackId == mParentTrackId) );
36 int StMcBTofHit::operator!=(
const StMcBTofHit& h)
const
50 bool StMcBTofHit::sameCell(
const StMcBTofHit& h)
const
54 return h.mTray == mTray && h.mModule == mModule && h.mCell == mCell;
57 void StMcBTofHit::setTray(
int val) { mTray = val; }
59 void StMcBTofHit::setModule(
int val) { mModule = val; }
61 void StMcBTofHit::setCell(
int val) { mCell = val; }
63 void StMcBTofHit::setdE(
float val) { mdE = val; }
65 void StMcBTofHit::setPathLength(
float val) { mPathLength = val; }
67 void StMcBTofHit::setTime(
float val) { mTime = val; }
69 void StMcBTofHit::setTof(
float val) { mTof = val; }
71 void StMcBTofHit::setCharge(
float val) { mCharge = val; }
73 void StMcBTofHit::setPosition(
StThreeVectorF& val) { mPosition = val; }
75 void StMcBTofHit::setParentTrack(
StMcTrack* val) { mParentTrack = val; }
77 void StMcBTofHit::setParentTrackId(
int val) { mParentTrackId = val; }
80 ostream& operator<<(ostream& os,
const StMcBTofHit & h)
83 <<
" tray: " << h.tray()
84 <<
" mod: " << h.module()
85 <<
" cell: " << h.cell()
87 <<
" pathL: " << h.pathLength()
88 <<
" time: " << h.time()
89 <<
" tof (simu): " << h.
tof()
90 <<
" charge: " << h.
charge()
94 if(t->particleDefinition()){
95 os <<
" | g2t key : " << t->key()
96 <<
" Name: "<<(t->particleDefinition()->name()).c_str();
99 else os <<
" Parent track undefined ";
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
virtual StThreeVectorF position() const
collected charge
virtual float charge() const
tof simulated
virtual float tof() const
time of flight geant