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;
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;
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 " 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;
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);
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 " 147 std::vector<DetId> dets;
148 dets.push_back(coreDet);
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,
182 info.maxNearP = -1.0;
184 info.isChargedIso =
true;
185 for (
int i = 0;
i < 3; ++
i)
186 info.cHadronEne_[
i] = 0.0;
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;
208 edm::LogVerbatim(
"IsoTrack") <<
"Isolation variables: isChargedIso :" <<
info.isChargedIso <<
" maxNearP " 209 <<
info.maxNearP <<
" Energy e/mu/g/ch/nh " <<
info.eleEne <<
"," <<
info.muEne
210 <<
"," <<
info.photonEne <<
"," <<
info.cHadronEne <<
"," <<
info.nHadronEne
211 <<
" charge " <<
info.cHadronEne_[0] <<
"," <<
info.cHadronEne_[1] <<
"," 212 <<
info.cHadronEne_[2];
217 reco::GenParticleCollection::const_iterator trkItr,
218 std::vector<spr::propagatedGenParticleID>& trackIds,
222 info.maxNearP = -1.0;
224 info.isChargedIso =
true;
225 for (
int i = 0;
i < 3; ++
i)
226 info.cHadronEne_[
i] = 0.0;
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;
248 edm::LogVerbatim(
"IsoTrack") <<
"Isolation variables: isChargedIso :" <<
info.isChargedIso <<
" maxNearP " 249 <<
info.maxNearP <<
" Energy e/mu/g/ch/nh " <<
info.eleEne <<
"," <<
info.muEne
250 <<
"," <<
info.photonEne <<
"," <<
info.cHadronEne <<
"," <<
info.nHadronEne
251 <<
" charge " <<
info.cHadronEne_[0] <<
"," <<
info.cHadronEne_[1] <<
"," 252 <<
info.cHadronEne_[2];
259 else if (
pdgid == 11)
261 else if (
pdgid == 13)
264 info.isChargedIso =
false;
265 info.cHadronEne +=
p;
267 info.cHadronEne_[0] +=
p;
269 info.cHadronEne_[1] +=
p;
271 info.cHadronEne_[2] +=
p;
272 if (
info.maxNearP <
p)
275 info.nHadronEne +=
p;
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)
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
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)
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)