CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/RecoLocalCalo/HcalRecAlgos/interface/HBHETimingShapedFlag.h

Go to the documentation of this file.
00001 #ifndef HBHETIMINGSHAPEDFLAG_GUARD_H
00002 #define HBHETIMINGSHAPEDFLAG_GUARD_H
00003 
00004 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00005 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
00006 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalCaloFlagLabels.h"
00007 
00008 
00009 class HBHETimingShapedFlagSetter {
00010  public:
00011   HBHETimingShapedFlagSetter();
00012   HBHETimingShapedFlagSetter(const std::vector<double>& tfilterEnvelope);
00013   HBHETimingShapedFlagSetter(const std::vector<double>& tfilterEnvelope,
00014                              bool ignorelowest,
00015                              bool ignorehighest,
00016                              double win_offset,
00017                              double win_gain);
00018   ~HBHETimingShapedFlagSetter();
00019   void Clear();
00020 
00021   void dumpInfo();
00022 
00023   // returns status suitable for flag setting
00024   // This routine made available for reflagger code
00025   //
00026   int timingStatus(const HBHERecHit& hbhe);
00027 
00028   // Sets "HBHETimingShapedCutsBits" field in response to output
00029   // from "timingStatus()"
00030   //
00031   void SetTimingShapedFlags(HBHERecHit& hbhe);
00032 
00033  private:
00034   // key   = integer GeV (to avoid FP issues),
00035   // value = low/high values for timing in ns
00036   //
00037   typedef std::map<int,std::pair<double,double> > TfilterEnvelope_t;
00038   TfilterEnvelope_t tfilterEnvelope_;
00039 
00040   void makeTfilterEnvelope(std::vector<double> v_userEnvelope);
00041 
00042   bool ignorelowest_;
00043   bool ignorehighest_;
00044   double win_offset_;
00045   double win_gain_;
00046 };
00047 
00048 #endif