CMS 3D CMS Logo

CaloHitID.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_CaloHitID_H
2 #define SimG4CMS_CaloHitID_H
3 // File: CaloHitID.h
5 // HitID class for storing unique identifier of a Calorimetric Hit
7 
8 #include <cstdint>
9 #include <iostream>
10 
11 class CaloHitID {
12 public:
13  CaloHitID(
14  uint32_t unitID, double timeSlice, int trackID, uint16_t depth = 0, float tSlice = 1, bool ignoreTkID = false);
15  CaloHitID(float tSlice = 1, bool ignoreTkID = false);
16  CaloHitID(const CaloHitID&);
17  const CaloHitID& operator=(const CaloHitID&);
18  virtual ~CaloHitID();
19 
20  uint32_t unitID() const { return theUnitID; }
21  int timeSliceID() const { return theTimeSliceID; }
22  double timeSlice() const { return theTimeSlice; }
23  int trackID() const { return theTrackID; }
24  uint16_t depth() const { return theDepth; }
25  void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth = 0);
26  void reset();
27 
28  bool operator==(const CaloHitID&) const;
29  bool operator<(const CaloHitID&) const;
30  bool operator>(const CaloHitID&) const;
31 
32 private:
33  uint32_t theUnitID;
34  double theTimeSlice;
37  uint16_t theDepth;
40 };
41 
42 std::ostream& operator<<(std::ostream&, const CaloHitID&);
43 #endif
bool operator<(const CaloHitID &) const
Definition: CaloHitID.cc:63
bool ignoreTrackID
Definition: CaloHitID.h:39
uint32_t theUnitID
Definition: CaloHitID.h:33
bool operator>(const CaloHitID &) const
Definition: CaloHitID.cc:75
std::ostream & operator<<(std::ostream &, const CaloHitID &)
Definition: CaloHitID.cc:87
double theTimeSlice
Definition: CaloHitID.h:34
double timeSlice() const
Definition: CaloHitID.h:22
uint16_t depth() const
Definition: CaloHitID.h:24
CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0, float tSlice=1, bool ignoreTkID=false)
Definition: CaloHitID.cc:9
void reset()
Definition: CaloHitID.cc:48
uint16_t theDepth
Definition: CaloHitID.h:37
int timeSliceID() const
Definition: CaloHitID.h:21
bool operator==(const CaloHitID &) const
Definition: CaloHitID.cc:56
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
const CaloHitID & operator=(const CaloHitID &)
Definition: CaloHitID.cc:26
virtual ~CaloHitID()
Definition: CaloHitID.cc:38
int theTimeSliceID
Definition: CaloHitID.h:36
int theTrackID
Definition: CaloHitID.h:35
uint32_t unitID() const
Definition: CaloHitID.h:20