30 std::vector<double> calibHF_eta_step;
31 std::vector<double> calibHF_a_EMonly;
32 std::vector<double> calibHF_b_HADonly;
33 std::vector<double> calibHF_a_EMHAD;
34 std::vector<double> calibHF_b_EMHAD;
36 calibHF_eta_step = iConfig.
getParameter<std::vector<double> >(
"calibHF_eta_step");
37 calibHF_a_EMonly = iConfig.
getParameter<std::vector<double> >(
"calibHF_a_EMonly");
38 calibHF_b_HADonly = iConfig.
getParameter<std::vector<double> >(
"calibHF_b_HADonly");
39 calibHF_a_EMHAD = iConfig.
getParameter<std::vector<double> >(
"calibHF_a_EMHAD");
40 calibHF_b_EMHAD = iConfig.
getParameter<std::vector<double> >(
"calibHF_b_EMHAD");
41 boost::shared_ptr<PFEnergyCalibrationHF>
42 thepfEnergyCalibrationHF (
new PFEnergyCalibrationHF(calibHF_use,calibHF_eta_step,calibHF_a_EMonly,calibHF_b_HADonly,calibHF_a_EMHAD,calibHF_b_EMHAD) ) ;
52 if( iConfig.
existsAs<
bool>(
"useEGammaFilters") ) {
71 usePFPhotons_ =
false;
92 std::vector<double> calibPFSCEle_Fbrem_barrel;
93 std::vector<double> calibPFSCEle_Fbrem_endcap;
94 std::vector<double> calibPFSCEle_barrel;
95 std::vector<double> calibPFSCEle_endcap;
96 usePFSCEleCalib = iConfig.
getParameter<
bool>(
"usePFSCEleCalib");
97 calibPFSCEle_Fbrem_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_barrel");
98 calibPFSCEle_Fbrem_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_endcap");
99 calibPFSCEle_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_barrel");
100 calibPFSCEle_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_endcap");
101 boost::shared_ptr<PFSCEnergyCalibration>
102 thePFSCEnergyCalibration (
new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap,
103 calibPFSCEle_barrel,calibPFSCEle_endcap ));
105 bool useEGammaSupercluster = iConfig.
getParameter<
bool>(
"useEGammaSupercluster");
106 double sumEtEcalIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_barrel");
107 double sumEtEcalIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_endcap");
108 double coneEcalIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneEcalIsoForEgammaSC");
109 double sumPtTrackIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_barrel");
110 double sumPtTrackIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_endcap");
111 double coneTrackIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneTrackIsoForEgammaSC");
112 unsigned int nTrackIsoForEgammaSC = iConfig.
getParameter<
unsigned int>(
"nTrackIsoForEgammaSC");
116 produces<reco::PFCandidateCollection>();
117 produces<reco::PFCandidateCollection>(
"CleanedHF");
118 produces<reco::PFCandidateCollection>(
"CleanedCosmicsMuons");
119 produces<reco::PFCandidateCollection>(
"CleanedTrackerAndGlobalMuons");
120 produces<reco::PFCandidateCollection>(
"CleanedFakeMuons");
121 produces<reco::PFCandidateCollection>(
"CleanedPunchThroughMuons");
122 produces<reco::PFCandidateCollection>(
"CleanedPunchThroughNeutralHadrons");
123 produces<reco::PFCandidateCollection>(
"AddedMuonsAndHadrons");
146 string mvaWeightFileEleID
147 = iConfig.
getParameter<
string>(
"pf_electronID_mvaWeightFile");
149 bool applyCrackCorrectionsForElectrons
150 = iConfig.
getParameter<
bool>(
"pf_electronID_crackCorrection");
152 string path_mvaWeightFileEleID;
160 string path_mvaWeightFileConvID;
161 string mvaWeightFileConvID;
162 string path_mvaWeightFileGCorr;
163 string path_mvaWeightFileLCorr;
165 string path_mvaWeightFileRes;
166 double mvaConvCut=-99.;
167 double sumPtTrackIsoForPhoton = 99.;
168 double sumPtTrackIsoSlopeForPhoton = 99.;
172 mvaWeightFileConvID =iConfig.
getParameter<
string>(
"pf_convID_mvaWeightFile");
173 mvaConvCut = iConfig.
getParameter<
double>(
"pf_conv_mvaCut");
175 sumPtTrackIsoForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoForPhoton");
176 sumPtTrackIsoSlopeForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoSlopeForPhoton");
182 string mvaWeightFileLCorr=iConfig.
getParameter<
string>(
"pf_locC_mvaWeightFile");
184 string mvaWeightFileGCorr=iConfig.
getParameter<
string>(
"pf_GlobC_mvaWeightFile");
186 string mvaWeightFileRes=iConfig.
getParameter<
string>(
"pf_Res_mvaWeightFile");
189 TFile *fgbr =
new TFile(path_mvaWeightFileGCorr.c_str(),
"READ");
191 TFile *fgbr2 =
new TFile(path_mvaWeightFileLCorr.c_str(),
"READ");
193 TFile *fgbr3 =
new TFile(path_mvaWeightFileRes.c_str(),
"READ");
195 LogDebug(
"PFProducer")<<
"Will set regressions from binary files " <<endl;
202 bool useProtectionsForJetMET(
false);
203 double ele_iso_pt(0.0), ele_iso_mva_barrel(0.0), ele_iso_mva_endcap(0.0),
204 ele_iso_combIso_barrel(0.0), ele_iso_combIso_endcap(0.0),
206 unsigned int ele_missinghits(0);
207 double ph_MinEt(0.0), ph_combIso(0.0), ph_HoE(0.0),
208 ph_sietaieta_eb(0.0),ph_sietaieta_ee(0.0);
209 string ele_iso_mvaWeightFile(
""), ele_iso_path_mvaWeightFile(
"");
214 ele_iso_mvaWeightFile = iConfig.
getParameter<
string>(
"isolatedElectronID_mvaWeightFile");
219 ele_iso_pt = iConfig.
getParameter<
double>(
"electron_iso_pt");
220 ele_iso_mva_barrel = iConfig.
getParameter<
double>(
"electron_iso_mva_barrel");
221 ele_iso_mva_endcap = iConfig.
getParameter<
double>(
"electron_iso_mva_endcap");
222 ele_iso_combIso_barrel = iConfig.
getParameter<
double>(
"electron_iso_combIso_barrel");
223 ele_iso_combIso_endcap = iConfig.
getParameter<
double>(
"electron_iso_combIso_endcap");
224 ele_noniso_mva = iConfig.
getParameter<
double>(
"electron_noniso_mvaCut");
225 ele_missinghits = iConfig.
getParameter<
unsigned int>(
"electron_missinghits");
226 ph_MinEt = iConfig.
getParameter<
double>(
"photon_MinEt");
227 ph_combIso = iConfig.
getParameter<
double>(
"photon_combIso");
229 ph_sietaieta_eb = iConfig.
getParameter<
double>(
"photon_SigmaiEtaiEta_barrel");
230 ph_sietaieta_ee = iConfig.
getParameter<
double>(
"photon_SigmaiEtaiEta_endcap");
231 useProtectionsForJetMET =
233 ele_protectionsForJetMET =
235 ph_protectionsForJetMET =
241 bool rejectTracks_Bad
244 bool rejectTracks_Step45
247 bool usePFNuclearInteractions
248 = iConfig.
getParameter<
bool>(
"usePFNuclearInteractions");
250 bool usePFConversions
256 double dptRel_DispVtx
268 boost::shared_ptr<PFEnergyCalibration>
282 pfAlgo_->setParameters( nSigmaECAL,
285 thepfEnergyCalibrationHF);
288 pfAlgo_->setPFEleParameters(mvaEleCut,
289 path_mvaWeightFileEleID,
291 thePFSCEnergyCalibration,
293 sumEtEcalIsoForEgammaSC_barrel,
294 sumEtEcalIsoForEgammaSC_endcap,
295 coneEcalIsoForEgammaSC,
296 sumPtTrackIsoForEgammaSC_barrel,
297 sumPtTrackIsoForEgammaSC_endcap,
298 nTrackIsoForEgammaSC,
299 coneTrackIsoForEgammaSC,
300 applyCrackCorrectionsForElectrons,
303 useEGammaSupercluster);
308 pfAlgo_->setPFPhotonParameters(usePFPhotons_,
309 path_mvaWeightFileConvID,
314 sumPtTrackIsoForPhoton,
315 sumPtTrackIsoSlopeForPhoton);
320 ele_iso_path_mvaWeightFile,
324 ele_iso_combIso_barrel,
325 ele_iso_combIso_endcap,
328 useProtectionsForJetMET,
329 ele_protectionsForJetMET,
335 ph_protectionsForJetMET);
339 pfAlgo_->setDisplacedVerticesParameters(rejectTracks_Bad,
341 usePFNuclearInteractions,
346 if (usePFNuclearInteractions)
347 pfAlgo_->setCandConnectorParameters( iCfgCandConnector );
352 pfAlgo_->setPFMuonAndFakeParameters(iConfig);
357 double minHFCleaningPt
359 double minSignificance
361 double maxSignificance
363 double minSignificanceReduction
364 = iConfig.
getParameter<
double>(
"minSignificanceReduction");
371 pfAlgo_->setPostHFCleaningParameters(postHFCleaning,
375 minSignificanceReduction,
380 std::vector<edm::InputTag>
tags =iConfig.
getParameter< std::vector<edm::InputTag> >(
"cleanedHF");
381 for (
unsigned int i=0;
i<tags.size();++
i)
std::vector< edm::EDGetTokenT< reco::PFRecHitCollection > > inputTagCleanedHF_
const GBRForest * ReaderRes_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string photonExtraOutputCol_
edm::EDGetTokenT< reco::MuonCollection > inputTagMuons_
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::auto_ptr< PFAlgo > pfAlgo_
particle flow algorithm
const GBRForest * ReaderLC_
bool useCalibrationsFromDB_
edm::EDGetTokenT< reco::VertexCollection > vertices_
bool useVerticesForNeutral_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > inputTagPFEGammaCandidates_
edm::EDGetTokenT< reco::PFBlockCollection > inputTagBlocks_
bool useRegressionFromDB_
std::string electronOutputCol_
std::string electronExtraOutputCol_
edm::EDGetTokenT< edm::ValueMap< reco::PhotonRef > > inputTagValueMapGedPhotons_
volatile std::atomic< bool > shutdown_flag false
edm::EDGetTokenT< reco::GsfElectronCollection > inputTagEgammaElectrons_
edm::EDGetTokenT< edm::ValueMap< reco::GsfElectronRef > > inputTagValueMapGedElectrons_
const GBRForest * ReaderGC_