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 
30  bool isFinecaloTrackID() const { return isFinecaloTrackID_; }
31 
32  bool operator==(const CaloHitID&) const;
33  bool operator<(const CaloHitID&) const;
34  bool operator>(const CaloHitID&) const;
35 
36 private:
37  uint32_t theUnitID;
38  double theTimeSlice;
41  uint16_t theDepth;
45 };
46 
47 std::ostream& operator<<(std::ostream&, const CaloHitID&);
48 #endif
bool operator>(const CaloHitID &) const
Definition: CaloHitID.cc:77
bool ignoreTrackID
Definition: CaloHitID.h:43
uint32_t theUnitID
Definition: CaloHitID.h:37
std::ostream & operator<<(std::ostream &, const CaloHitID &)
Definition: CaloHitID.cc:89
bool isFinecaloTrackID() const
Definition: CaloHitID.h:30
double theTimeSlice
Definition: CaloHitID.h:38
bool operator==(const CaloHitID &) const
Definition: CaloHitID.cc:58
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:49
int timeSliceID() const
Definition: CaloHitID.h:21
uint16_t theDepth
Definition: CaloHitID.h:41
float timeSliceUnit
Definition: CaloHitID.h:42
void setTrackID(int trackID)
Definition: CaloHitID.h:28
uint32_t unitID() const
Definition: CaloHitID.h:20
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:41
double timeSlice() const
Definition: CaloHitID.h:22
const CaloHitID & operator=(const CaloHitID &)
Definition: CaloHitID.cc:27
virtual ~CaloHitID()
Definition: CaloHitID.cc:39
void markAsFinecaloTrackID(bool flag=true)
Definition: CaloHitID.h:29
int theTimeSliceID
Definition: CaloHitID.h:40
bool isFinecaloTrackID_
Definition: CaloHitID.h:44
int theTrackID
Definition: CaloHitID.h:39
bool operator<(const CaloHitID &) const
Definition: CaloHitID.cc:65
int trackID() const
Definition: CaloHitID.h:23
uint16_t depth() const
Definition: CaloHitID.h:24