14 HepMC::GenEvent::particle_const_iterator trkItr,
15 std::vector<spr::propagatedGenTrackID>& trackIds,
24 std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta()
25 <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " <<
ieta <<
":" <<
iphi << std::endl;
36 HepMC::GenEvent::particle_const_iterator trkItr,
37 std::vector<spr::propagatedGenTrackID>& trackIds,
46 std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta()
47 <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " <<
dR <<
" " << trackMom << std::endl;
58 reco::GenParticleCollection::const_iterator trkItr,
59 std::vector<spr::propagatedGenParticleID>& trackIds,
68 std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/"
69 << trkItr->momentum().phi() <<
" with ieta:iphi " <<
ieta <<
":" <<
iphi << std::endl;
80 reco::GenParticleCollection::const_iterator trkItr,
81 std::vector<spr::propagatedGenParticleID>& trackIds,
90 std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/"
91 << trkItr->momentum().phi() <<
" with dR,tMom " <<
dR <<
" " << trackMom << std::endl;
102 HepMC::GenEvent::particle_const_iterator trkItr,
103 std::vector<spr::propagatedGenTrackID>& trackIds,
112 std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta()
113 <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " <<
ieta <<
":" <<
iphi << std::endl;
115 std::vector<DetId> dets;
116 dets.push_back(coreDet);
126 HepMC::GenEvent::particle_const_iterator trkItr,
127 std::vector<spr::propagatedGenTrackID>& trackIds,
137 std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta()
138 <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " <<
dR <<
" " << trackMom << std::endl;
149 reco::GenParticleCollection::const_iterator trkItr,
150 std::vector<spr::propagatedGenParticleID>& trackIds,
159 std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/"
160 << trkItr->momentum().phi() <<
" with ieta:iphi " <<
ieta <<
":" <<
iphi << std::endl;
162 std::vector<DetId> dets;
163 dets.push_back(coreDet);
173 reco::GenParticleCollection::const_iterator trkItr,
174 std::vector<spr::propagatedGenParticleID>& trackIds,
184 std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/"
185 << trkItr->momentum().phi() <<
" with dR,tMom " <<
dR <<
" " << trackMom << std::endl;
196 HepMC::GenEvent::particle_const_iterator trkItr,
197 std::vector<spr::propagatedGenTrackID>& trackIds,
201 info.maxNearP = -1.0;
203 info.isChargedIso =
true;
204 for (
int i = 0;
i < 3; ++
i)
205 info.cHadronEne_[
i] = 0.0;
206 for (
unsigned int i = 0;
i < trackIds.size(); ++
i) {
207 HepMC::GenEvent::particle_const_iterator trkItr2 = trackIds[
i].trkItr;
209 if ((trkItr2 != trkItr) && trackIds[
i].ok) {
210 int charge = trackIds[
i].charge;
211 int pdgid = trackIds[
i].pdgId;
212 double p = (*trkItr2)->momentum().rho();
215 const DetId anyCell = trackIds[
i].detIdECAL;
218 const DetId anyCell = trackIds[
i].detIdHCAL;
227 std::cout <<
"Isolation variables: isChargedIso :" <<
info.isChargedIso <<
" maxNearP " <<
info.maxNearP
228 <<
" Energy e/mu/g/ch/nh " <<
info.eleEne <<
"," <<
info.muEne <<
"," <<
info.photonEne <<
","
229 <<
info.cHadronEne <<
"," <<
info.nHadronEne <<
" charge " <<
info.cHadronEne_[0] <<
","
230 <<
info.cHadronEne_[1] <<
"," <<
info.cHadronEne_[2] << std::endl;
236 reco::GenParticleCollection::const_iterator trkItr,
237 std::vector<spr::propagatedGenParticleID>& trackIds,
241 info.maxNearP = -1.0;
243 info.isChargedIso =
true;
244 for (
int i = 0;
i < 3; ++
i)
245 info.cHadronEne_[
i] = 0.0;
246 for (
unsigned int i = 0;
i < trackIds.size(); ++
i) {
247 reco::GenParticleCollection::const_iterator trkItr2 = trackIds[
i].trkItr;
249 if ((trkItr2 != trkItr) && trackIds[
i].ok) {
250 int charge = trackIds[
i].charge;
251 int pdgid = trackIds[
i].pdgId;
252 double p = trkItr2->momentum().R();
255 const DetId anyCell = trackIds[
i].detIdECAL;
258 const DetId anyCell = trackIds[
i].detIdHCAL;
268 std::cout <<
"Isolation variables: isChargedIso :" <<
info.isChargedIso <<
" maxNearP " <<
info.maxNearP
269 <<
" Energy e/mu/g/ch/nh " <<
info.eleEne <<
"," <<
info.muEne <<
"," <<
info.photonEne <<
","
270 <<
info.cHadronEne <<
"," <<
info.nHadronEne <<
" charge " <<
info.cHadronEne_[0] <<
","
271 <<
info.cHadronEne_[1] <<
"," <<
info.cHadronEne_[2] << std::endl;
279 else if (
pdgid == 11)
281 else if (
pdgid == 13)
284 info.isChargedIso =
false;
285 info.cHadronEne +=
p;
287 info.cHadronEne_[0] +=
p;
289 info.cHadronEne_[1] +=
p;
291 info.cHadronEne_[2] +=
p;
292 if (
info.maxNearP <
p)
295 info.nHadronEne +=
p;