#include <CaloHitID.h>
Public Member Functions | |
CaloHitID (uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0, int tSlice=1, bool ignoreTkID=false) | |
CaloHitID (int tSlice=1, bool ignoreTkID=false) | |
CaloHitID (const CaloHitID &) | |
uint16_t | depth () const |
bool | operator< (const CaloHitID &) const |
const CaloHitID & | operator= (const CaloHitID &) |
bool | operator== (const CaloHitID &) const |
bool | operator> (const CaloHitID &) const |
void | reset () |
void | setID (uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0) |
double | timeSlice () const |
int | timeSliceID () const |
int | trackID () const |
uint32_t | unitID () const |
virtual | ~CaloHitID () |
Private Attributes | |
bool | ignoreTrackID |
uint16_t | theDepth |
double | theTimeSlice |
int | theTimeSliceID |
int | theTrackID |
uint32_t | theUnitID |
int | timeSliceUnit |
Definition at line 11 of file CaloHitID.h.
CaloHitID::CaloHitID | ( | uint32_t | unitID, |
double | timeSlice, | ||
int | trackID, | ||
uint16_t | depth = 0 , |
||
int | tSlice = 1 , |
||
bool | ignoreTkID = false |
||
) |
Definition at line 9 of file CaloHitID.cc.
References setID().
: timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) { setID(unitID, timeSlice, trackID, depth); }
CaloHitID::CaloHitID | ( | int | tSlice = 1 , |
bool | ignoreTkID = false |
||
) |
Definition at line 15 of file CaloHitID.cc.
References reset().
: timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) { reset(); }
CaloHitID::CaloHitID | ( | const CaloHitID & | id | ) |
Definition at line 20 of file CaloHitID.cc.
References ignoreTrackID, theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.
{ theUnitID = id.theUnitID; theTimeSlice = id.theTimeSlice; theTrackID = id.theTrackID; theTimeSliceID = id.theTimeSliceID; theDepth = id.theDepth; timeSliceUnit = id.timeSliceUnit; ignoreTrackID = id.ignoreTrackID; }
CaloHitID::~CaloHitID | ( | ) | [virtual] |
Definition at line 42 of file CaloHitID.cc.
{}
uint16_t CaloHitID::depth | ( | ) | const [inline] |
Definition at line 26 of file CaloHitID.h.
References theDepth.
Referenced by CaloSD::createNewHit(), CaloG4Hit::getDepth(), operator<(), operator==(), operator>(), and setID().
{return theDepth;}
bool CaloHitID::operator< | ( | const CaloHitID & | id | ) | const |
Definition at line 68 of file CaloHitID.cc.
References depth(), theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().
{ if (theTrackID != id.trackID()) { return (theTrackID > id.trackID()); } else if (theUnitID != id.unitID()) { return (theUnitID > id.unitID()); } else if (theDepth != id.depth()) { return (theDepth > id.depth()); } else { return (theTimeSliceID > id.timeSliceID()); } }
Definition at line 30 of file CaloHitID.cc.
References ignoreTrackID, theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.
{ theUnitID = id.theUnitID; theTimeSlice = id.theTimeSlice; theTrackID = id.theTrackID; theTimeSliceID = id.theTimeSliceID; theDepth = id.theDepth; timeSliceUnit = id.timeSliceUnit; ignoreTrackID = id.ignoreTrackID; return *this; }
bool CaloHitID::operator== | ( | const CaloHitID & | id | ) | const |
Definition at line 61 of file CaloHitID.cc.
References depth(), ignoreTrackID, theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().
{ return ((theUnitID == id.unitID()) && (theTrackID == id.trackID() || ignoreTrackID) && (theTimeSliceID == id.timeSliceID()) && (theDepth == id.depth())) ? true : false; }
bool CaloHitID::operator> | ( | const CaloHitID & | id | ) | const |
Definition at line 80 of file CaloHitID.cc.
References depth(), theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().
{ if (theTrackID != id.trackID()) { return (theTrackID < id.trackID()); } else if (theUnitID != id.unitID()) { return (theUnitID < id.unitID()); } else if (theDepth != id.depth()) { return (theDepth < id.depth()); } else { return (theTimeSliceID < id.timeSliceID()); } }
void CaloHitID::reset | ( | void | ) |
Definition at line 53 of file CaloHitID.cc.
References theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.
Referenced by CaloHitID(), and CaloSD::clearHits().
{ theUnitID = 0; theTimeSlice =-2*timeSliceUnit; theTrackID =-2; theTimeSliceID = (int)(theTimeSlice/timeSliceUnit); theDepth = 0; }
void CaloHitID::setID | ( | uint32_t | unitID, |
double | timeSlice, | ||
int | trackID, | ||
uint16_t | depth = 0 |
||
) |
Definition at line 44 of file CaloHitID.cc.
References depth(), theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, timeSlice(), timeSliceUnit, trackID(), and unitID().
Referenced by CaloHitID(), ZdcSD::getFromLibrary(), HCalSD::getFromLibrary(), CastorSD::getFromLibrary(), HCalSD::getFromParam(), HCalSD::getHitFibreBundle(), HCalSD::getHitPMT(), CaloSD::getStepInfo(), DreamSD::getStepInfo(), HCalSD::hitForFibre(), CaloSD::ProcessHits(), and CaloG4Hit::setID().
{ theUnitID = unitID; theTimeSlice = timeSlice; theTrackID = trackID; theTimeSliceID = (int)(theTimeSlice/timeSliceUnit); theDepth = depth; }
double CaloHitID::timeSlice | ( | ) | const [inline] |
Definition at line 24 of file CaloHitID.h.
References theTimeSlice.
Referenced by CaloG4Hit::getTimeSlice(), and setID().
{return theTimeSlice;}
int CaloHitID::timeSliceID | ( | ) | const [inline] |
Definition at line 23 of file CaloHitID.h.
References theTimeSliceID.
Referenced by CaloSD::createNewHit(), CaloG4Hit::getTimeSliceID(), operator<(), operator==(), and operator>().
{return theTimeSliceID;}
int CaloHitID::trackID | ( | ) | const [inline] |
Definition at line 25 of file CaloHitID.h.
References theTrackID.
Referenced by CaloSD::createNewHit(), CaloG4Hit::getTrackID(), CaloSD::hitExists(), operator<(), operator==(), operator>(), CaloSD::ProcessHits(), setID(), ZdcSD::setTrackID(), HCalSD::setTrackID(), CastorSD::setTrackID(), and CaloSD::storeHit().
{return theTrackID;}
uint32_t CaloHitID::unitID | ( | ) | const [inline] |
Definition at line 22 of file CaloHitID.h.
References theUnitID.
Referenced by CaloSD::createNewHit(), CaloSD::getStepInfo(), DreamSD::getStepInfo(), CaloG4Hit::getUnitID(), operator<(), operator==(), operator>(), CaloSD::ProcessHits(), and setID().
{return theUnitID;}
bool CaloHitID::ignoreTrackID [private] |
Definition at line 43 of file CaloHitID.h.
Referenced by CaloHitID(), operator=(), and operator==().
uint16_t CaloHitID::theDepth [private] |
Definition at line 41 of file CaloHitID.h.
Referenced by CaloHitID(), depth(), operator<(), operator=(), operator==(), operator>(), reset(), and setID().
double CaloHitID::theTimeSlice [private] |
Definition at line 38 of file CaloHitID.h.
Referenced by CaloHitID(), operator=(), reset(), setID(), and timeSlice().
int CaloHitID::theTimeSliceID [private] |
Definition at line 40 of file CaloHitID.h.
Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and timeSliceID().
int CaloHitID::theTrackID [private] |
Definition at line 39 of file CaloHitID.h.
Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and trackID().
uint32_t CaloHitID::theUnitID [private] |
Definition at line 37 of file CaloHitID.h.
Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and unitID().
int CaloHitID::timeSliceUnit [private] |
Definition at line 42 of file CaloHitID.h.
Referenced by CaloHitID(), operator=(), reset(), and setID().