12 if (
cfg.exists(
"binning")) {
13 typedef std::vector<edm::ParameterSet> vParameterSet;
14 vParameterSet cfgBinning =
cfg.getParameter<vParameterSet>(
"binning");
15 for (vParameterSet::const_iterator cfgBinningEntry = cfgBinning.begin(); cfgBinningEntry != cfgBinning.end();
24 produces<reco::CandidateCollection>();
28 for (std::vector<binningEntryType*>::const_iterator it =
binning_.begin(); it !=
binning_.end(); ++it) {
41 auto shiftedParticles = std::make_unique<reco::CandidateCollection>();
43 for (
unsigned i = 0;
i < originalParticles->
size(); ++
i) {
49 weight = (*weights)[particlePtr];
60 shiftedParticleP4 *= (1. +
shift);
62 std::unique_ptr<reco::Candidate> shiftedParticle = std::make_unique<reco::LeafCandidate>(originalParticle);
63 shiftedParticle->setP4(shiftedParticleP4);
65 shiftedParticles->push_back(shiftedParticle.release());
74 for (std::vector<binningEntryType*>::iterator binningEntry =
binning_.begin(); binningEntry !=
binning_.end();
76 if ((!(*binningEntry)->binSelection_) || (*(*binningEntry)->binSelection_)(originalParticle)) {
77 if ((*binningEntry)->energyDep_)
78 valx = originalParticle.
energy();
80 valx = originalParticle.
pt();
82 valy = originalParticle.
eta();
83 return (*binningEntry)->binUncFormula_->Eval(valx, valy);