CMS 3D CMS Logo

CaloHitID Class Reference

#include <SimG4CMS/Calo/interface/CaloHitID.h>

List of all members.

Public Member Functions

 CaloHitID (const CaloHitID &)
 CaloHitID ()
 CaloHitID (uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
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

uint16_t theDepth
double theTimeSlice
int theTimeSliceID
int theTrackID
uint32_t theUnitID


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 
)

Definition at line 9 of file CaloHitID.cc.

References setID().

00010                                      {
00011   setID(unitID, timeSlice, trackID, depth);
00012 }

CaloHitID::CaloHitID (  ) 

Definition at line 14 of file CaloHitID.cc.

References reset().

00014                      {
00015   reset();
00016 }

CaloHitID::CaloHitID ( const CaloHitID id  ) 

Definition at line 18 of file CaloHitID.cc.

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

00018                                          {
00019   theUnitID      = id.theUnitID;
00020   theTimeSlice   = id.theTimeSlice;
00021   theTrackID     = id.theTrackID;
00022   theTimeSliceID = id.theTimeSliceID;
00023   theDepth       = id.theDepth;
00024 }

CaloHitID::~CaloHitID (  )  [virtual]

Definition at line 36 of file CaloHitID.cc.

00036 {}


Member Function Documentation

uint16_t CaloHitID::depth (  )  const [inline]

Definition at line 25 of file CaloHitID.h.

References theDepth.

Referenced by CaloSD::createNewHit(), CaloG4Hit::getDepth(), operator<(), operator==(), and operator>().

00025 {return theDepth;}

bool CaloHitID::operator< ( const CaloHitID id  )  const

Definition at line 60 of file CaloHitID.cc.

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

00060                                                    {
00061   if (theTrackID != id.trackID()) {
00062     return (theTrackID > id.trackID());
00063   } else if  (theUnitID != id.unitID()) {
00064     return (theUnitID > id.unitID());
00065   } else if  (theDepth != id.depth()) {
00066     return (theDepth > id.depth());
00067   } else {
00068     return (theTimeSliceID > id.timeSliceID());
00069   }
00070 }

const CaloHitID & CaloHitID::operator= ( const CaloHitID id  ) 

Definition at line 26 of file CaloHitID.cc.

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

00026                                                           {
00027   theUnitID      = id.theUnitID;
00028   theTimeSlice   = id.theTimeSlice;
00029   theTrackID     = id.theTrackID;
00030   theTimeSliceID = id.theTimeSliceID;
00031   theDepth       = id.theDepth;
00032 
00033   return *this;
00034 }

bool CaloHitID::operator== ( const CaloHitID id  )  const

Definition at line 55 of file CaloHitID.cc.

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

00055                                                     {
00056   return (theUnitID == id.unitID() && theTrackID == id.trackID() &&
00057           theTimeSliceID == id.timeSliceID() && theDepth == id.depth()) ? true : false;
00058 }

bool CaloHitID::operator> ( const CaloHitID id  )  const

Definition at line 72 of file CaloHitID.cc.

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

00072                                                    {
00073   if (theTrackID != id.trackID()) {
00074     return (theTrackID < id.trackID());
00075   } else if  (theUnitID != id.unitID()) {
00076     return (theUnitID < id.unitID());
00077   } else if  (theDepth != id.depth()) {
00078     return (theDepth < id.depth());
00079   } else {
00080     return (theTimeSliceID < id.timeSliceID());
00081   }
00082 }

void CaloHitID::reset ( void   ) 

Definition at line 47 of file CaloHitID.cc.

References int, theDepth, theTimeSlice, theTimeSliceID, theTrackID, and theUnitID.

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

00047                       {
00048   theUnitID    = 0;
00049   theTimeSlice =-2;
00050   theTrackID   =-2;
00051   theTimeSliceID = (int)theTimeSlice;
00052   theDepth     = 0;
00053 }

void CaloHitID::setID ( uint32_t  unitID,
double  timeSlice,
int  trackID,
uint16_t  depth = 0 
)

Definition at line 38 of file CaloHitID.cc.

References int, theDepth, theTimeSlice, theTimeSliceID, theTrackID, and theUnitID.

Referenced by CaloHitID(), HCalSD::getFromLibrary(), HCalSD::getFromParam(), HCalSD::getHitPMT(), CaloSD::getStepInfo(), DreamSD::getStepInfo(), HCalSD::hitForFibre(), CaloSD::ProcessHits(), and CaloG4Hit::setID().

00039                                       {
00040   theUnitID    = unitID;
00041   theTimeSlice = timeSlice;
00042   theTrackID   = trackID;
00043   theTimeSliceID = (int)theTimeSlice;
00044   theDepth     = depth;
00045 }

double CaloHitID::timeSlice (  )  const [inline]

Definition at line 23 of file CaloHitID.h.

References theTimeSlice.

Referenced by CaloG4Hit::getTimeSlice().

00023 {return theTimeSlice;}

int CaloHitID::timeSliceID (  )  const [inline]

Definition at line 22 of file CaloHitID.h.

References theTimeSliceID.

Referenced by CaloSD::createNewHit(), CaloG4Hit::getTimeSliceID(), operator<(), operator==(), and operator>().

00022 {return theTimeSliceID;}

int CaloHitID::trackID (  )  const [inline]

Definition at line 24 of file CaloHitID.h.

References theTrackID.

Referenced by CaloSD::createNewHit(), CaloG4Hit::getTrackID(), CaloSD::hitExists(), operator<(), operator==(), operator>(), CaloSD::ProcessHits(), HCalSD::setTrackID(), and CaloSD::storeHit().

00024 {return theTrackID;}

uint32_t CaloHitID::unitID (  )  const [inline]

Definition at line 21 of file CaloHitID.h.

References theUnitID.

Referenced by CaloSD::createNewHit(), CaloSD::getStepInfo(), DreamSD::getStepInfo(), CaloG4Hit::getUnitID(), operator<(), operator==(), operator>(), and CaloSD::ProcessHits().

00021 {return theUnitID;}


Member Data Documentation

uint16_t CaloHitID::theDepth [private]

Definition at line 40 of file CaloHitID.h.

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

double CaloHitID::theTimeSlice [private]

Definition at line 37 of file CaloHitID.h.

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

int CaloHitID::theTimeSliceID [private]

Definition at line 39 of file CaloHitID.h.

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

int CaloHitID::theTrackID [private]

Definition at line 38 of file CaloHitID.h.

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

uint32_t CaloHitID::theUnitID [private]

Definition at line 36 of file CaloHitID.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:46 2009 for CMSSW by  doxygen 1.5.4