Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-12 23:42:05

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