Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-08-25 23:06:58

0001 #ifndef DATAFORMATS_HCALRECHIT_ZDCRECHIT_H
0002 #define DATAFORMATS_HCALRECHIT_ZDCRECHIT_H 1
0003 
0004 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0005 #include "DataFormats/CaloRecHit/interface/CaloRecHit.h"
0006 
0007 /** \class ZDCRecHit
0008  *  
0009  *\author J. Mans - Minnesota
0010  */
0011 class ZDCRecHit : public CaloRecHit {
0012 public:
0013   typedef HcalZDCDetId key_type;
0014 
0015   ZDCRecHit();
0016   ZDCRecHit(const HcalZDCDetId& id, float energy, float time, float lowGainEnergy);
0017   /// get the id
0018   HcalZDCDetId id() const { return HcalZDCDetId(detid()); }
0019   // follow EcalRecHit method of adding variable flagBits_ to CaloRecHit
0020   float lowGainEnergy() const { return lowGainEnergy_; };
0021 
0022   constexpr inline void setEnergySOIp1(const float en) { energySOIp1_ = en; };
0023   constexpr inline float energySOIp1() const { return energySOIp1_; };  // energy of Slice of Interest plus 1
0024   constexpr inline void setRatioSOIp1(const float ratio) { ratioSOIp1_ = ratio; };
0025   constexpr inline float ratioSOIp1() const {
0026     return ratioSOIp1_;
0027   };  // ratio of Energy of (Slice of Interest)/ (Slice of Interest plus 1)
0028   constexpr inline void setTDCtime(const float time) { TDCtime_ = time; };
0029   constexpr inline float TDCtime() const { return TDCtime_; };
0030   constexpr inline void setChargeWeightedTime(const float time) {
0031     chargeWeightedTime_ = time;
0032   };  // time of activity determined by charged weighted average
0033   constexpr inline float chargeWeightedTime() const { return chargeWeightedTime_; };
0034 
0035 private:
0036   float lowGainEnergy_;
0037   float energySOIp1_;
0038   float ratioSOIp1_;
0039   float TDCtime_;
0040   float chargeWeightedTime_;
0041 };
0042 
0043 std::ostream& operator<<(std::ostream& s, const ZDCRecHit& hit);
0044 
0045 #endif