00001 #ifndef DATAFORMATS_CALORECHIT_CALORECHIT_H 00002 #define DATAFORMATS_CALORECHIT_CALORECHIT_H 1 00003 00004 #include "DataFormats/DetId/interface/DetId.h" 00005 #include <ostream> 00006 00007 00014 class CaloRecHit { 00015 public: 00016 CaloRecHit(); // for persistence 00017 explicit CaloRecHit(const DetId& id, float energy, float time, uint32_t flags = 0, uint32_t aux=0); 00018 00019 float energy() const { return energy_; } 00020 void setEnergy(float energy) { energy_=energy; } 00021 float time() const { return time_; } 00022 const DetId& detid() const { return id_; } 00023 uint32_t flags() const { return flags_; } 00024 void setFlags(uint32_t flags) { flags_=flags; } 00025 void setFlagField(uint32_t value, int base, int width=1); 00026 uint32_t flagField(int base, int width=1) const; 00027 void setAux(uint32_t value) { aux_=value; } 00028 uint32_t aux() const { return aux_; } 00029 private: 00030 DetId id_; 00031 float energy_; 00032 float time_; 00033 uint32_t flags_; 00034 uint32_t aux_; 00035 }; 00036 00037 std::ostream& operator<<(std::ostream& s, const CaloRecHit& hit); 00038 00039 #endif