00001 #ifndef SimG4CMS_CaloHitID_H 00002 #define SimG4CMS_CaloHitID_H 00004 // File: CaloHitID.h 00005 // HitID class for storing unique identifier of a Calorimetric Hit 00007 00008 #include <boost/cstdint.hpp> 00009 #include <iostream> 00010 00011 class CaloHitID { 00012 00013 public: 00014 00015 CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0); 00016 CaloHitID(); 00017 CaloHitID(const CaloHitID&); 00018 const CaloHitID& operator=(const CaloHitID&); 00019 virtual ~CaloHitID(); 00020 00021 uint32_t unitID() const {return theUnitID;} 00022 int timeSliceID() const {return theTimeSliceID;} 00023 double timeSlice() const {return theTimeSlice;} 00024 int trackID() const {return theTrackID;} 00025 uint16_t depth() const {return theDepth;} 00026 void setID(uint32_t unitID, double timeSlice, int trackID, 00027 uint16_t depth=0); 00028 void reset(); 00029 00030 bool operator==(const CaloHitID& ) const; 00031 bool operator<(const CaloHitID& ) const; 00032 bool operator>(const CaloHitID& ) const; 00033 00034 private: 00035 00036 uint32_t theUnitID; 00037 double theTimeSlice; 00038 int theTrackID; 00039 int theTimeSliceID; 00040 uint16_t theDepth; 00041 00042 }; 00043 00044 std::ostream& operator<<(std::ostream&, const CaloHitID&); 00045 #endif