37 std::vector<reco::CandidatePtr>
const& constituents,
59 std::vector<reco::CandidatePtr>
const& constituents,
68 std::vector<reco::CandidatePtr>
const& constituents,
81 std::vector<reco::CandidatePtr>
const& constituents,
89 for (std::vector<reco::CandidatePtr>::const_iterator ic = constituents.begin(), icend = constituents.end();
103 std::vector<reco::CandidatePtr>
const& constituents,
112 std::vector<reco::CandidatePtr>
const& constituents,
122 if (
nullptr == caloJetSpecific)
128 std::vector<double> eECal_i;
129 std::vector<double> eHCal_i;
135 double eHadInHF = 0.;
141 std::vector<reco::CandidatePtr>::const_iterator itTower;
142 for (itTower =
towers.begin(); itTower !=
towers.end(); ++itTower) {
143 if (itTower->isNull() || !itTower->isAvailable()) {
147 const CaloTower*
tower = dynamic_cast<const CaloTower*>(itTower->get());
150 eECal_i.push_back(
tower->emEnergy());
151 eInEm +=
tower->emEnergy();
153 eHCal_i.push_back(
tower->hadEnergy());
154 eInHad +=
tower->hadEnergy();
159 eInHB +=
tower->hadEnergy();
160 eInHO +=
tower->outerEnergy();
161 eInEB +=
tower->emEnergy();
164 eInHE +=
tower->hadEnergy();
165 eInEE +=
tower->emEnergy();
168 eHadInHF +=
tower->hadEnergy();
169 eEmInHF +=
tower->emEnergy();
179 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell " <<
tower->id()
180 <<
" can not be found. Ignoring cell\n";
183 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Constituent is not of "
184 <<
"CaloTower type\n";
188 double towerEnergy = eInHad + eInEm;
196 if (towerEnergy > 0) {
208 sort(eECal_i.begin(), eECal_i.end(), std::greater<double>());
209 sort(eHCal_i.begin(), eHCal_i.end(), std::greater<double>());
224 if (
nullptr == pfJetSpecific)
231 float chargedHadronEnergy = 0.;
232 float neutralHadronEnergy = 0.;
234 float electronEnergy = 0.;
235 float muonEnergy = 0.;
236 float HFHadronEnergy = 0.;
237 float HFEMEnergy = 0.;
243 float HFHadronMultiplicity = 0;
244 float HFEMMultiplicity = 0;
246 float chargedEmEnergy = 0.;
247 float neutralEmEnergy = 0.;
248 float chargedMuEnergy = 0.;
249 float chargedMultiplicity = 0;
250 float neutralMultiplicity = 0;
254 std::vector<reco::CandidatePtr>::const_iterator itParticle;
256 if (itParticle->isNull() || !itParticle->isAvailable()) {
257 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
262 const PFCandidate* pfCandCast = dynamic_cast<const PFCandidate*>(pfCand);
271 chargedMultiplicity +=
weight;
277 neutralMultiplicity +=
weight;
284 neutralMultiplicity +=
weight;
291 chargedMultiplicity +=
weight;
298 chargedMultiplicity +=
weight;
303 HFHadronMultiplicity +=
weight;
305 neutralMultiplicity +=
weight;
310 HFEMMultiplicity +=
weight;
312 neutralMultiplicity +=
weight;
317 <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: " << pfCand->
pdgId() <<
" is ignored\n";
321 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not "
322 <<
"a PFCandidate\n";
355 if (
nullptr == genJetSpecific)
358 std::vector<reco::CandidatePtr>::const_iterator itMcParticle = mcparticles.begin();
359 for (; itMcParticle != mcparticles.end(); ++itMcParticle) {
360 if (itMcParticle->isNull() || !itMcParticle->isAvailable()) {
361 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
371 double e = candidate->
energy();
432 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate "
433 <<
"is not available in the event\n";