Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:38

0001 #ifndef DATAFORMATS_HCALRECHIT_HFRECHIT_H
0002 #define DATAFORMATS_HCALRECHIT_HFRECHIT_H 1
0003 
0004 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0005 #include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
0006 
0007 /** \class HFRecHit
0008  *  
0009  *\author J. Mans - Minnesota
0010  */
0011 class HFRecHit : public CaloRecHit {
0012 public:
0013   typedef HcalDetId key_type;
0014 
0015   constexpr HFRecHit() : CaloRecHit(), timeFalling_(0.f), auxHF_(0) {}
0016 
0017   //HFRecHit(const HcalDetId& id, float energy, float time);
0018   /// get the id
0019   constexpr HFRecHit(const HcalDetId& id, float en, float timeRising, float timeFalling = 0)
0020       : CaloRecHit(id, en, timeRising), timeFalling_(timeFalling), auxHF_(0) {}
0021 
0022   /// get the amplitude (generally fC, but can vary)
0023   /// get the hit time
0024   constexpr float timeFalling() const { return timeFalling_; }
0025   constexpr void setTimeFalling(float timeFalling) { timeFalling_ = timeFalling; }
0026   constexpr HcalDetId id() const { return HcalDetId(detid()); }
0027 
0028   constexpr void setAuxHF(const uint32_t u) { auxHF_ = u; }
0029   constexpr uint32_t getAuxHF() const { return auxHF_; }
0030 
0031 private:
0032   float timeFalling_;
0033   uint32_t auxHF_;
0034 };
0035 
0036 std::ostream& operator<<(std::ostream& s, const HFRecHit& hit);
0037 
0038 #endif