test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <boost/cstdint.hpp>
9 #include <iostream>
10 
11 class CaloHitID {
12 
13 public:
14 
15  CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0,
16  int tSlice=1, bool ignoreTkID=false);
17  CaloHitID(int tSlice=1, bool ignoreTkID=false);
18  CaloHitID(const CaloHitID&);
19  const CaloHitID& operator=(const CaloHitID&);
20  virtual ~CaloHitID();
21 
22  uint32_t unitID() const {return theUnitID;}
23  int timeSliceID() const {return theTimeSliceID;}
24  double timeSlice() const {return theTimeSlice;}
25  int trackID() const {return theTrackID;}
26  uint16_t depth() const {return theDepth;}
27  void setID(uint32_t unitID, double timeSlice, int trackID,
28  uint16_t depth=0);
29  void reset();
30 
31  bool operator==(const CaloHitID& ) const;
32  bool operator<(const CaloHitID& ) const;
33  bool operator>(const CaloHitID& ) const;
34 
35 private:
36 
37  uint32_t theUnitID;
38  double theTimeSlice;
41  uint16_t theDepth;
44 
45 };
46 
47 std::ostream& operator<<(std::ostream&, const CaloHitID&);
48 #endif
bool operator<(const CaloHitID &) const
Definition: CaloHitID.cc:68
bool ignoreTrackID
Definition: CaloHitID.h:43
uint32_t theUnitID
Definition: CaloHitID.h:37
bool operator>(const CaloHitID &) const
Definition: CaloHitID.cc:80
double theTimeSlice
Definition: CaloHitID.h:38
double timeSlice() const
Definition: CaloHitID.h:24
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
uint16_t depth() const
Definition: CaloHitID.h:26
void reset()
Definition: CaloHitID.cc:53
CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0, int tSlice=1, bool ignoreTkID=false)
Definition: CaloHitID.cc:9
int timeSliceUnit
Definition: CaloHitID.h:42
uint16_t theDepth
Definition: CaloHitID.h:41
int timeSliceID() const
Definition: CaloHitID.h:23
bool operator==(const CaloHitID &) const
Definition: CaloHitID.cc:61
int trackID() const
Definition: CaloHitID.h:25
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition: CaloHitID.cc:44
const CaloHitID & operator=(const CaloHitID &)
Definition: CaloHitID.cc:30
virtual ~CaloHitID()
Definition: CaloHitID.cc:42
int theTimeSliceID
Definition: CaloHitID.h:40
int theTrackID
Definition: CaloHitID.h:39
uint32_t unitID() const
Definition: CaloHitID.h:22