24 for (
int i = 0;
i < 20;
i++) {
25 double ed = 0.001 * edepl[
i];
26 LogDebug(
"HcalSim") <<
"HcalTestHistoClass:: fillLayer: nLayers, ed " <<
i <<
" " << ed;
39 int nHit = hitcache.size();
42 std::vector<CaloHit>::iterator
itr;
43 std::vector<CaloHit*> lhits(nHit);
44 for (
i = 0,
itr = hitcache.begin();
itr != hitcache.end();
i++,
itr++) {
45 uint32_t unitID =
itr->id();
50 group = (subdet & 15) << 20;
51 group += ((lay - 1) & 31) << 15;
56 lhits[
i] = &hitcache[
i];
57 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Original " <<
i <<
" " << hitcache[
i];
58 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Copied " <<
i <<
" " << *lhits[
i];
61 std::vector<CaloHit*>::iterator k1, k2;
62 for (
i = 0, k1 = lhits.begin(); k1 != lhits.end();
i++, k1++)
63 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Sorted " <<
i <<
" " << **k1;
65 hits.resize(lhits.size());
66 for (
i = 0, k1 = lhits.begin(); k1 != lhits.end();
i++, k1++) {
67 double ehit = (**k1).e();
68 double jitter = (**k1).t();
69 unsigned int unitID = (**k1).id();
71 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Start " <<
i <<
" U/T/E 0x" << std::hex << unitID <<
std::dec
72 <<
" " << jitter <<
" " << ehit;
74 k2 != lhits.end() && (jitter - (**k2).t()) < 1. && (jitter - (**k2).t()) > -1. && unitID == (**k2).id();
77 LogDebug(
"HcalSim") <<
" + " << (**k2).e();
80 LogDebug(
"HcalSim") <<
" = " << ehit <<
" in " << jump;
85 int lay = ((unitID >> 15) & 31) + 1;
97 int subdet = (unitID >> 20) & 15;
98 int zside = (unitID >> 14) & 1;
99 int ieta = (unitID >> 7) & 127;
100 int iphi = (unitID)&127;
101 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits:Hit " <<
hit <<
" " <<
i <<
" ID 0x" << std::hex << unitID
103 <<
" Time " << jitter <<
" E " << ehit;
109 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillHits called with " << nHit <<
" hits"
110 <<
" and writes out " <<
nHits <<
'(' <<
hit <<
") hits";
117 const std::vector<double>& longs,
118 const std::vector<double>& longq,
120 const std::vector<double>& latphi,
121 const std::vector<double>& latfs,
122 const std::vector<double>& latfq) {
126 if (
id >= 0 &&
id < 4) {
127 unsigned int qiesiz = (
unsigned int)(
id + 1);
128 if (
qie.size() < qiesiz) {
132 qie[
id].sim = esimtot;
133 qie[
id].qie = eqietot;
137 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, esimtot, eqietot"
138 <<
" = " <<
id <<
" " << esimtot <<
" " << eqietot;
140 for (
int i = 0;
i < nGroup;
i++) {
141 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, nGroupQIE, "
142 <<
"longs, longq = " <<
id <<
" " <<
nGroupQIE <<
" " << longs[
i] <<
" " << longq[
i];
143 qie[
id].lngs.push_back(longs[
i]);
144 qie[
id].lngq.push_back(longq[
i]);
148 for (
int i = 0;
i < nTower;
i++) {
149 int tow = (
int)latphi[
i];
150 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, nTowerQIE, "
151 <<
"tower, latfs, latfq = " <<
id <<
" " <<
nTowerQIE <<
" " << tow <<
" " << latfs[
i] <<
" "
153 qie[
id].lats.push_back(latfs[
i]);
154 qie[
id].latq.push_back(latfq[
i]);
155 qie[
id].tow.push_back(tow);
159 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: Called with ID " <<
id <<
" nQIE " <<
nQIE <<
" nGroup "