CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/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(const edm::ParameterSet& HFDigiTimeParams,
00025                            const edm::ParameterSet& HFTimeInWindowParams);
00026   // Destructor
00027   ~HcalHFStatusBitFromDigis();
00028 
00029   // The important stuff!  Methods for setting the status flag values
00030   void hfSetFlagFromDigi(HFRecHit& hf, const HFDataFrame& digi,
00031                          const HcalCoder& coder,
00032                          const HcalCalibrations& calib);
00033   void resetParamsFromDB(int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, std::vector<double> coef);
00034   void resetFlagTimeSamples(int firstSample, int samplesToAdd, int expectedPeak);
00035 
00036 private:
00037 
00038   // variables for cfg files
00039 
00040   // VARIABLES FOR SETTING HFDigiTime FLAG
00041   double minthreshold_;
00042   // Reco Window
00043   int recoFirstSample_;
00044   int recoSamplesToAdd_;
00045   // Special window for Igor's algorithm (not necessarily the same as reco window)
00046   int firstSample_;
00047   int samplesToAdd_;
00048   int expectedPeak_;
00049   
00050   // Coefficients used to determine energy ratio threshold:
00051   // E_peak/(Etotal) > coef0_-exp(coef1_+coef2_*Energy+coef3_*E^2+...)
00052   std::vector<double> coef_;
00053 
00054 
00055   // VARIABLES FOR SETTING HFInTimeWindow FLAG
00056   double HFlongwindowEthresh_;
00057   std::vector<double> HFlongwindowMinTime_;
00058   std::vector<double> HFlongwindowMaxTime_;
00059   double HFshortwindowEthresh_;
00060   std::vector<double> HFshortwindowMinTime_;
00061   std::vector<double> HFshortwindowMaxTime_;
00062 };
00063 
00064 #endif