Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:41

0001 #ifndef RecoECAL_ECALClusters_HiEgammaSCEnergyCorrectionAlgo_h_
0002 #define RecoECAL_ECALClusters_HiEgammaSCEnergyCorrectionAlgo_h_
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0006 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
0007 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
0008 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0009 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0010 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0011 #include "DataFormats/DetId/interface/DetId.h"
0012 
0013 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0014 #include "Geometry/CaloTopology/interface/CaloTopology.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterTools.h"
0017 
0018 #include <map>
0019 #include <string>
0020 
0021 class HiEgammaSCEnergyCorrectionAlgo {
0022 public:
0023   // the Verbosity levels
0024   enum VerbosityLevel { pDEBUG = 0, pWARNING = 1, pINFO = 2, pERROR = 3 };
0025 
0026   // public member functions
0027   HiEgammaSCEnergyCorrectionAlgo(float noise, const edm::ParameterSet &pSet, VerbosityLevel verbosity = pERROR);
0028 
0029   // take a SuperCluster and return a corrected SuperCluster
0030   reco::SuperCluster applyCorrection(const reco::SuperCluster &cl,
0031                                      const EcalRecHitCollection &rhc,
0032                                      reco::CaloCluster::AlgoId algoId,
0033                                      const CaloSubdetectorGeometry &geometry,
0034                                      const CaloTopology &topology) const;
0035 
0036 private:
0037   // correction factor as a function of number of crystals,
0038   // BasicCluster algo and location in the detector
0039   float fNCrystals(int nCry, reco::CaloCluster::AlgoId algoId, EcalSubdetector theBase) const;
0040   float fBrem(float widthRatio, reco::CaloCluster::AlgoId algoId, EcalSubdetector theBase) const;
0041   float fEta(float eta, reco::CaloCluster::AlgoId algoId, EcalSubdetector theBase) const;
0042   float fEtEta(float et, float eta, reco::CaloCluster::AlgoId algoId, EcalSubdetector theBase) const;
0043 
0044   // Return the number of crystals in a BasicCluster above
0045   // 2sigma noise level
0046   int nCrystalsGT2Sigma(reco::BasicCluster const &seed, EcalRecHitCollection const &rhc) const;
0047 
0048   const float sigmaElectronicNoise_;
0049 
0050   //  the verbosity level
0051   const VerbosityLevel verbosity_;
0052 
0053   // parameters
0054   const std::vector<double> p_fEta_;
0055   const std::vector<double> p_fBremTh_, p_fBrem_;
0056   const std::vector<double> p_fEtEta_;
0057 
0058   const double minR9Barrel_;
0059   const double minR9Endcap_;
0060   const double maxR9_;
0061 };
0062 
0063 #endif /*RecoECAL_ECALClusters_HiEgammaSCEnergyCorrectionAlgo_h_*/