CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloHitID Class Reference

#include <CaloHitID.h>

Public Member Functions

 CaloHitID (uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0, float tSlice=1, bool ignoreTkID=false)
 
 CaloHitID (float tSlice=1, bool ignoreTkID=false)
 
 CaloHitID (const CaloHitID &)
 
uint16_t depth () const
 
bool operator< (const CaloHitID &) const
 
const CaloHitIDoperator= (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
 
float timeSliceUnit
 

Detailed Description

Definition at line 11 of file CaloHitID.h.

Constructor & Destructor Documentation

CaloHitID::CaloHitID ( uint32_t  unitID,
double  timeSlice,
int  trackID,
uint16_t  depth = 0,
float  tSlice = 1,
bool  ignoreTkID = false 
)

Definition at line 9 of file CaloHitID.cc.

References setID().

10  : timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) {
12 }
bool ignoreTrackID
Definition: CaloHitID.h:39
double timeSlice() const
Definition: CaloHitID.h:22
uint16_t depth() const
Definition: CaloHitID.h:24
int trackID() const
Definition: CaloHitID.h:23
float timeSliceUnit
Definition: CaloHitID.h:38
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:40
uint32_t unitID() const
Definition: CaloHitID.h:20
CaloHitID::CaloHitID ( float  tSlice = 1,
bool  ignoreTkID = false 
)

Definition at line 14 of file CaloHitID.cc.

References reset().

14 : timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) { reset(); }
bool ignoreTrackID
Definition: CaloHitID.h:39
void reset()
Definition: CaloHitID.cc:48
float timeSliceUnit
Definition: CaloHitID.h:38
CaloHitID::CaloHitID ( const CaloHitID id)

Definition at line 16 of file CaloHitID.cc.

References ignoreTrackID, theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.

16  {
17  theUnitID = id.theUnitID;
18  theTimeSlice = id.theTimeSlice;
19  theTrackID = id.theTrackID;
20  theTimeSliceID = id.theTimeSliceID;
21  theDepth = id.theDepth;
22  timeSliceUnit = id.timeSliceUnit;
23  ignoreTrackID = id.ignoreTrackID;
24 }
bool ignoreTrackID
Definition: CaloHitID.h:39
uint32_t theUnitID
Definition: CaloHitID.h:33
double theTimeSlice
Definition: CaloHitID.h:34
uint16_t theDepth
Definition: CaloHitID.h:37
float timeSliceUnit
Definition: CaloHitID.h:38
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
CaloHitID::~CaloHitID ( )
virtual

Definition at line 38 of file CaloHitID.cc.

38 {}

Member Function Documentation

uint16_t CaloHitID::depth ( void  ) const
inline
bool CaloHitID::operator< ( const CaloHitID id) const

Definition at line 63 of file CaloHitID.cc.

References depth(), theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().

Referenced by depth().

63  {
64  if (theTrackID != id.trackID()) {
65  return (theTrackID > id.trackID());
66  } else if (theUnitID != id.unitID()) {
67  return (theUnitID > id.unitID());
68  } else if (theDepth != id.depth()) {
69  return (theDepth > id.depth());
70  } else {
71  return (theTimeSliceID > id.timeSliceID());
72  }
73 }
uint32_t theUnitID
Definition: CaloHitID.h:33
uint16_t depth() const
Definition: CaloHitID.h:24
uint16_t theDepth
Definition: CaloHitID.h:37
int timeSliceID() const
Definition: CaloHitID.h:21
int trackID() const
Definition: CaloHitID.h:23
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
uint32_t unitID() const
Definition: CaloHitID.h:20
const CaloHitID & CaloHitID::operator= ( const CaloHitID id)

Definition at line 26 of file CaloHitID.cc.

References ignoreTrackID, theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.

26  {
27  theUnitID = id.theUnitID;
28  theTimeSlice = id.theTimeSlice;
29  theTrackID = id.theTrackID;
30  theTimeSliceID = id.theTimeSliceID;
31  theDepth = id.theDepth;
32  timeSliceUnit = id.timeSliceUnit;
33  ignoreTrackID = id.ignoreTrackID;
34 
35  return *this;
36 }
bool ignoreTrackID
Definition: CaloHitID.h:39
uint32_t theUnitID
Definition: CaloHitID.h:33
double theTimeSlice
Definition: CaloHitID.h:34
uint16_t theDepth
Definition: CaloHitID.h:37
float timeSliceUnit
Definition: CaloHitID.h:38
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
bool CaloHitID::operator== ( const CaloHitID id) const

Definition at line 56 of file CaloHitID.cc.

References depth(), ignoreTrackID, theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().

Referenced by depth().

56  {
57  return ((theUnitID == id.unitID()) && (theTrackID == id.trackID() || ignoreTrackID) &&
58  (theTimeSliceID == id.timeSliceID()) && (theDepth == id.depth()))
59  ? true
60  : false;
61 }
bool ignoreTrackID
Definition: CaloHitID.h:39
uint32_t theUnitID
Definition: CaloHitID.h:33
uint16_t depth() const
Definition: CaloHitID.h:24
uint16_t theDepth
Definition: CaloHitID.h:37
int timeSliceID() const
Definition: CaloHitID.h:21
int trackID() const
Definition: CaloHitID.h:23
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
uint32_t unitID() const
Definition: CaloHitID.h:20
bool CaloHitID::operator> ( const CaloHitID id) const

Definition at line 75 of file CaloHitID.cc.

References depth(), theDepth, theTimeSliceID, theTrackID, theUnitID, timeSliceID(), trackID(), and unitID().

Referenced by depth().

75  {
76  if (theTrackID != id.trackID()) {
77  return (theTrackID < id.trackID());
78  } else if (theUnitID != id.unitID()) {
79  return (theUnitID < id.unitID());
80  } else if (theDepth != id.depth()) {
81  return (theDepth < id.depth());
82  } else {
83  return (theTimeSliceID < id.timeSliceID());
84  }
85 }
uint32_t theUnitID
Definition: CaloHitID.h:33
uint16_t depth() const
Definition: CaloHitID.h:24
uint16_t theDepth
Definition: CaloHitID.h:37
int timeSliceID() const
Definition: CaloHitID.h:21
int trackID() const
Definition: CaloHitID.h:23
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
uint32_t unitID() const
Definition: CaloHitID.h:20
void CaloHitID::reset ( void  )

Definition at line 48 of file CaloHitID.cc.

References createfilelist::int, theDepth, theTimeSlice, theTimeSliceID, theTrackID, theUnitID, and timeSliceUnit.

Referenced by CaloHitID(), CaloSD::clearHits(), and depth().

48  {
49  theUnitID = 0;
51  theTrackID = -2;
53  theDepth = 0;
54 }
uint32_t theUnitID
Definition: CaloHitID.h:33
double theTimeSlice
Definition: CaloHitID.h:34
uint16_t theDepth
Definition: CaloHitID.h:37
float timeSliceUnit
Definition: CaloHitID.h:38
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
void CaloHitID::setID ( uint32_t  unitID,
double  timeSlice,
int  trackID,
uint16_t  depth = 0 
)
double CaloHitID::timeSlice ( ) const
inline

Definition at line 22 of file CaloHitID.h.

References theTimeSlice.

Referenced by CaloGVHit::getTimeSlice(), CaloG4Hit::getTimeSlice(), and setID().

22 { return theTimeSlice; }
double theTimeSlice
Definition: CaloHitID.h:34
int CaloHitID::timeSliceID ( ) const
inline
int CaloHitID::trackID ( ) const
inline
uint32_t CaloHitID::unitID ( ) const
inline

Member Data Documentation

bool CaloHitID::ignoreTrackID
private

Definition at line 39 of file CaloHitID.h.

Referenced by CaloHitID(), operator=(), and operator==().

uint16_t CaloHitID::theDepth
private

Definition at line 37 of file CaloHitID.h.

Referenced by CaloHitID(), depth(), operator<(), operator=(), operator==(), operator>(), reset(), and setID().

double CaloHitID::theTimeSlice
private

Definition at line 34 of file CaloHitID.h.

Referenced by CaloHitID(), operator=(), reset(), setID(), and timeSlice().

int CaloHitID::theTimeSliceID
private

Definition at line 36 of file CaloHitID.h.

Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and timeSliceID().

int CaloHitID::theTrackID
private

Definition at line 35 of file CaloHitID.h.

Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and trackID().

uint32_t CaloHitID::theUnitID
private

Definition at line 33 of file CaloHitID.h.

Referenced by CaloHitID(), operator<(), operator=(), operator==(), operator>(), reset(), setID(), and unitID().

float CaloHitID::timeSliceUnit
private

Definition at line 38 of file CaloHitID.h.

Referenced by CaloHitID(), operator=(), reset(), and setID().