Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:46

0001 #ifndef GUARD_HCALHF_S9S1ALGORITHM_H
0002 #define GUARD_HCALHF_S9S1ALGORITHM_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 
0008 // Forward declarations
0009 class HcalChannelQuality;
0010 class HcalSeverityLevelComputer;
0011 
0012 /**  \class HcalHF_S9S1algorithm
0013 
0014    Class evaluates the ratio |(L-S)/(L+S)| for a given cell, and flags the 
0015    cell if the threshold exceeds a given maximum value R(Energy).
0016    Each cell must also pass ieta-dependent energy and ET cuts to be considered for flagging.
0017 
0018    \author J. Temple and D. Ferencek
0019 */
0020 
0021 class HcalHF_S9S1algorithm {
0022 public:
0023   /** Constructors **/
0024   HcalHF_S9S1algorithm();
0025 
0026   HcalHF_S9S1algorithm(const std::vector<double>& short_optimumSlope,
0027                        const std::vector<double>& short_Energy,
0028                        const std::vector<double>& short_ET,
0029                        const std::vector<double>& long_optimumSlope,
0030                        const std::vector<double>& long_Energy,
0031                        const std::vector<double>& long_ET,
0032                        int HcalAcceptSeverityLevel,
0033                        bool isS8S1);
0034 
0035   // Destructor
0036   ~HcalHF_S9S1algorithm();
0037 
0038   void HFSetFlagFromS9S1(HFRecHit& hf,
0039                          HFRecHitCollection& rec,
0040                          const HcalChannelQuality* myqual,
0041                          const HcalSeverityLevelComputer* mySeverity);
0042   double CalcSlope(int abs_ieta, const std::vector<double>& params);
0043   double CalcEnergyThreshold(double abs_energy, const std::vector<double>& params);
0044 
0045   double bit() { return HcalCaloFlagLabels::HFLongShort; }
0046 
0047 private:
0048   std::vector<double> short_ET_;
0049   std::vector<double> short_Energy_;
0050   std::vector<double> long_ET_;
0051   std::vector<double> long_Energy_;
0052 
0053   std::vector<double> LongSlopes;
0054   std::vector<double> ShortSlopes;
0055   std::vector<double> LongEnergyThreshold;
0056   std::vector<double> ShortEnergyThreshold;
0057   std::vector<double> LongETThreshold;
0058   std::vector<double> ShortETThreshold;
0059   int HcalAcceptSeverityLevel_;
0060   bool isS8S1_;
0061 };
0062 
0063 #endif