CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoLocalCalo/HcalRecAlgos/interface/HcalHFStatusBitFromDigis.h

Go to the documentation of this file.
00001 #ifndef HCALHFSTATUSFROMDIGIS_H
00002 #define HCALHFSTATUSFROMDIGIS_H 1
00003 
00004 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
00005 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
00006 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalCaloFlagLabels.h"
00007 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "CalibFormats/HcalObjects/interface/HcalCoderDb.h"
00010 
00020 class HcalHFStatusBitFromDigis {
00021 public:
00023   HcalHFStatusBitFromDigis();
00024   HcalHFStatusBitFromDigis(int recoFirstSample,
00025                            int recoSamplesToAdd,
00026                            const edm::ParameterSet& HFDigiTimeParams,
00027                            const edm::ParameterSet& HFTimeInWindowParams);
00028   // Destructor
00029   ~HcalHFStatusBitFromDigis();
00030 
00031   // The important stuff!  Methods for setting the status flag values
00032   void hfSetFlagFromDigi(HFRecHit& hf, const HFDataFrame& digi,
00033                          const HcalCoder& coder,
00034                          const HcalCalibrations& calib);
00035   // Hack for 3_11 processing of HF in both old, new runs
00036   void resetTimeSamples(int firstSample, int samplesToAdd){firstSample_=firstSample; samplesToAdd_=samplesToAdd;}
00037 
00038 private:
00039 
00040   // variables for cfg files
00041 
00042   // VARIABLES FOR SETTING HFDigiTime FLAG
00043   double minthreshold_;
00044   // Reco Window
00045   int recoFirstSample_;
00046   int recoSamplesToAdd_;
00047   // Special window for Igor's algorithm (not necessarily the same as reco window)
00048   int firstSample_;
00049   int samplesToAdd_;
00050   int expectedPeak_;
00051   
00052   // Coefficients used to determine energy ratio threshold:
00053   // E_peak/(Etotal) > coef0_-exp(coef1_+coef2_*Energy)
00054   double coef0_;
00055   double coef1_;
00056   double coef2_;
00057 
00058   // VARIABLES FOR SETTING HFInTimeWindow FLAG
00059   double HFlongwindowEthresh_;
00060   std::vector<double> HFlongwindowMinTime_;
00061   std::vector<double> HFlongwindowMaxTime_;
00062   double HFshortwindowEthresh_;
00063   std::vector<double> HFshortwindowMinTime_;
00064   std::vector<double> HFshortwindowMaxTime_;
00065 };
00066 
00067 #endif