37 std::vector<double> calibHF_eta_step;
38 std::vector<double> calibHF_a_EMonly;
39 std::vector<double> calibHF_b_HADonly;
40 std::vector<double> calibHF_a_EMHAD;
41 std::vector<double> calibHF_b_EMHAD;
43 calibHF_eta_step = iConfig.
getParameter<std::vector<double> >(
"calibHF_eta_step");
44 calibHF_a_EMonly = iConfig.
getParameter<std::vector<double> >(
"calibHF_a_EMonly");
45 calibHF_b_HADonly = iConfig.
getParameter<std::vector<double> >(
"calibHF_b_HADonly");
46 calibHF_a_EMHAD = iConfig.
getParameter<std::vector<double> >(
"calibHF_a_EMHAD");
47 calibHF_b_EMHAD = iConfig.
getParameter<std::vector<double> >(
"calibHF_b_EMHAD");
48 boost::shared_ptr<PFEnergyCalibrationHF>
49 thepfEnergyCalibrationHF (
new PFEnergyCalibrationHF(calibHF_use,calibHF_eta_step,calibHF_a_EMonly,calibHF_b_HADonly,calibHF_a_EMHAD,calibHF_b_EMHAD) ) ;
61 if( iConfig.
existsAs<
bool>(
"useEGammaFilters") ) {
80 usePFPhotons_ =
false;
100 bool usePFSCEleCalib;
101 std::vector<double> calibPFSCEle_Fbrem_barrel;
102 std::vector<double> calibPFSCEle_Fbrem_endcap;
103 std::vector<double> calibPFSCEle_barrel;
104 std::vector<double> calibPFSCEle_endcap;
105 usePFSCEleCalib = iConfig.
getParameter<
bool>(
"usePFSCEleCalib");
106 calibPFSCEle_Fbrem_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_barrel");
107 calibPFSCEle_Fbrem_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_Fbrem_endcap");
108 calibPFSCEle_barrel = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_barrel");
109 calibPFSCEle_endcap = iConfig.
getParameter<std::vector<double> >(
"calibPFSCEle_endcap");
110 boost::shared_ptr<PFSCEnergyCalibration>
111 thePFSCEnergyCalibration (
new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap,
112 calibPFSCEle_barrel,calibPFSCEle_endcap ));
114 bool useEGammaSupercluster = iConfig.
getParameter<
bool>(
"useEGammaSupercluster");
115 double sumEtEcalIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_barrel");
116 double sumEtEcalIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumEtEcalIsoForEgammaSC_endcap");
117 double coneEcalIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneEcalIsoForEgammaSC");
118 double sumPtTrackIsoForEgammaSC_barrel = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_barrel");
119 double sumPtTrackIsoForEgammaSC_endcap = iConfig.
getParameter<
double>(
"sumPtTrackIsoForEgammaSC_endcap");
120 double coneTrackIsoForEgammaSC = iConfig.
getParameter<
double>(
"coneTrackIsoForEgammaSC");
121 unsigned int nTrackIsoForEgammaSC = iConfig.
getParameter<
unsigned int>(
"nTrackIsoForEgammaSC");
125 produces<reco::PFCandidateCollection>();
126 produces<reco::PFCandidateCollection>(
"CleanedHF");
127 produces<reco::PFCandidateCollection>(
"CleanedCosmicsMuons");
128 produces<reco::PFCandidateCollection>(
"CleanedTrackerAndGlobalMuons");
129 produces<reco::PFCandidateCollection>(
"CleanedFakeMuons");
130 produces<reco::PFCandidateCollection>(
"CleanedPunchThroughMuons");
131 produces<reco::PFCandidateCollection>(
"CleanedPunchThroughNeutralHadrons");
132 produces<reco::PFCandidateCollection>(
"AddedMuonsAndHadrons");
155 string mvaWeightFileEleID
156 = iConfig.
getParameter<
string>(
"pf_electronID_mvaWeightFile");
158 bool applyCrackCorrectionsForElectrons
159 = iConfig.
getParameter<
bool>(
"pf_electronID_crackCorrection");
161 string path_mvaWeightFileEleID;
164 path_mvaWeightFileEleID =
edm::FileInPath ( mvaWeightFileEleID.c_str() ).fullPath();
169 string path_mvaWeightFileConvID;
170 string mvaWeightFileConvID;
171 string path_mvaWeightFileGCorr;
172 string path_mvaWeightFileLCorr;
174 string path_mvaWeightFileRes;
175 double mvaConvCut=-99.;
176 double sumPtTrackIsoForPhoton = 99.;
177 double sumPtTrackIsoSlopeForPhoton = 99.;
181 mvaWeightFileConvID =iConfig.
getParameter<
string>(
"pf_convID_mvaWeightFile");
182 mvaConvCut = iConfig.
getParameter<
double>(
"pf_conv_mvaCut");
183 path_mvaWeightFileConvID =
edm::FileInPath ( mvaWeightFileConvID.c_str() ).fullPath();
184 sumPtTrackIsoForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoForPhoton");
185 sumPtTrackIsoSlopeForPhoton = iConfig.
getParameter<
double>(
"sumPtTrackIsoSlopeForPhoton");
191 string mvaWeightFileLCorr=iConfig.
getParameter<
string>(
"pf_locC_mvaWeightFile");
192 path_mvaWeightFileLCorr =
edm::FileInPath( mvaWeightFileLCorr.c_str() ).fullPath();
193 string mvaWeightFileGCorr=iConfig.
getParameter<
string>(
"pf_GlobC_mvaWeightFile");
194 path_mvaWeightFileGCorr =
edm::FileInPath( mvaWeightFileGCorr.c_str() ).fullPath();
195 string mvaWeightFileRes=iConfig.
getParameter<
string>(
"pf_Res_mvaWeightFile");
196 path_mvaWeightFileRes=
edm::FileInPath(mvaWeightFileRes.c_str()).fullPath();
198 TFile *fgbr =
new TFile(path_mvaWeightFileGCorr.c_str(),
"READ");
200 TFile *fgbr2 =
new TFile(path_mvaWeightFileLCorr.c_str(),
"READ");
202 TFile *fgbr3 =
new TFile(path_mvaWeightFileRes.c_str(),
"READ");
204 LogDebug(
"PFProducer")<<
"Will set regressions from binary files " <<endl;
211 bool useProtectionsForJetMET(
false);
212 double ele_iso_pt(0.0), ele_iso_mva_barrel(0.0), ele_iso_mva_endcap(0.0),
213 ele_iso_combIso_barrel(0.0), ele_iso_combIso_endcap(0.0),
215 unsigned int ele_missinghits(0);
216 double ph_MinEt(0.0), ph_combIso(0.0), ph_HoE(0.0),
217 ph_sietaieta_eb(0.0),ph_sietaieta_ee(0.0);
218 string ele_iso_mvaWeightFile(
""), ele_iso_path_mvaWeightFile(
"");
223 ele_iso_mvaWeightFile = iConfig.
getParameter<
string>(
"isolatedElectronID_mvaWeightFile");
224 ele_iso_path_mvaWeightFile =
edm::FileInPath ( ele_iso_mvaWeightFile.c_str() ).fullPath();
228 ele_iso_pt = iConfig.
getParameter<
double>(
"electron_iso_pt");
229 ele_iso_mva_barrel = iConfig.
getParameter<
double>(
"electron_iso_mva_barrel");
230 ele_iso_mva_endcap = iConfig.
getParameter<
double>(
"electron_iso_mva_endcap");
231 ele_iso_combIso_barrel = iConfig.
getParameter<
double>(
"electron_iso_combIso_barrel");
232 ele_iso_combIso_endcap = iConfig.
getParameter<
double>(
"electron_iso_combIso_endcap");
233 ele_noniso_mva = iConfig.
getParameter<
double>(
"electron_noniso_mvaCut");
234 ele_missinghits = iConfig.
getParameter<
unsigned int>(
"electron_missinghits");
235 ph_MinEt = iConfig.
getParameter<
double>(
"photon_MinEt");
236 ph_combIso = iConfig.
getParameter<
double>(
"photon_combIso");
238 ph_sietaieta_eb = iConfig.
getParameter<
double>(
"photon_SigmaiEtaiEta_barrel");
239 ph_sietaieta_ee = iConfig.
getParameter<
double>(
"photon_SigmaiEtaiEta_endcap");
240 useProtectionsForJetMET =
242 ele_protectionsForJetMET =
244 ph_protectionsForJetMET =
250 bool rejectTracks_Bad
253 bool rejectTracks_Step45
256 bool usePFNuclearInteractions
257 = iConfig.
getParameter<
bool>(
"usePFNuclearInteractions");
259 bool usePFConversions
265 double dptRel_DispVtx
277 boost::shared_ptr<PFEnergyCalibration>
291 pfAlgo_->setParameters( nSigmaECAL,
294 thepfEnergyCalibrationHF);
297 pfAlgo_->setPFEleParameters(mvaEleCut,
298 path_mvaWeightFileEleID,
300 thePFSCEnergyCalibration,
302 sumEtEcalIsoForEgammaSC_barrel,
303 sumEtEcalIsoForEgammaSC_endcap,
304 coneEcalIsoForEgammaSC,
305 sumPtTrackIsoForEgammaSC_barrel,
306 sumPtTrackIsoForEgammaSC_endcap,
307 nTrackIsoForEgammaSC,
308 coneTrackIsoForEgammaSC,
309 applyCrackCorrectionsForElectrons,
312 useEGammaSupercluster);
317 pfAlgo_->setPFPhotonParameters(usePFPhotons_,
318 path_mvaWeightFileConvID,
323 sumPtTrackIsoForPhoton,
324 sumPtTrackIsoSlopeForPhoton);
329 ele_iso_path_mvaWeightFile,
333 ele_iso_combIso_barrel,
334 ele_iso_combIso_endcap,
337 useProtectionsForJetMET,
338 ele_protectionsForJetMET,
344 ph_protectionsForJetMET);
348 pfAlgo_->setDisplacedVerticesParameters(rejectTracks_Bad,
350 usePFNuclearInteractions,
355 if (usePFNuclearInteractions)
356 pfAlgo_->setCandConnectorParameters( iCfgCandConnector );
361 pfAlgo_->setPFMuonAndFakeParameters(iConfig);
366 double minHFCleaningPt
368 double minSignificance
370 double maxSignificance
372 double minSignificanceReduction
373 = iConfig.
getParameter<
double>(
"minSignificanceReduction");
380 pfAlgo_->setPostHFCleaningParameters(postHFCleaning,
384 minSignificanceReduction,
390 = iConfig.
getParameter< std::vector<edm::InputTag> >(
"cleanedHF");
const GBRForest * ReaderRes_
T getParameter(std::string const &) const
edm::InputTag inputTagValueMapGedPhotons_
T getUntrackedParameter(std::string const &, T const &) const
std::string photonExtraOutputCol_
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
edm::InputTag inputTagMuons_
const GBRForest * ReaderLC_
std::vector< edm::InputTag > inputTagCleanedHF_
bool useCalibrationsFromDB_
bool useVerticesForNeutral_
edm::InputTag inputTagValueMapGedElectrons_
bool useRegressionFromDB_
edm::InputTag inputTagBlocks_
edm::InputTag inputTagEgammaElectrons_
std::string electronOutputCol_
std::string electronExtraOutputCol_
edm::InputTag inputTagPFEGammaCandidates_
volatile std::atomic< bool > shutdown_flag false
const GBRForest * ReaderGC_