13 if (debug)
std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
15 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
22 if (debug)
std::cout <<
"eGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
24 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
31 if (debug)
std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
33 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, ieta, iphi, geo, caloTopology,
false);
40 if (debug)
std::cout <<
"eGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
42 std::vector<DetId> vdets =
spr::matrixECALIds(coreDet, dR, trackMom, geo, caloTopology,
false);
49 if (debug)
std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
51 std::vector<DetId> dets;
52 dets.push_back(coreDet);
53 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
60 if (debug)
std::cout <<
"hGenSimInfo:: For track " << (*trkItr)->momentum().rho() <<
"/" << (*trkItr)->momentum().eta() <<
"/" << (*trkItr)->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
62 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
67 void hGenSimInfo(
const DetId& coreDet, reco::GenParticleCollection::const_iterator trkItr, std::vector<spr::propagatedGenParticleID>& trackIds,
const HcalTopology* topology,
int ieta,
int iphi,
genSimInfo &
info,
bool includeHO,
bool debug) {
69 if (debug)
std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with ieta:iphi " << ieta <<
":" << iphi << std::endl;
71 std::vector<DetId> dets;
72 dets.push_back(coreDet);
73 std::vector<DetId> vdets =
spr::matrixHCALIds(dets, topology, ieta, iphi, includeHO,
false);
80 if (debug)
std::cout <<
"hGenSimInfo:: For track " << trkItr->momentum().R() <<
"/" << trkItr->momentum().eta() <<
"/" << trkItr->momentum().phi() <<
" with dR,tMom " << dR <<
" " << trackMom << std::endl;
82 std::vector<DetId> vdets =
spr::matrixHCALIds(coreDet, geo, topology, dR, trackMom, includeHO,
false);
87 void cGenSimInfo(std::vector<DetId>& vdets, HepMC::GenEvent::particle_const_iterator trkItr, std::vector<spr::propagatedGenTrackID>& trackIds,
bool ifECAL,
spr::genSimInfo &
info,
bool debug) {
93 for (
unsigned int i=0;
i<trackIds.size(); ++
i) {
94 HepMC::GenEvent::particle_const_iterator trkItr2 = trackIds[
i].trkItr;
96 if ( (trkItr2 != trkItr) && trackIds[
i].ok) {
97 int charge = trackIds[
i].charge;
98 int pdgid = trackIds[
i].pdgId;
99 double p = (*trkItr2)->momentum().rho();
102 const DetId anyCell = trackIds[
i].detIdECAL;
105 const DetId anyCell = trackIds[
i].detIdHCAL;
113 <<
" maxNearP " << info.
maxNearP <<
" Energy e/mu/g/ch/nh "
122 void cGenSimInfo(std::vector<DetId>& vdets, reco::GenParticleCollection::const_iterator trkItr, std::vector<spr::propagatedGenParticleID>& trackIds,
bool ifECAL,
spr::genSimInfo &
info,
bool debug) {
128 for (
unsigned int i=0;
i<trackIds.size(); ++
i) {
129 reco::GenParticleCollection::const_iterator trkItr2 = trackIds[
i].trkItr;
131 if ( (trkItr2 != trkItr) && trackIds[
i].ok) {
132 int charge = trackIds[
i].charge;
133 int pdgid = trackIds[
i].pdgId;
134 double p = trkItr2->momentum().R();
137 const DetId anyCell = trackIds[
i].detIdECAL;
140 const DetId anyCell = trackIds[
i].detIdHCAL;
149 <<
" maxNearP " << info.
maxNearP <<
" Energy e/mu/g/ch/nh "
161 else if (pdgid==11) info.
eleEne +=
p;
162 else if (pdgid==13) info.
muEne +=
p;
void debugEcalDets(unsigned int, const DetId &, bool)
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)
void matrixECALIds(const DetId &det, int ieta, int iphi, const CaloGeometry *geo, const CaloTopology *caloTopology, std::vector< DetId > &vdets, 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)