Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:25

0001 #ifndef HCALHFSTATUSFROMDIGIS_H
0002 #define HCALHFSTATUSFROMDIGIS_H 1
0003 
0004 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
0005 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0006 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0007 #include "CalibFormats/HcalObjects/interface/HcalCalibrations.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "CalibFormats/HcalObjects/interface/HcalCoderDb.h"
0010 
0011 /** \class HcalHFStatusBitFromDigis
0012     
0013    This class sets status bit in the status words for the revised CaloRecHit objets according to informatino from the digi associated to the hit.
0014     
0015    \author J. Temple -- University of Maryland and E. Yazgan
0016 */
0017 
0018 class HcalHFStatusBitFromDigis {
0019 public:
0020   /** Full featured constructor for HB/HE and HO (HPD-based detectors) */
0021   HcalHFStatusBitFromDigis();
0022   HcalHFStatusBitFromDigis(const edm::ParameterSet& HFDigiTimeParams, const edm::ParameterSet& HFTimeInWindowParams);
0023   // Destructor
0024   ~HcalHFStatusBitFromDigis();
0025 
0026   // The important stuff!  Methods for setting the status flag values
0027   void hfSetFlagFromDigi(HFRecHit& hf, const HFDataFrame& digi, const HcalCoder& coder, const HcalCalibrations& calib);
0028   void resetParamsFromDB(
0029       int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, const std::vector<double>& coef);
0030   void resetFlagTimeSamples(int firstSample, int samplesToAdd, int expectedPeak);
0031 
0032 private:
0033   // variables for cfg files
0034 
0035   // VARIABLES FOR SETTING HFDigiTime FLAG
0036   double minthreshold_;
0037   // Reco Window
0038   int recoFirstSample_;
0039   int recoSamplesToAdd_;
0040   // Special window for Igor's algorithm (not necessarily the same as reco window)
0041   int firstSample_;
0042   int samplesToAdd_;
0043   int expectedPeak_;
0044 
0045   // Coefficients used to determine energy ratio threshold:
0046   // E_peak/(Etotal) > coef0_-exp(coef1_+coef2_*Energy+coef3_*E^2+...)
0047   std::vector<double> coef_;
0048 
0049   // VARIABLES FOR SETTING HFInTimeWindow FLAG
0050   double HFlongwindowEthresh_;
0051   std::vector<double> HFlongwindowMinTime_;
0052   std::vector<double> HFlongwindowMaxTime_;
0053   double HFshortwindowEthresh_;
0054   std::vector<double> HFshortwindowMinTime_;
0055   std::vector<double> HFshortwindowMaxTime_;
0056 };
0057 
0058 #endif