Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:40

0001 #ifndef RecoEcal_EgammaClusterProducers_EcalBasicClusterLocalContCorrection_h_
0002 #define RecoEcal_EgammaClusterProducers_EcalBasicClusterLocalContCorrection_h_
0003 
0004 /** \class EcalBasicClusterLocalContCorrection
0005   *  Function to correct em object energy for energy not contained in a 5x5 crystal area in the calorimeter
0006   *
0007   *  $Id: EcalBasicClusterLocalContCorrection.h
0008   *  $Date:
0009   *  $Revision:
0010   *  \author Federico Ferri, CEA Saclay, November 2008
0011   */
0012 
0013 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0014 #include "DataFormats/EgammaReco/interface/BasicCluster.h"
0015 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0016 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0017 #include "CondFormats/DataRecord/interface/EcalClusterLocalContCorrParametersRcd.h"
0018 #include "CondFormats/EcalObjects/interface/EcalClusterLocalContCorrParameters.h"
0019 #include "FWCore/Framework/interface/ConsumesCollector.h"
0020 #include "FWCore/Framework/interface/EventSetup.h"
0021 
0022 class EcalBasicClusterLocalContCorrection {
0023 public:
0024   EcalBasicClusterLocalContCorrection(edm::ConsumesCollector &&cc);
0025 
0026   // check initialization
0027   void checkInit() const;
0028 
0029   // compute the correction
0030   float operator()(const reco::BasicCluster &, const EcalRecHitCollection &) const;
0031 
0032   // set parameters
0033   void init(const edm::EventSetup &es);
0034 
0035 private:
0036   int getEcalModule(DetId id) const;
0037 
0038   const edm::ESGetToken<EcalClusterLocalContCorrParameters, EcalClusterLocalContCorrParametersRcd> paramsToken_;
0039   const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeometryToken_;
0040 
0041   EcalClusterLocalContCorrParameters const *params_;
0042   CaloGeometry const *caloGeometry_;
0043 };
0044 
0045 #endif