File indexing completed on 2024-04-06 12:25:46
0001 #ifndef HBHETIMINGSHAPEDFLAG_GUARD_H
0002 #define HBHETIMINGSHAPEDFLAG_GUARD_H
0003
0004 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0005 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
0006 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0007
0008 class HBHETimingShapedFlagSetter {
0009 public:
0010 HBHETimingShapedFlagSetter();
0011 HBHETimingShapedFlagSetter(const std::vector<double>& tfilterEnvelope);
0012 HBHETimingShapedFlagSetter(const std::vector<double>& tfilterEnvelope,
0013 bool ignorelowest,
0014 bool ignorehighest,
0015 double win_offset,
0016 double win_gain);
0017 ~HBHETimingShapedFlagSetter();
0018 void Clear();
0019
0020 void dumpInfo();
0021
0022
0023
0024
0025 int timingStatus(const HBHERecHit& hbhe);
0026
0027
0028
0029
0030 void SetTimingShapedFlags(HBHERecHit& hbhe);
0031
0032 private:
0033
0034
0035
0036 typedef std::map<int, std::pair<double, double> > TfilterEnvelope_t;
0037 TfilterEnvelope_t tfilterEnvelope_;
0038
0039 void makeTfilterEnvelope(const std::vector<double>& v_userEnvelope);
0040
0041 bool ignorelowest_;
0042 bool ignorehighest_;
0043 double win_offset_;
0044 double win_gain_;
0045 };
0046
0047 #endif