16 if (debug)
std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
18 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
28 if (debug)
std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
30 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
40 if (debug)
std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
42 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
52 if (debug)
std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
54 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
64 if (debug)
std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
66 std::vector<DetId> dets;
67 dets.push_back(coreDet);
68 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
78 if (debug)
std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
80 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
90 if (debug)
std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
92 std::vector<DetId> dets;
93 dets.push_back(coreDet);
94 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
104 if (debug)
std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
106 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
113 void cGenSimInfo(std::vector<DetId>& vdets, HepMC::GenEvent::particle_const_iterator trkItr, std::vector<spr::propagatedGenTrackID>& trackIds,
bool ifECAL,
spr::genSimInfo &
info,
bool debug) {
119 for (
unsigned int i=0;
i<trackIds.size(); ++
i) {
120 HepMC::GenEvent::particle_const_iterator trkItr2 = trackIds[
i].trkItr;
122 if ( (trkItr2 != trkItr) && trackIds[
i].ok) {
123 int charge = trackIds[
i].charge;
124 int pdgid = trackIds[
i].pdgId;
125 double p = (*trkItr2)->momentum().rho();
128 const DetId anyCell = trackIds[
i].detIdECAL;
131 const DetId anyCell = trackIds[
i].detIdHCAL;
140 <<
" maxNearP " << info.
maxNearP <<
" Energy e/mu/g/ch/nh " 150 void cGenSimInfo(std::vector<DetId>& vdets, reco::GenParticleCollection::const_iterator trkItr, std::vector<spr::propagatedGenParticleID>& trackIds,
bool ifECAL,
spr::genSimInfo &
info,
bool debug) {
156 for (
unsigned int i=0;
i<trackIds.size(); ++
i) {
157 reco::GenParticleCollection::const_iterator trkItr2 = trackIds[
i].trkItr;
159 if ( (trkItr2 != trkItr) && trackIds[
i].ok) {
160 int charge = trackIds[
i].charge;
161 int pdgid = trackIds[
i].pdgId;
162 double p = trkItr2->momentum().R();
165 const DetId anyCell = trackIds[
i].detIdECAL;
168 const DetId anyCell = trackIds[
i].detIdHCAL;
178 <<
" maxNearP " << info.
maxNearP <<
" Energy e/mu/g/ch/nh " 192 else if (pdgid==11) info.
eleEne +=
p;
193 else if (pdgid==13) info.
muEne +=
p;
void debugEcalDets(unsigned int, const DetId &, bool)
CaloTopology const * topology(0)
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 > &)
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)