#include <RecEmcTofHit.h>
Public Member Functions | |
RecEmcTofHit () | |
RecEmcTofHit (const Identifier &id, const double e, const HepPoint3D pos) | |
~RecEmcTofHit () | |
RecEmcTofHit (const RecEmcTofHit &tofHit) | |
RecEmcTofHit & | operator= (const RecEmcTofHit &tofHit) |
bool | operator< (const RecEmcTofHit &tofHit) const |
bool | operator> (const RecEmcTofHit &tofHit) const |
int | IntCellId () const |
Identifier | CellId () const |
double | Energy () const |
HepPoint3D | Position () const |
double | ZPosition () const |
void | CellId (const Identifier &id) |
void | Energy (const double e) |
void | Position (const HepPoint3D pos) |
void | ZPosition (const double z) |
void | Assign (const Identifier &id, const double e, const HepPoint3D pos) |
void | Clear () |
double | DistanceTo (const RecEmcTofHit &) |
Private Attributes | |
Identifier | m_cellId |
double | m_energy |
HepPoint3D | m_pos |
Definition at line 19 of file RecEmcTofHit.h.
RecEmcTofHit::RecEmcTofHit | ( | ) |
RecEmcTofHit::RecEmcTofHit | ( | const Identifier & | id, | |
const double | e, | |||
const HepPoint3D | pos | |||
) |
RecEmcTofHit::~RecEmcTofHit | ( | ) |
RecEmcTofHit::RecEmcTofHit | ( | const RecEmcTofHit & | tofHit | ) |
void RecEmcTofHit::Assign | ( | const Identifier & | id, | |
const double | e, | |||
const HepPoint3D | pos | |||
) |
void RecEmcTofHit::CellId | ( | const Identifier & | id | ) |
Definition at line 54 of file RecEmcTofHit.cxx.
References m_cellId.
00055 { 00056 m_cellId = id; 00057 }
Identifier RecEmcTofHit::CellId | ( | ) | const [inline] |
Definition at line 43 of file RecEmcTofHit.h.
References m_cellId.
Referenced by operator<<(), operator=(), and RecEmcTofHit().
00043 { return m_cellId; }
void RecEmcTofHit::Clear | ( | ) |
Definition at line 78 of file RecEmcTofHit.cxx.
References Identifier::clear(), m_cellId, m_energy, and m_pos.
Referenced by RecEmcTofHit().
00079 { 00080 m_cellId.clear(); 00081 m_energy = 0; 00082 m_pos = HepPoint3D(0,0,0); 00083 }
double RecEmcTofHit::DistanceTo | ( | const RecEmcTofHit & | ) |
Definition at line 85 of file RecEmcTofHit.cxx.
References m_pos.
00086 { 00087 //double dphi = m_pos.phi()-tofHit.m_pos.phi(); 00088 00089 //if(dphi>CLHEP::pi) dphi = CLHEP::twopi - dphi; 00090 //if(dphi<-CLHEP::pi) dphi = CLHEP::twopi + dphi; 00091 00092 Hep3Vector pos1(m_pos); 00093 Hep3Vector pos2(tofHit.m_pos); 00094 00095 return fabs(pos1.deltaPhi(pos2)); 00096 00097 //cout<<"dphi="<<dphi<<"\tdeltaPhi="<<deltaPhi<<endl; 00098 //return fabs(dphi); 00099 }
void RecEmcTofHit::Energy | ( | const double | e | ) |
Definition at line 59 of file RecEmcTofHit.cxx.
References m_energy.
00060 { 00061 m_energy = e; 00062 }
double RecEmcTofHit::Energy | ( | ) | const [inline] |
Definition at line 44 of file RecEmcTofHit.h.
References m_energy.
Referenced by operator<<(), operator=(), and RecEmcTofHit().
00044 { return m_energy; }
int RecEmcTofHit::IntCellId | ( | ) | const |
Definition at line 47 of file RecEmcTofHit.cxx.
References TofID::layer(), m_cellId, and TofID::phi_module().
Referenced by operator<<().
00048 { 00049 int layer = TofID::layer(m_cellId); 00050 int im = TofID::phi_module(m_cellId); 00051 return im+layer*88; 00052 }
bool RecEmcTofHit::operator< | ( | const RecEmcTofHit & | tofHit | ) | const [inline] |
RecEmcTofHit & RecEmcTofHit::operator= | ( | const RecEmcTofHit & | tofHit | ) |
bool RecEmcTofHit::operator> | ( | const RecEmcTofHit & | tofHit | ) | const [inline] |
void RecEmcTofHit::Position | ( | const HepPoint3D | pos | ) |
HepPoint3D RecEmcTofHit::Position | ( | ) | const [inline] |
Definition at line 45 of file RecEmcTofHit.h.
References m_pos.
Referenced by operator=(), and RecEmcTofHit().
00045 { return m_pos; }
void RecEmcTofHit::ZPosition | ( | const double | z | ) |
double RecEmcTofHit::ZPosition | ( | ) | const [inline] |
Definition at line 46 of file RecEmcTofHit.h.
References m_pos.
Referenced by operator<<().
00046 { return m_pos.z(); }
Identifier RecEmcTofHit::m_cellId [private] |
Definition at line 62 of file RecEmcTofHit.h.
Referenced by Assign(), CellId(), Clear(), IntCellId(), operator=(), and RecEmcTofHit().
double RecEmcTofHit::m_energy [private] |
Definition at line 63 of file RecEmcTofHit.h.
Referenced by Assign(), Clear(), Energy(), operator<(), operator=(), operator>(), and RecEmcTofHit().
HepPoint3D RecEmcTofHit::m_pos [private] |
Definition at line 64 of file RecEmcTofHit.h.
Referenced by Assign(), Clear(), DistanceTo(), operator=(), Position(), RecEmcTofHit(), and ZPosition().