13 std::vector<PCaloHit>&
hits,
30 HcalDetId hcid(hcid0.subdet(), hcid0.ieta(), hcid0.iphi(), 1);
31 DetId det(hcid.rawId());
34 std::cout <<
"Inside eHCALmatrix " << 2 *
ieta + 1 <<
"X" << 2 *
iphi + 1 <<
" Inclusion of HO Flag " << includeHO
38 std::vector<DetId> dets(1, det);
42 std::cout <<
"matrixHCALIds::Total number of cells found is " << vdets.size() << std::endl;
47 for (
unsigned int i = 0;
i < vdets.size();
i++) {
50 int subdet = ((
HcalDetId)(vdets[
i].rawId())).subdet();
52 for (
unsigned int ihit = 0; ihit <
hit.size(); ihit++) {
58 <<
" t " <<
hit[ihit]->time() << std::endl;
79 std::vector<PCaloHit>&
hits,
86 HcalDetId hcid(hcid0.subdet(), hcid0.ieta(), hcid0.iphi(), 1);
87 DetId det(hcid.rawId());
88 std::vector<DetId> dets(1, det);
92 std::vector<std::vector<PCaloHit>::const_iterator> hitlist;
93 for (
unsigned int i = 0;
i < vdets.size();
i++) {
95 hitlist.insert(hitlist.end(),
hit.begin(),
hit.end());
99 for (
unsigned int ihit = 0; ihit < hitlist.size(); ihit++)
104 std::vector<double> energies;
105 for (
unsigned int ihit = 0; ihit < hitlist.size(); ihit++) {
106 double energy = hitlist[ihit]->energy();
111 for (
unsigned int idet = 0; idet < dets.size(); ++idet) {
120 energies.push_back(
energy);
124 double energyMax(-99.);
125 for (
unsigned int ihit = 0; ihit < dets.size(); ihit++) {
126 if (energies[ihit] > energyMax) {
127 energyMax = energies[ihit];
135 std::vector<PCaloHit>&
hits,
152 int subdet = detId.
subdet();
157 std::cout <<
"energyHCALCell: input ID " << detId <<
" MaxDepth " <<
maxDepth <<
" Threshold (E) " << eThr
158 <<
" (T) " << tMin <<
":" << tMax << std::endl;
163 DetId det(hcid.rawId());
166 for (
unsigned int ihit = 0; ihit <
hit.size(); ++ihit) {
167 if (
hit[ihit]->
time() > tMin &&
hit[ihit]->time() < tMax)
171 std::cout <<
"energyHCALCell:: Hit[" << ihit <<
"] " << hcid <<
" E " <<
hit[ihit]->energy() <<
" t "
172 <<
hit[ihit]->time() << std::endl;
177 std::cout <<
"energyHCALCell:: Cell " << hcid <<
" E " <<
energy <<
" from " <<
hit.size() <<
" threshold "
178 << eThr << std::endl;
181 energyCell.push_back(std::pair<double, int>(
energy,
i + 1));
186 std::cout <<
"energyHCALCell:: " << energyCell.size() <<
" entries from " <<
maxDepth <<
" depths:";
187 for (
unsigned int i = 0;
i < energyCell.size(); ++
i) {
188 std::cout <<
" [" <<
i <<
"] (" << energyCell[
i].first <<
":" << energyCell[
i].second <<
")";
196 std::vector<HcalDetId> dets;
197 std::vector<double> energies;
198 for (
unsigned int ihit = 0; ihit <
hit.size(); ihit++) {
201 if ((id0.subdet() !=
HcalOuter) || includeHO) {
204 for (
unsigned int idet = 0; idet < dets.size(); ++idet) {
205 if (
id1 == dets[idet]) {
213 energies.push_back(
energy);
217 double energyMax(-99.);
219 for (
unsigned int ihit = 0; ihit < dets.size(); ihit++) {
220 if (energies[ihit] > energyMax) {
221 energyMax = energies[ihit];
222 hotCell = dets[ihit];
229 std::vector<HcalDetId> dets;
230 std::vector<double> energies;
231 for (
unsigned int ihit = 0; ihit <
hit.size(); ihit++) {
237 for (
unsigned int idet = 0; idet < dets.size(); ++idet) {
238 if (
id1 == dets[idet]) {
246 energies.push_back(
energy);
250 double energyMax(-99.);
252 for (
unsigned int ihit = 0; ihit < dets.size(); ihit++) {
253 if (energies[ihit] > energyMax) {
254 energyMax = energies[ihit];
255 hotCell = dets[ihit];
261 double eHCALThreshold(
int subdet,
double hbThr,
double heThr,
double hfThr,
double hoThr) {