Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HCALHFSTATUSBITFROMRECHITS_H
0002 #define HCALHFSTATUSBITFROMRECHITS_H 1
0003 
0004 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0005 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0006 #include "DataFormats/METReco/interface/HcalCaloFlagLabels.h"
0007 #include "CondFormats/HcalObjects/interface/HcalChannelQuality.h"
0008 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputer.h"
0009 #include "RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputerRcd.h"
0010 
0011 /** \class HcalHFStatusBitFromRecHits
0012     
0013    This class sets status bit in the status words for the revised CaloRecHit objets using comparisons between the rec hit energies of long and short fibers for a given HF (ieat, iphi)
0014     
0015    \author J. Temple -- University of Maryland and E. Yazgan
0016 */
0017 
0018 class HcalHFStatusBitFromRecHits {
0019 public:
0020   /** Full featured constructor for HB/HE and HO (HPD-based detectors) */
0021   HcalHFStatusBitFromRecHits();
0022   HcalHFStatusBitFromRecHits(double shortR, double shortET, double shortE, double longR, double longET, double longE);
0023 
0024   // Destructor
0025   ~HcalHFStatusBitFromRecHits();
0026 
0027   // The important stuff!  Methods for setting the status flag values
0028   void hfSetFlagFromRecHits(HFRecHitCollection& rec,
0029                             HcalChannelQuality* myqual,
0030                             const HcalSeverityLevelComputer* mySeverity);
0031 
0032   // getter functions
0033   double long_hflongshortratio() { return long_HFlongshortratio_; }
0034   double long_energythreshold() { return long_thresholdEnergy_; }
0035   double long_ETthreshold() { return long_thresholdET_; }
0036   double short_hflongshortratio() { return short_HFlongshortratio_; }
0037   double short_energythreshold() { return short_thresholdEnergy_; }
0038   double short_ETthreshold() { return short_thresholdET_; }
0039 
0040   double bit() { return HcalCaloFlagLabels::HFLongShort; }
0041 
0042   // setter functions
0043   void set_long_hflongshortratio(double x) {
0044     long_HFlongshortratio_ = x;
0045     return;
0046   }
0047   void set_long_energythreshold(double x) {
0048     long_thresholdEnergy_ = x;
0049     return;
0050   }
0051   void set_long_ETthreshold(double x) {
0052     long_thresholdET_ = x;
0053     return;
0054   }
0055   void set_short_hflongshortratio(double x) {
0056     short_HFlongshortratio_ = x;
0057     return;
0058   }
0059   void set_short_energythreshold(double x) {
0060     short_thresholdEnergy_ = x;
0061     return;
0062   }
0063   void set_short_ETthreshold(double x) {
0064     short_thresholdET_ = x;
0065     return;
0066   }
0067 
0068 private:
0069   // variables for cfg files
0070   double long_HFlongshortratio_;
0071   double long_thresholdET_;  // minimum energy needed before the noise algorithm is run
0072   double long_thresholdEnergy_;
0073   double short_HFlongshortratio_;
0074   double short_thresholdET_;  // minimum energy needed before the noise algorithm is run
0075   double short_thresholdEnergy_;
0076 };
0077 
0078 #endif