11 HepMC::GenEvent::particle_const_iterator trkItr,
12 std::vector<spr::propagatedGenTrackID>& trackIds,
20 edm::LogVerbatim(
"IsoTrack") <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/"
21 << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi()
22 <<
" with ieta:iphi " << ieta <<
":" << iphi;
24 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
31 HepMC::GenEvent::particle_const_iterator trkItr,
32 std::vector<spr::propagatedGenTrackID>& trackIds,
40 edm::LogVerbatim(
"IsoTrack") <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/"
41 << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi()
42 <<
" with dR,tMom " << dR <<
" " << trackMom;
44 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
51 reco::GenParticleCollection::const_iterator trkItr,
52 std::vector<spr::propagatedGenParticleID>& trackIds,
60 edm::LogVerbatim(
"IsoTrack") <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/"
61 << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi "
62 << ieta <<
":" << iphi;
64 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
71 reco::GenParticleCollection::const_iterator trkItr,
72 std::vector<spr::propagatedGenParticleID>& trackIds,
80 edm::LogVerbatim(
"IsoTrack") <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/"
81 << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom "
82 << dR <<
" " << trackMom;
84 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
91 HepMC::GenEvent::particle_const_iterator trkItr,
92 std::vector<spr::propagatedGenTrackID>& trackIds,
100 edm::LogVerbatim(
"IsoTrack") <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/"
101 << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi()
102 <<
" with ieta:iphi " << ieta <<
":" << iphi;
104 std::vector<DetId> dets;
105 dets.push_back(coreDet);
106 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
113 HepMC::GenEvent::particle_const_iterator trkItr,
114 std::vector<spr::propagatedGenTrackID>& trackIds,
123 edm::LogVerbatim(
"IsoTrack") <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/"
124 << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi()
125 <<
" with dR,tMom " << dR <<
" " << trackMom;
127 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
134 reco::GenParticleCollection::const_iterator trkItr,
135 std::vector<spr::propagatedGenParticleID>& trackIds,
143 edm::LogVerbatim(
"IsoTrack") <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/"
144 << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi "
145 << ieta <<
":" << iphi;
147 std::vector<DetId> dets;
148 dets.push_back(coreDet);
149 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
156 reco::GenParticleCollection::const_iterator trkItr,
157 std::vector<spr::propagatedGenParticleID>& trackIds,
166 edm::LogVerbatim(
"IsoTrack") <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/"
167 << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom "
168 << dR <<
" " << trackMom;
170 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
177 HepMC::GenEvent::particle_const_iterator trkItr,
178 std::vector<spr::propagatedGenTrackID>& trackIds,
185 for (
int i = 0;
i < 3; ++
i)
187 for (
unsigned int i = 0;
i < trackIds.size(); ++
i) {
188 HepMC::GenEvent::particle_const_iterator trkItr2 = trackIds[
i].trkItr;
190 if ((trkItr2 != trkItr) && trackIds[
i].ok) {
191 int charge = trackIds[
i].charge;
192 int pdgid = trackIds[
i].pdgId;
193 double p = (*trkItr2)->momentum().rho();
196 const DetId anyCell = trackIds[
i].detIdECAL;
199 const DetId anyCell = trackIds[
i].detIdHCAL;
217 reco::GenParticleCollection::const_iterator trkItr,
218 std::vector<spr::propagatedGenParticleID>& trackIds,
225 for (
int i = 0;
i < 3; ++
i)
227 for (
unsigned int i = 0;
i < trackIds.size(); ++
i) {
228 reco::GenParticleCollection::const_iterator trkItr2 = trackIds[
i].trkItr;
230 if ((trkItr2 != trkItr) && trackIds[
i].ok) {
231 int charge = trackIds[
i].charge;
232 int pdgid = trackIds[
i].pdgId;
233 double p = trkItr2->momentum().R();
236 const DetId anyCell = trackIds[
i].detIdECAL;
239 const DetId anyCell = trackIds[
i].detIdHCAL;
259 else if (pdgid == 11)
261 else if (pdgid == 13)
Log< level::Info, true > LogVerbatim
void matrixECALIds(const DetId &det, int ieta, int iphi, const CaloGeometry *geo, const CaloTopology *caloTopology, std::vector< DetId > &vdets, bool debug=false, bool igNoreTransition=true)
bool chargeIsolation(const DetId anyCell, std::vector< DetId > &vdets)
void cGenSimInfo(std::vector< DetId > &vdets, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, bool ifECAL, spr::genSimInfo &info, bool debug=false)
void debugHcalDets(unsigned int, std::vector< DetId > &)
void debugEcalDets(unsigned int, std::vector< DetId > &)
Abs< T >::type abs(const T &t)
void eGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, spr::genSimInfo &info, bool debug=false)
for(Iditer=Id.begin();Iditer!=Id.end();Iditer++)
std::vector< DetId > matrixHCALIds(std::vector< DetId > &dets, const HcalTopology *topology, int ieta, int iphi, bool includeHO=false, bool debug=false)
void hGenSimInfo(const DetId &coreDet, HepMC::GenEvent::particle_const_iterator trkItr, std::vector< spr::propagatedGenTrackID > &trackIds, const HcalTopology *topology, int ieta, int iphi, spr::genSimInfo &info, bool includeHO=false, bool debug=false)