25 for (
int i = 0;
i < 20;
i++) {
26 double ed = 0.001 * edepl[
i];
27 LogDebug(
"HcalSim") <<
"HcalTestHistoClass:: fillLayer: nLayers, ed " <<
i <<
" " << ed;
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";
118 const std::vector<double>& longs,
119 const std::vector<double>& longq,
121 const std::vector<double>& latphi,
122 const std::vector<double>& latfs,
123 const std::vector<double>& latfq) {
127 if (
id >= 0 &&
id < 4) {
128 unsigned int qiesiz = (
unsigned int)(
id + 1);
129 if (
qie.size() < qiesiz) {
133 qie[
id].sim = esimtot;
134 qie[
id].qie = eqietot;
138 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, esimtot, eqietot"
139 <<
" = " <<
id <<
" " << esimtot <<
" " << eqietot;
141 for (
int i = 0;
i < nGroup;
i++) {
142 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, nGroupQIE, "
143 <<
"longs, longq = " <<
id <<
" " <<
nGroupQIE <<
" " << longs[
i] <<
" " << longq[
i];
144 qie[
id].lngs.push_back(longs[
i]);
145 qie[
id].lngq.push_back(longq[i]);
149 for (
int i = 0;
i < nTower;
i++) {
150 int tow = (int)latphi[
i];
151 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: id, nTowerQIE, "
152 <<
"tower, latfs, latfq = " <<
id <<
" " <<
nTowerQIE <<
" " << tow <<
" " << latfs[
i] <<
" "
154 qie[
id].lats.push_back(latfs[
i]);
155 qie[
id].latq.push_back(latfq[i]);
156 qie[
id].tow.push_back(tow);
160 LogDebug(
"HcalSim") <<
"HcalTestHistoClass::fillQie: Called with ID " <<
id <<
" nQIE " <<
nQIE <<
" nGroup "
void fillQie(int id, double esimtot, double eqietot, int nGroup, const std::vector< double > &longs, const std::vector< double > &longq, int nTower, const std::vector< double > &latphi, const std::vector< double > &latfs, const std::vector< double > &latfq)
uint16_t *__restrict__ id
void fillLayers(double el[], double ho, double hbhe, double muxy[])
void fillHits(std::vector< CaloHit > &)
std::vector< Layer > layers
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
static const int nLayersMAX