40 int nHit = hitcache.size();
43 std::vector<CaloHit>::iterator itr;
44 std::vector<CaloHit*> lhits(nHit);
45 for (i = 0, itr = hitcache.begin(); itr != hitcache.end(); i++, itr++) {
46 uint32_t unitID = itr->id();
51 group = (subdet & 15) << 20;
52 group += ((lay - 1) & 31) << 15;
53 group += (zside & 1) << 14;
54 group += (ieta & 127) << 7;
55 group += (iphi & 127);
57 lhits[
i] = &hitcache[
i];
58 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Original " << i <<
" " << hitcache[
i];
59 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Copied " << i <<
" " << *lhits[
i];
62 std::vector<CaloHit*>::iterator k1,
k2;
63 for (i = 0, k1 = lhits.begin(); k1 != lhits.end(); i++, k1++)
64 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Sorted " << i <<
" " << **k1;
66 hits.resize(lhits.size());
67 for (i = 0, k1 = lhits.begin(); k1 != lhits.end(); i++, k1++) {
68 double ehit = (**k1).e();
69 double jitter = (**k1).t();
70 unsigned int unitID = (**k1).id();
72 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Start " << i <<
" U/T/E 0x" << std::hex << unitID <<
std::dec
73 <<
" " << jitter <<
" " << ehit;
75 k2 != lhits.end() && (jitter - (**k2).t()) < 1. && (jitter - (**k2).t()) > -1. && unitID == (**k2).id();
78 LogDebug(
"HcalSim") <<
" + " << (**k2).e();
81 LogDebug(
"HcalSim") <<
" = " << ehit <<
" in " << jump;
83 float eta = itr->eta();
84 float phi = itr->phi();
86 int lay = ((unitID >> 15) & 31) + 1;
98 int subdet = (unitID >> 20) & 15;
99 int zside = (unitID >> 14) & 1;
100 int ieta = (unitID >> 7) & 127;
101 int iphi = (unitID)&127;
102 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Hit " << hit <<
" " << i <<
" ID 0x" << std::hex << unitID
103 <<
std::dec <<
" " << subdet <<
" " << lay <<
" " << zside <<
" " << ieta <<
" " << iphi
104 <<
" Time " << jitter <<
" E " << ehit;
110 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits called with " << nHit <<
" hits"
111 <<
" and writes out " <<
nHits <<
'(' << hit <<
") hits";
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)