57 static const Char_t rcsid[] =
"$Id: StMcHit.cc,v 2.14 2015/07/22 19:30:00 jwebb Exp $";
60 int StMcHit::operator==(
const StMcHit& h)
const
62 return h.mKey == mKey && h.mPosition == mPosition &&
63 h.mdE == mdE && h.mdS == mdS ;
66 ostream& operator<<(ostream& os,
const StMcHit& h)
69 os <<
"Key, parent Key : " << Form(
"%5i/%5i",(
int)h.key(),(int)h.parentTrack()->key()) << endl;
71 os <<
"Key : " << Form(
"%5i/undef",
int(h.key())) << endl;
73 os <<
"Position xyz : " << Form(
"%8.2f%8.2f%8.2f",h.position().x(), h.position().y(), h.position().z()) << endl;
74 os <<
"Local Momentum : " << Form(
"%8.2f%8.2f%8.2f",h.localMomentum().x() ,h.localMomentum().y() ,h.localMomentum().z()) << endl;
75 os <<
"dE : " << Form(
"%8.2f keV",1e6*h.dE()) << endl;
76 os <<
"dS : " << Form(
"%8.2f cm",h.dS()) << endl;
77 os <<
"tof : " << Form(
"%8.2f ns",h.tof()*1e9) << endl;
78 os <<
"VolId : " << h.volumeId() << endl;
82 void StMcHit::Print(Option_t *option)
const {
83 cout << *
this << endl;