11 std::cout << X << std::endl; \
57 for (
int i = 1;
i <= 100;
i++)
58 for (
int j = 1;
j <= 100;
j++) {
74 for (
int i = 1;
i <= 171;
i++) {
77 for (
int j = 1;
j <= 360;
j++) {
102 for (
int i = 1;
i <= 171;
i++)
103 for (
int j = 1;
j <= 360;
j++) {
107 for (
int i = 1;
i <= 100;
i++)
108 for (
int j = 1;
j <= 100;
j++) {
208 for (std::vector<DetId>::iterator
i = EBids.begin();
i != EBids.end();
i++) {
215 int Crystal_ieta = EcalID.
ieta();
216 int Crystal_iphi = EcalID.iphi();
217 double Crystal_eta = cell->getPosition().eta();
218 double Crystal_phi = cell->getPosition().phi();
223 DEBUG(
" ieta, iphi = " << Crystal_ieta <<
", " << Crystal_iphi);
224 DEBUG(
" eta, phi = " << cell->getPosition().eta() <<
", " << cell->getPosition().phi());
231 for (std::vector<DetId>::iterator
i = EEids.begin();
i != EEids.end();
i++) {
236 int Crystal_zside = EcalID.
zside();
237 int Crystal_ix = EcalID.ix();
238 int Crystal_iy = EcalID.iy();
239 Float_t ix_ = Crystal_ix - 50.5;
240 Float_t iy_ = Crystal_iy - 50.5;
241 Int_t ir = (Int_t)
sqrt(ix_ * ix_ + iy_ * iy_);
245 double Crystal_x = cell->getPosition().x();
246 double Crystal_y = cell->getPosition().y();
247 double Crystal_z = cell->getPosition().z();
249 if (Crystal_zside == -1) {
256 if (Crystal_zside == 1) {
264 DEBUG(
" side = " << Crystal_zside);
265 DEBUG(
" ix, iy = " << Crystal_ix <<
", " << Crystal_iy);
266 DEBUG(
" x, y = " << Crystal_x <<
", " << Crystal_y);
272 double currentLowEdge_eta = 0;
275 int ieta_ = 86 +
ieta;
286 double deta = fabs(
eta - etam1);
289 currentLowEdge_eta += deta;
309 DEBUG(
"Got ECALRecHits");
316 DEBUG(
"Got Geometry");
318 TLorentzVector vEBMET_EtaRing[171];
319 int EBActiveRing[171];
320 int EBNActiveCells[171];
321 double EBSET_EtaRing[171];
322 double EBMaxEnergy_EtaRing[171];
323 double EBMinEnergy_EtaRing[171];
324 double EBenergy_EtaRing[171];
326 for (
int i = 0;
i < 171;
i++) {
328 EBNActiveCells[
i] = 0;
329 EBSET_EtaRing[
i] = 0.0;
330 EBMaxEnergy_EtaRing[
i] = -999;
331 EBMinEnergy_EtaRing[
i] = 14E3;
332 EBenergy_EtaRing[
i] = 0.0;
335 edm::LogInfo(
"OutputInfo") <<
"Looping over EB" << std::endl;
342 double Energy = ebrechit->energy();
345 int EtaRing = 85 +
ieta;
352 if (
Energy > EBMaxEnergy_EtaRing[EtaRing])
353 EBMaxEnergy_EtaRing[EtaRing] =
Energy;
354 if (
Energy < EBMinEnergy_EtaRing[EtaRing])
355 EBMinEnergy_EtaRing[EtaRing] =
Energy;
358 EBActiveRing[EtaRing] = 1;
359 EBNActiveCells[EtaRing]++;
360 EBSET_EtaRing[EtaRing] +=
ET;
361 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
362 vEBMET_EtaRing[EtaRing] -= v_;
363 EBenergy_EtaRing[EtaRing] +=
Energy;
370 if (Energy < hEB_Minenergy_ieta_iphi->getBinContent(EtaRing + 1,
iphi))
375 for (
int iEtaRing = 0; iEtaRing < 171; iEtaRing++) {
379 if (EBActiveRing[iEtaRing]) {
390 TLorentzVector vEEpZMET_EtaRing[101];
391 int EEpZActiveRing[101];
392 int EEpZNActiveCells[101];
393 double EEpZSET_EtaRing[101];
394 double EEpZMaxEnergy_EtaRing[101];
395 double EEpZMinEnergy_EtaRing[101];
397 TLorentzVector vEEmZMET_EtaRing[101];
398 int EEmZActiveRing[101];
399 int EEmZNActiveCells[101];
400 double EEmZSET_EtaRing[101];
401 double EEmZMaxEnergy_EtaRing[101];
402 double EEmZMinEnergy_EtaRing[101];
404 for (
int i = 0;
i < 101;
i++) {
405 EEpZActiveRing[
i] = 0;
406 EEpZNActiveCells[
i] = 0;
407 EEpZSET_EtaRing[
i] = 0.0;
408 EEpZMaxEnergy_EtaRing[
i] = -999;
409 EEpZMinEnergy_EtaRing[
i] = 14E3;
411 EEmZActiveRing[
i] = 0;
412 EEmZNActiveCells[
i] = 0;
413 EEmZSET_EtaRing[
i] = 0.0;
414 EEmZMaxEnergy_EtaRing[
i] = -999;
415 EEmZMinEnergy_EtaRing[
i] = 14E3;
418 edm::LogInfo(
"OutputInfo") <<
"Looping over EE" << std::endl;
423 double Energy = eerechit->energy();
437 int Crystal_zside = det.
zside();
439 if (Crystal_zside == -1) {
445 if (Crystal_zside == 1) {
451 TVector3 pos_vector(
x,
y,
z);
452 phi = pos_vector.Phi();
453 theta = pos_vector.Theta();
457 if (Crystal_zside == -1) {
459 EEmZActiveRing[ir] = 1;
460 EEmZNActiveCells[ir]++;
461 EEmZSET_EtaRing[ir] +=
ET;
462 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
463 vEEmZMET_EtaRing[ir] -= v_;
469 if (
Energy > EEmZMaxEnergy_EtaRing[ir])
470 EEmZMaxEnergy_EtaRing[ir] =
Energy;
471 if (
Energy < EEmZMinEnergy_EtaRing[ir])
472 EEmZMinEnergy_EtaRing[ir] =
Energy;
476 if (Energy < hEEmZ_Minenergy_ix_iy->getBinContent(ix, iy))
479 if (Crystal_zside == 1) {
481 EEpZActiveRing[ir] = 1;
482 EEpZNActiveCells[ir]++;
483 EEpZSET_EtaRing[ir] +=
ET;
484 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
485 vEEpZMET_EtaRing[ir] -= v_;
491 if (
Energy > EEpZMaxEnergy_EtaRing[ir])
492 EEpZMaxEnergy_EtaRing[ir] =
Energy;
493 if (
Energy < EEpZMinEnergy_EtaRing[ir])
494 EEpZMinEnergy_EtaRing[ir] =
Energy;
497 if (Energy < hEEpZ_Minenergy_ix_iy->getBinContent(ix, iy))
501 edm::LogInfo(
"OutputInfo") <<
"Done Looping over EE" << std::endl;
502 for (
int iEtaRing = 0; iEtaRing < 101; iEtaRing++) {
508 if (EEpZActiveRing[iEtaRing]) {
517 if (EEmZActiveRing[iEtaRing]) {