49 std::vector<double> calibPFSCEle_Fbrem_barrel;
50 std::vector<double> calibPFSCEle_Fbrem_endcap;
51 std::vector<double> calibPFSCEle_barrel;
52 std::vector<double> calibPFSCEle_endcap;
53 usePFSCEleCalib = iConfig.
getParameter<
bool>(
"usePFSCEleCalib");
54 calibPFSCEle_Fbrem_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_barrel");
55 calibPFSCEle_Fbrem_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_endcap");
56 calibPFSCEle_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_barrel");
57 calibPFSCEle_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_endcap");
58 boost::shared_ptr<PFSCEnergyCalibration>
59 thePFSCEnergyCalibration (
new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap,
60 calibPFSCEle_barrel,calibPFSCEle_endcap ));
62 bool useEGammaSupercluster = iConfig.
getParameter<
bool>(
"useEGammaSupercluster");
63 double sumEtEcalIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_barrel");
64 double sumEtEcalIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_endcap");
65 double coneEcalIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneEcalIsoForEgammaSC");
66 double sumPtTrackIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_barrel");
67 double sumPtTrackIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_endcap");
68 double coneTrackIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneTrackIsoForEgammaSC");
69 unsigned int nTrackIsoForEgammaSC = iConfig.
getParameter<
unsigned int>(
"nTrackIsoForEgammaSC");
73 produces<reco::PFCandidateCollection>();
74 produces<reco::PFCandidateEGammaExtraCollection>();
75 produces<reco::CaloClusterCollection>(
"EBEEClusters");
76 produces<reco::CaloClusterCollection>(
"ESClusters");
77 produces<reco::SuperClusterCollection>();
84 string mvaWeightFileEleID
85 = iConfig.
getParameter<
string>(
"pf_electronID_mvaWeightFile");
87 bool applyCrackCorrectionsForElectrons
88 = iConfig.
getParameter<
bool>(
"pf_electronID_crackCorrection");
90 string path_mvaWeightFileEleID;
92 path_mvaWeightFileEleID =
edm::FileInPath ( mvaWeightFileEleID.c_str() ).fullPath();
97 string path_mvaWeightFileConvID;
98 string mvaWeightFileConvID;
99 string path_mvaWeightFileGCorr;
100 string path_mvaWeightFileLCorr;
102 string path_mvaWeightFileRes;
103 double mvaConvCut=-99.;
104 double sumPtTrackIsoForPhoton = 99.;
105 double sumPtTrackIsoSlopeForPhoton = 99.;
108 mvaWeightFileConvID =iConfig.
getParameter<
string>(
"pf_convID_mvaWeightFile");
109 mvaConvCut = iConfig.
getParameter<
double>(
"pf_conv_mvaCut");
110 path_mvaWeightFileConvID =
edm::FileInPath ( mvaWeightFileConvID.c_str() ).fullPath();
111 sumPtTrackIsoForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoForPhoton");
112 sumPtTrackIsoSlopeForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoSlopeForPhoton");
117 if(!useRegressionFromDB_) {
118 string mvaWeightFileLCorr=iConfig.
getParameter<
string>(
"pf_locC_mvaWeightFile");
119 path_mvaWeightFileLCorr =
edm::FileInPath( mvaWeightFileLCorr.c_str() ).fullPath();
120 string mvaWeightFileGCorr=iConfig.
getParameter<
string>(
"pf_GlobC_mvaWeightFile");
121 path_mvaWeightFileGCorr =
edm::FileInPath( mvaWeightFileGCorr.c_str() ).fullPath();
122 string mvaWeightFileRes=iConfig.
getParameter<
string>(
"pf_Res_mvaWeightFile");
123 path_mvaWeightFileRes=
edm::FileInPath(mvaWeightFileRes.c_str()).fullPath();
125 TFile *fgbr =
new TFile(path_mvaWeightFileGCorr.c_str(),
"READ");
127 TFile *fgbr2 =
new TFile(path_mvaWeightFileLCorr.c_str(),
"READ");
129 TFile *fgbr3 =
new TFile(path_mvaWeightFileRes.c_str(),
"READ");
131 LogDebug(
"PFEGammaProducer")<<
"Will set regressions from binary files " <<endl;
143 boost::shared_ptr<PFEnergyCalibration>
159 path_mvaWeightFileEleID,
161 thePFSCEnergyCalibration,
163 sumEtEcalIsoForEgammaSC_barrel,
164 sumEtEcalIsoForEgammaSC_endcap,
165 coneEcalIsoForEgammaSC,
166 sumPtTrackIsoForEgammaSC_barrel,
167 sumPtTrackIsoForEgammaSC_endcap,
168 nTrackIsoForEgammaSC,
169 coneTrackIsoForEgammaSC,
170 applyCrackCorrectionsForElectrons,
173 useEGammaSupercluster,
175 path_mvaWeightFileConvID,
179 sumPtTrackIsoForPhoton,
180 sumPtTrackIsoSlopeForPhoton
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const GBRForest * ReaderRes_
bool useRegressionFromDB_
edm::InputTag inputTagBlocks_
void setPFEGParameters(double mvaEleCut, std::string mvaWeightFileEleID, bool usePFElectrons, const boost::shared_ptr< PFSCEnergyCalibration > &thePFSCEnergyCalibration, const boost::shared_ptr< PFEnergyCalibration > &thePFEnergyCalibration, double sumEtEcalIsoForEgammaSC_barrel, double sumEtEcalIsoForEgammaSC_endcap, double coneEcalIsoForEgammaSC, double sumPtTrackIsoForEgammaSC_barrel, double sumPtTrackIsoForEgammaSC_endcap, unsigned int nTrackIsoForEgammaSC, double coneTrackIsoForEgammaSC, bool applyCrackCorrections, bool usePFSCEleCalib, bool useEGElectrons, bool useEGammaSupercluster, bool usePFPhoton, std::string mvaWeightFileConvID, double mvaConvCut, bool useReg, std::string X0_Map, double sumPtTrackIsoForPhoton, double sumPtTrackIsoSlopeForPhoton)
const GBRForest * ReaderLC_
const GBRForest * ReaderGC_
bool useCalibrationsFromDB_