File indexing completed on 2024-04-06 12:10:16
0001 #ifndef ElectronEnergyCalibratorRun2_h
0002 #define ElectronEnergyCalibratorRun2_h
0003
0004 #include <TRandom.h>
0005 #include "EgammaAnalysis/ElectronTools/interface/EnergyScaleCorrection_class.h"
0006 #include "EgammaAnalysis/ElectronTools/interface/SimpleElectron.h"
0007 #include "EgammaAnalysis/ElectronTools/interface/EpCombinationTool.h"
0008 #include "FWCore/Utilities/interface/StreamID.h"
0009
0010 #include <vector>
0011
0012 class ElectronEnergyCalibratorRun2 {
0013 public:
0014
0015 ElectronEnergyCalibratorRun2() {}
0016
0017
0018 ElectronEnergyCalibratorRun2(EpCombinationTool &combinator, bool isMC, bool synchronization, std::string);
0019 ~ElectronEnergyCalibratorRun2();
0020
0021
0022
0023 void initPrivateRng(TRandom *rnd);
0024
0025
0026
0027 void calibrate(SimpleElectron &electron, edm::StreamID const &id = edm::StreamID::invalidStreamID()) const;
0028
0029
0030
0031 void calibrate(reco::GsfElectron &electron,
0032 unsigned int runNumber,
0033 edm::StreamID const &id = edm::StreamID::invalidStreamID()) const;
0034
0035 protected:
0036
0037 EpCombinationTool *epCombinationTool_;
0038 bool isMC_, synchronization_;
0039 TRandom *rng_;
0040
0041
0042
0043
0044 double gauss(edm::StreamID const &id) const;
0045 EnergyScaleCorrection_class _correctionRetriever;
0046 };
0047
0048 #endif