11 std::cout << X << std::endl; \
59 for (
int i = 1;
i <= 100;
i++)
60 for (
int j = 1;
j <= 100;
j++) {
76 for (
int i = 1;
i <= 171;
i++) {
79 for (
int j = 1;
j <= 360;
j++) {
104 for (
int i = 1;
i <= 171;
i++)
105 for (
int j = 1;
j <= 360;
j++) {
109 for (
int i = 1;
i <= 100;
i++)
110 for (
int j = 1;
j <= 100;
j++) {
206 for (std::vector<DetId>::iterator
i = EBids.begin();
i != EBids.end();
i++) {
213 int Crystal_ieta = EcalID.
ieta();
214 int Crystal_iphi = EcalID.iphi();
215 double Crystal_eta = cell->getPosition().eta();
216 double Crystal_phi = cell->getPosition().phi();
221 DEBUG(
" ieta, iphi = " << Crystal_ieta <<
", " << Crystal_iphi);
222 DEBUG(
" eta, phi = " << cell->getPosition().eta() <<
", " << cell->getPosition().phi());
229 for (std::vector<DetId>::iterator
i = EEids.begin();
i != EEids.end();
i++) {
234 int Crystal_zside = EcalID.
zside();
235 int Crystal_ix = EcalID.ix();
236 int Crystal_iy = EcalID.iy();
237 Float_t ix_ = Crystal_ix - 50.5;
238 Float_t iy_ = Crystal_iy - 50.5;
239 Int_t ir = (Int_t)
sqrt(ix_ * ix_ + iy_ * iy_);
243 double Crystal_x = cell->getPosition().x();
244 double Crystal_y = cell->getPosition().y();
245 double Crystal_z = cell->getPosition().z();
247 if (Crystal_zside == -1) {
254 if (Crystal_zside == 1) {
262 DEBUG(
" side = " << Crystal_zside);
263 DEBUG(
" ix, iy = " << Crystal_ix <<
", " << Crystal_iy);
264 DEBUG(
" x, y = " << Crystal_x <<
", " << Crystal_y);
270 double currentLowEdge_eta = 0;
273 int ieta_ = 86 +
ieta;
284 double deta = fabs(
eta - etam1);
287 currentLowEdge_eta += deta;
307 DEBUG(
"Got ECALRecHits");
311 DEBUG(
"Got Geometry");
313 TLorentzVector vEBMET_EtaRing[171];
314 int EBActiveRing[171];
315 int EBNActiveCells[171];
316 double EBSET_EtaRing[171];
317 double EBMaxEnergy_EtaRing[171];
318 double EBMinEnergy_EtaRing[171];
319 double EBenergy_EtaRing[171];
321 for (
int i = 0;
i < 171;
i++) {
323 EBNActiveCells[
i] = 0;
324 EBSET_EtaRing[
i] = 0.0;
325 EBMaxEnergy_EtaRing[
i] = -999;
326 EBMinEnergy_EtaRing[
i] = 14E3;
327 EBenergy_EtaRing[
i] = 0.0;
330 edm::LogInfo(
"OutputInfo") <<
"Looping over EB" << std::endl;
337 double Energy = ebrechit->energy();
340 int EtaRing = 85 +
ieta;
347 if (
Energy > EBMaxEnergy_EtaRing[EtaRing])
348 EBMaxEnergy_EtaRing[EtaRing] =
Energy;
349 if (
Energy < EBMinEnergy_EtaRing[EtaRing])
350 EBMinEnergy_EtaRing[EtaRing] =
Energy;
353 EBActiveRing[EtaRing] = 1;
354 EBNActiveCells[EtaRing]++;
355 EBSET_EtaRing[EtaRing] +=
ET;
356 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
357 vEBMET_EtaRing[EtaRing] -= v_;
358 EBenergy_EtaRing[EtaRing] +=
Energy;
365 if (Energy < hEB_Minenergy_ieta_iphi->getBinContent(EtaRing + 1,
iphi))
370 for (
int iEtaRing = 0; iEtaRing < 171; iEtaRing++) {
374 if (EBActiveRing[iEtaRing]) {
385 TLorentzVector vEEpZMET_EtaRing[101];
386 int EEpZActiveRing[101];
387 int EEpZNActiveCells[101];
388 double EEpZSET_EtaRing[101];
389 double EEpZMaxEnergy_EtaRing[101];
390 double EEpZMinEnergy_EtaRing[101];
392 TLorentzVector vEEmZMET_EtaRing[101];
393 int EEmZActiveRing[101];
394 int EEmZNActiveCells[101];
395 double EEmZSET_EtaRing[101];
396 double EEmZMaxEnergy_EtaRing[101];
397 double EEmZMinEnergy_EtaRing[101];
399 for (
int i = 0;
i < 101;
i++) {
400 EEpZActiveRing[
i] = 0;
401 EEpZNActiveCells[
i] = 0;
402 EEpZSET_EtaRing[
i] = 0.0;
403 EEpZMaxEnergy_EtaRing[
i] = -999;
404 EEpZMinEnergy_EtaRing[
i] = 14E3;
406 EEmZActiveRing[
i] = 0;
407 EEmZNActiveCells[
i] = 0;
408 EEmZSET_EtaRing[
i] = 0.0;
409 EEmZMaxEnergy_EtaRing[
i] = -999;
410 EEmZMinEnergy_EtaRing[
i] = 14E3;
413 edm::LogInfo(
"OutputInfo") <<
"Looping over EE" << std::endl;
418 double Energy = eerechit->energy();
432 int Crystal_zside = det.
zside();
434 if (Crystal_zside == -1) {
440 if (Crystal_zside == 1) {
446 TVector3 pos_vector(
x,
y,
z);
447 phi = pos_vector.Phi();
448 theta = pos_vector.Theta();
452 if (Crystal_zside == -1) {
454 EEmZActiveRing[ir] = 1;
455 EEmZNActiveCells[ir]++;
456 EEmZSET_EtaRing[ir] +=
ET;
457 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
458 vEEmZMET_EtaRing[ir] -= v_;
464 if (
Energy > EEmZMaxEnergy_EtaRing[ir])
465 EEmZMaxEnergy_EtaRing[ir] =
Energy;
466 if (
Energy < EEmZMinEnergy_EtaRing[ir])
467 EEmZMinEnergy_EtaRing[ir] =
Energy;
471 if (Energy < hEEmZ_Minenergy_ix_iy->getBinContent(ix, iy))
474 if (Crystal_zside == 1) {
476 EEpZActiveRing[ir] = 1;
477 EEpZNActiveCells[ir]++;
478 EEpZSET_EtaRing[ir] +=
ET;
479 v_.SetPtEtaPhiE(
ET, 0,
phi,
ET);
480 vEEpZMET_EtaRing[ir] -= v_;
486 if (
Energy > EEpZMaxEnergy_EtaRing[ir])
487 EEpZMaxEnergy_EtaRing[ir] =
Energy;
488 if (
Energy < EEpZMinEnergy_EtaRing[ir])
489 EEpZMinEnergy_EtaRing[ir] =
Energy;
492 if (Energy < hEEpZ_Minenergy_ix_iy->getBinContent(ix, iy))
496 edm::LogInfo(
"OutputInfo") <<
"Done Looping over EE" << std::endl;
497 for (
int iEtaRing = 0; iEtaRing < 101; iEtaRing++) {
503 if (EEpZActiveRing[iEtaRing]) {
512 if (EEmZActiveRing[iEtaRing]) {