File indexing completed on 2024-04-06 12:24:38
0001 #ifndef RecoECAL_ECALClusters_EgammaSCEnergyCorrectionAlgo_h_
0002 #define RecoECAL_ECALClusters_EgammaSCEnergyCorrectionAlgo_h_
0003
0004 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0005 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
0006 #include "DataFormats/CaloRecHit/interface/CaloCluster.h"
0007 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0008 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0009 #include "DataFormats/DetId/interface/DetId.h"
0010
0011 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0012 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h"
0013
0014 #include <functional>
0015 #include <map>
0016 #include <string>
0017
0018 class EgammaSCEnergyCorrectionAlgo {
0019 public:
0020 using BasicClusterFunction = std::function<float(reco::BasicCluster const&, EcalRecHitCollection const&)>;
0021
0022
0023 EgammaSCEnergyCorrectionAlgo(float noise);
0024
0025
0026 reco::SuperCluster applyCorrection(const reco::SuperCluster& cl,
0027 const EcalRecHitCollection& rhc,
0028 reco::CaloCluster::AlgoId theAlgo,
0029 const CaloSubdetectorGeometry* geometry,
0030 EcalClusterFunctionBaseClass* energyCorrectionFunction,
0031 std::string energyCorrectorName_,
0032 int modeEB_,
0033 int modeEE_);
0034
0035
0036 static reco::SuperCluster applyCrackCorrection(const reco::SuperCluster& cl,
0037 EcalClusterFunctionBaseClass* crackCorrectionFunction);
0038
0039
0040
0041 static reco::SuperCluster applyLocalContCorrection(const reco::SuperCluster& cl,
0042 BasicClusterFunction localContCorrectionFunction);
0043
0044 private:
0045
0046
0047 float fNCrystals(int nCry, reco::CaloCluster::AlgoId theAlgo, EcalSubdetector theBase) const;
0048
0049
0050
0051 int nCrystalsGT2Sigma(reco::BasicCluster const& seed, EcalRecHitCollection const& rhc) const;
0052
0053 float sigmaElectronicNoise_;
0054 };
0055
0056 #endif