36 #define TWOPI 6.283185308 69 if (clusPhiSize_ % 2 == 0 || clusEtaSize_ % 2 == 0)
70 edm::LogError(
"AlCaPi0RecHitsProducerError") <<
"Size of eta/phi for simple clustering should be odd numbers";
219 hMinvPi0EB_ = ibooker.
book1D(
"Pi0InvmassEB",
"Pi0 Invariant Mass in EB", 100, 0., 0.5);
222 hMinvPi0EE_ = ibooker.
book1D(
"Pi0InvmassEE",
"Pi0 Invariant Mass in EE", 100, 0., 0.5);
225 hMinvEtaEB_ = ibooker.
book1D(
"EtaInvmassEB",
"Eta Invariant Mass in EB", 100, 0., 0.85);
228 hMinvEtaEE_ = ibooker.
book1D(
"EtaInvmassEE",
"Eta Invariant Mass in EE", 100, 0., 0.85);
231 hPt1Pi0EB_ = ibooker.
book1D(
"Pt1Pi0EB",
"Pt 1st most energetic Pi0 photon in EB", 100, 0., 20.);
234 hPt1Pi0EE_ = ibooker.
book1D(
"Pt1Pi0EE",
"Pt 1st most energetic Pi0 photon in EE", 100, 0., 20.);
237 hPt1EtaEB_ = ibooker.
book1D(
"Pt1EtaEB",
"Pt 1st most energetic Eta photon in EB", 100, 0., 20.);
240 hPt1EtaEE_ = ibooker.
book1D(
"Pt1EtaEE",
"Pt 1st most energetic Eta photon in EE", 100, 0., 20.);
243 hPt2Pi0EB_ = ibooker.
book1D(
"Pt2Pi0EB",
"Pt 2nd most energetic Pi0 photon in EB", 100, 0., 20.);
246 hPt2Pi0EE_ = ibooker.
book1D(
"Pt2Pi0EE",
"Pt 2nd most energetic Pi0 photon in EE", 100, 0., 20.);
249 hPt2EtaEB_ = ibooker.
book1D(
"Pt2EtaEB",
"Pt 2nd most energetic Eta photon in EB", 100, 0., 20.);
252 hPt2EtaEE_ = ibooker.
book1D(
"Pt2EtaEE",
"Pt 2nd most energetic Eta photon in EE", 100, 0., 20.);
279 hS4S91Pi0EB_ = ibooker.
book1D(
"S4S91Pi0EB",
"S4S9 1st most energetic Pi0 photon in EB", 50, 0., 1.);
282 hS4S91Pi0EE_ = ibooker.
book1D(
"S4S91Pi0EE",
"S4S9 1st most energetic Pi0 photon in EE", 50, 0., 1.);
285 hS4S91EtaEB_ = ibooker.
book1D(
"S4S91EtaEB",
"S4S9 1st most energetic Eta photon in EB", 50, 0., 1.);
288 hS4S91EtaEE_ = ibooker.
book1D(
"S4S91EtaEE",
"S4S9 1st most energetic Eta photon in EE", 50, 0., 1.);
291 hS4S92Pi0EB_ = ibooker.
book1D(
"S4S92Pi0EB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
294 hS4S92Pi0EE_ = ibooker.
book1D(
"S4S92Pi0EE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
297 hS4S92EtaEB_ = ibooker.
book1D(
"S4S92EtaEB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
300 hS4S92EtaEE_ = ibooker.
book1D(
"S4S92EtaEE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
313 std::vector<EcalRecHit> seeds;
316 vector<EBDetId> usedXtals;
354 for (itb = rhEBpi0->
begin(); itb != rhEBpi0->
end(); ++itb) {
356 double energy = itb->energy();
366 seeds.push_back(*itb);
372 etot += itb->energy();
389 vector<float> etClus;
390 vector<float> etaClus;
391 vector<float> thetaClus;
392 vector<float> phiClus;
393 vector<EBDetId> max_hit;
395 vector<vector<EcalRecHit>> RecHitsCluster;
396 vector<vector<EcalRecHit>> RecHitsCluster5x5;
397 vector<float> s4s9Clus;
398 vector<float> s9s25Clus;
405 for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
406 EBDetId seed_id = itseed->id();
407 std::vector<EBDetId>::const_iterator usedIds;
409 bool seedAlreadyUsed =
false;
410 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
411 if (*usedIds == seed_id) {
412 seedAlreadyUsed =
true;
421 std::vector<std::pair<DetId, float>> clus_used;
425 vector<EcalRecHit> RecHitsInWindow;
426 vector<EcalRecHit> RecHitsInWindow5x5;
428 double simple_energy = 0;
430 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
434 bool HitAlreadyUsed =
false;
435 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
436 if (*usedIds == *det) {
437 HitAlreadyUsed =
true;
449 usedXtals.push_back(*det);
450 RecHitsInWindow.push_back(
EBRecHits[nn]);
451 clus_used.push_back(std::make_pair(*det, 1));
452 simple_energy = simple_energy +
EBRecHits[
nn].energy();
455 if (simple_energy <= 0)
466 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
473 float et_s = simple_energy *
sin(theta_s);
481 for (
int i = 0;
i < 4;
i++)
484 int seed_ieta = seed_id.
ieta();
485 int seed_iphi = seed_id.
iphi();
492 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
500 float en = RecHitsInWindow[
j].energy();
505 if (dx <= 0 && dy <= 0)
507 if (dx >= 0 && dy <= 0)
509 if (dx <= 0 && dy >= 0)
511 if (dx >= 0 && dy >= 0)
523 float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
526 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
527 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
530 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
533 if (itdet0 != usedXtals.end())
543 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
550 eClus.push_back(simple_energy);
551 etClus.push_back(et_s);
552 etaClus.push_back(clus_pos.eta());
553 thetaClus.push_back(theta_s);
554 phiClus.push_back(clus_pos.phi());
555 s4s9Clus.push_back(s4s9_max);
556 s9s25Clus.push_back(e3x3 / e5x5);
557 RecHitsCluster.push_back(RecHitsInWindow);
558 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
575 for (Int_t
i = 0;
i < nClus;
i++) {
576 for (Int_t
j =
i + 1;
j < nClus;
j++) {
581 float p0x = etClus[
i] *
cos(phiClus[
i]);
582 float p1x = etClus[
j] *
cos(phiClus[
j]);
583 float p0y = etClus[
i] *
sin(phiClus[i]);
584 float p1y = etClus[
j] *
sin(phiClus[j]);
585 float p0z = eClus[
i] *
cos(thetaClus[i]);
586 float p1z = eClus[
j] *
cos(thetaClus[j]);
588 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
593 float m_inv =
sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
594 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
600 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
601 for (Int_t
k = 0;
k < nClus;
k++) {
605 if (
k == i ||
k == j)
608 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]), eClus[k] *
cos(thetaClus[k]));
610 float dretacl = fabs(etaClus[k] - pairVect.Eta());
611 float drcl = ClusVect.DeltaR(pairVect);
618 Iso = Iso + etClus[
k];
619 IsoClus.push_back(k);
663 for (itb = rhEBeta->
begin(); itb != rhEBeta->
end(); ++itb) {
665 double energy = itb->energy();
675 seeds.push_back(*itb);
681 etot += itb->energy();
698 vector<float> etClus;
699 vector<float> etaClus;
700 vector<float> thetaClus;
701 vector<float> phiClus;
702 vector<EBDetId> max_hit;
704 vector<vector<EcalRecHit>> RecHitsCluster;
705 vector<vector<EcalRecHit>> RecHitsCluster5x5;
706 vector<float> s4s9Clus;
707 vector<float> s9s25Clus;
714 for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
715 EBDetId seed_id = itseed->id();
716 std::vector<EBDetId>::const_iterator usedIds;
718 bool seedAlreadyUsed =
false;
719 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
720 if (*usedIds == seed_id) {
721 seedAlreadyUsed =
true;
730 std::vector<std::pair<DetId, float>> clus_used;
734 vector<EcalRecHit> RecHitsInWindow;
735 vector<EcalRecHit> RecHitsInWindow5x5;
737 double simple_energy = 0;
739 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
743 bool HitAlreadyUsed =
false;
744 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
745 if (*usedIds == *det) {
746 HitAlreadyUsed =
true;
758 usedXtals.push_back(*det);
759 RecHitsInWindow.push_back(
EBRecHits[nn]);
760 clus_used.push_back(std::make_pair(*det, 1));
761 simple_energy = simple_energy +
EBRecHits[
nn].energy();
764 if (simple_energy <= 0)
775 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
782 float et_s = simple_energy *
sin(theta_s);
790 for (
int i = 0;
i < 4;
i++)
793 int seed_ieta = seed_id.
ieta();
794 int seed_iphi = seed_id.
iphi();
801 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
809 float en = RecHitsInWindow[
j].energy();
814 if (dx <= 0 && dy <= 0)
816 if (dx >= 0 && dy <= 0)
818 if (dx <= 0 && dy >= 0)
820 if (dx >= 0 && dy >= 0)
832 float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
835 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
836 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
839 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
842 if (itdet0 != usedXtals.end())
852 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
859 eClus.push_back(simple_energy);
860 etClus.push_back(et_s);
861 etaClus.push_back(clus_pos.eta());
862 thetaClus.push_back(theta_s);
863 phiClus.push_back(clus_pos.phi());
864 s4s9Clus.push_back(s4s9_max);
865 s9s25Clus.push_back(e3x3 / e5x5);
866 RecHitsCluster.push_back(RecHitsInWindow);
867 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
884 for (Int_t
i = 0;
i < nClus;
i++) {
885 for (Int_t
j =
i + 1;
j < nClus;
j++) {
890 float p0x = etClus[
i] *
cos(phiClus[
i]);
891 float p1x = etClus[
j] *
cos(phiClus[
j]);
892 float p0y = etClus[
i] *
sin(phiClus[i]);
893 float p1y = etClus[
j] *
sin(phiClus[j]);
894 float p0z = eClus[
i] *
cos(thetaClus[i]);
895 float p1z = eClus[
j] *
cos(thetaClus[j]);
897 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
902 float m_inv =
sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
903 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
909 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
910 for (Int_t
k = 0;
k < nClus;
k++) {
914 if (
k == i ||
k == j)
917 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]), eClus[k] *
cos(thetaClus[k]));
919 float dretacl = fabs(etaClus[k] - pairVect.Eta());
920 float drcl = ClusVect.DeltaR(pairVect);
927 Iso = Iso + etClus[
k];
928 IsoClus.push_back(k);
980 std::vector<EcalRecHit> seedsEndCap;
983 vector<EEDetId> usedXtalsEndCap;
984 usedXtalsEndCap.clear();
988 for (ite = rhEEpi0->
begin(); ite != rhEEpi0->
end(); ite++) {
989 double energy = ite->energy();
1004 seedsEndCap.push_back(*ite);
1006 etot += ite->energy();
1017 vector<float> eClusEndCap;
1018 vector<float> etClusEndCap;
1019 vector<float> etaClusEndCap;
1020 vector<float> thetaClusEndCap;
1021 vector<float> phiClusEndCap;
1022 vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1023 vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1024 vector<float> s4s9ClusEndCap;
1025 vector<float> s9s25ClusEndCap;
1032 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1033 EEDetId seed_id = itseed->id();
1034 std::vector<EEDetId>::const_iterator usedIds;
1036 bool seedAlreadyUsed =
false;
1037 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1038 if (*usedIds == seed_id) {
1039 seedAlreadyUsed =
true;
1044 if (seedAlreadyUsed)
1047 std::vector<std::pair<DetId, float>> clus_used;
1049 vector<EcalRecHit> RecHitsInWindow;
1050 vector<EcalRecHit> RecHitsInWindow5x5;
1052 float simple_energy = 0;
1054 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1057 bool HitAlreadyUsed =
false;
1058 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1059 if (*usedIds == *det) {
1060 HitAlreadyUsed =
true;
1073 usedXtalsEndCap.push_back(*det);
1074 RecHitsInWindow.push_back(
EERecHits[nn]);
1075 clus_used.push_back(std::make_pair(*det, 1));
1076 simple_energy = simple_energy +
EERecHits[
nn].energy();
1079 if (simple_energy <= 0)
1085 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1086 float et_s = simple_energy *
sin(theta_s);
1094 for (
int i = 0;
i < 4;
i++)
1097 int ixSeed = seed_id.
ix();
1098 int iySeed = seed_id.
iy();
1102 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1104 int dx = ixSeed - det_this.
ix();
1105 int dy = iySeed - det_this.
iy();
1107 float en = RecHitsInWindow[
j].energy();
1109 if (dx <= 0 && dy <= 0)
1111 if (dx >= 0 && dy <= 0)
1113 if (dx <= 0 && dy >= 0)
1115 if (dx >= 0 && dy >= 0)
1127 eClusEndCap.push_back(simple_energy);
1128 etClusEndCap.push_back(et_s);
1129 etaClusEndCap.push_back(clus_pos.eta());
1130 thetaClusEndCap.push_back(theta_s);
1131 phiClusEndCap.push_back(clus_pos.phi());
1132 s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1133 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1134 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1135 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1150 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1151 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1154 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1155 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1156 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1157 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[j]);
1158 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1159 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[j]);
1161 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1164 float m_inv =
sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1165 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1169 vector<int> IsoClus;
1172 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1173 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1177 if (
k == i ||
k == j)
1180 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1181 etClusEndCap[k] *
sin(phiClusEndCap[k]),
1182 eClusEndCap[k] *
cos(thetaClusEndCap[k]));
1183 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1184 float drcl = clusVect.DeltaR(pairVect);
1187 Iso = Iso + etClusEndCap[
k];
1188 IsoClus.push_back(k);
1232 std::vector<EcalRecHit> seedsEndCap;
1233 seedsEndCap.clear();
1235 vector<EEDetId> usedXtalsEndCap;
1236 usedXtalsEndCap.clear();
1240 for (ite = rhEEeta->
begin(); ite != rhEEeta->
end(); ite++) {
1241 double energy = ite->energy();
1256 seedsEndCap.push_back(*ite);
1258 etot += ite->energy();
1269 vector<float> eClusEndCap;
1270 vector<float> etClusEndCap;
1271 vector<float> etaClusEndCap;
1272 vector<float> thetaClusEndCap;
1273 vector<float> phiClusEndCap;
1274 vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1275 vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1276 vector<float> s4s9ClusEndCap;
1277 vector<float> s9s25ClusEndCap;
1284 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1285 EEDetId seed_id = itseed->id();
1286 std::vector<EEDetId>::const_iterator usedIds;
1288 bool seedAlreadyUsed =
false;
1289 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1290 if (*usedIds == seed_id) {
1291 seedAlreadyUsed =
true;
1296 if (seedAlreadyUsed)
1299 std::vector<std::pair<DetId, float>> clus_used;
1301 vector<EcalRecHit> RecHitsInWindow;
1302 vector<EcalRecHit> RecHitsInWindow5x5;
1304 float simple_energy = 0;
1306 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1309 bool HitAlreadyUsed =
false;
1310 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1311 if (*usedIds == *det) {
1312 HitAlreadyUsed =
true;
1325 usedXtalsEndCap.push_back(*det);
1326 RecHitsInWindow.push_back(
EERecHits[nn]);
1327 clus_used.push_back(std::make_pair(*det, 1));
1328 simple_energy = simple_energy +
EERecHits[
nn].energy();
1331 if (simple_energy <= 0)
1337 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1338 float et_s = simple_energy *
sin(theta_s);
1346 for (
int i = 0;
i < 4;
i++)
1349 int ixSeed = seed_id.
ix();
1350 int iySeed = seed_id.
iy();
1354 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1356 int dx = ixSeed - det_this.
ix();
1357 int dy = iySeed - det_this.
iy();
1359 float en = RecHitsInWindow[
j].energy();
1361 if (dx <= 0 && dy <= 0)
1363 if (dx >= 0 && dy <= 0)
1365 if (dx <= 0 && dy >= 0)
1367 if (dx >= 0 && dy >= 0)
1379 eClusEndCap.push_back(simple_energy);
1380 etClusEndCap.push_back(et_s);
1381 etaClusEndCap.push_back(clus_pos.eta());
1382 thetaClusEndCap.push_back(theta_s);
1383 phiClusEndCap.push_back(clus_pos.phi());
1384 s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1385 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1386 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1387 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1402 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1403 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1406 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1407 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1408 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1409 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[j]);
1410 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1411 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[j]);
1413 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1416 float m_inv =
sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1417 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1421 vector<int> IsoClus;
1424 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1425 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1429 if (
k == i ||
k == j)
1432 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1433 etClusEndCap[k] *
sin(phiClusEndCap[k]),
1434 eClusEndCap[k] *
cos(thetaClusEndCap[k]));
1435 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1436 float drcl = clusVect.DeltaR(pairVect);
1439 Iso = Iso + etClusEndCap[
k];
1440 IsoClus.push_back(k);
1490 mdiff = (neta1 - neta2);
1499 mdiff = nphi1 - nphi2;
1501 mdiff = 360 -
std::abs(nphi1 - nphi2);
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEeta_
double seleEtaBeltDREndCap_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
MonitorElement * hiYDistrEEeta_
Distribution of rechits in iy EE (eta)
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hMinvPi0EE_
Pi0 invariant mass in EE.
double seleMinvMinPi0EndCap_
MonitorElement * hiXDistrEEeta_
Distribution of rechits in ix EE (eta)
MonitorElement * hiPhiDistrEBpi0_
Distribution of rechits in iPhi (pi0)
MonitorElement * hPt1Pi0EB_
Pt of the 1st most energetic Pi0 photon in EB.
MonitorElement * hPt2Pi0EE_
Pt of the 2nd most energetic Pi0 photon in EE.
MonitorElement * hiYDistrEEpi0_
Distribution of rechits in iy EE (pi0)
double ptMinForIsolationEtaEndCap_
MonitorElement * hPtPi0EE_
Pi0 Pt in EE.
MonitorElement * hMinvEtaEB_
Eta invariant mass in EB.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EEDetId > detIdEERecHits
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
PositionCalc posCalculator_
double seleMinvMinEtaEndCap_
void setCurrentFolder(std::string const &fullpath)
MonitorElement * hS4S92EtaEB_
S4S9 of the 2nd most energetic eta photon.
std::vector< EBDetId > detIdEBRecHits
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEBeta_
double selePtGammaEndCap_
for pi0->gg endcap
MonitorElement * hMeanRecHitEnergyEBeta_
Distribution of Mean energy per rechit EB (eta)
Sin< T >::type sin(const T &t)
double seleMinvMaxPi0EndCap_
std::string folderName_
DQM folder name.
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * hMeanRecHitEnergyEEpi0_
Distribution of Mean energy per rechit EE (pi0)
MonitorElement * hNRecHitsEBpi0_
Distribution of number of RecHits EB (pi0)
MonitorElement * hPt2EtaEE_
Pt of the 2nd most energetic Eta photon in EE.
MonitorElement * hRechitEnergyEBpi0_
Energy Distribution of rechits EB (pi0)
std::string fileName_
Output file name if required.
MonitorElement * hRechitEnergyEEpi0_
Energy Distribution of rechits EE (pi0)
double seleMinvMaxEtaEndCap_
std::vector< EcalRecHit > EERecHits
MonitorElement * hPtEtaEB_
Eta Pt in EB.
MonitorElement * hIsoEtaEB_
Eta Iso EB.
bool saveToFile_
Write to file.
double seleS4S9GammaEtaEndCap_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * hIsoPi0EB_
Pi0 Iso EB.
bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y)
MonitorElement * hS4S91Pi0EE_
S4S9 of the 1st most energetic pi0 photon EE.
MonitorElement * hS4S91EtaEB_
S4S9 of the 1st most energetic eta photon.
double ptMinForIsolationEta_
int iphi() const
get the crystal iphi
MonitorElement * hMinvPi0EB_
Pi0 invariant mass in EB.
MonitorElement * hS4S92Pi0EE_
S4S9 of the 2nd most energetic pi0 photon EE.
void convxtalid(int &, int &)
double ptMinForIsolationEndCap_
MonitorElement * hiEtaDistrEBpi0_
Distribution of rechits in iEta (pi0)
double selePi0BeltDetaEndCap_
MonitorElement * hS4S91Pi0EB_
S4S9 of the 1st most energetic pi0 photon.
MonitorElement * hiXDistrEEpi0_
Distribution of rechits in ix EE (pi0)
MonitorElement * hiEtaDistrEBeta_
Distribution of rechits in iEta (eta)
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEBpi0_
object to monitor
bool isMonEBpi0_
which subdet will be monitored
double selePtGammaEtaEndCap_
for eta->gg endcap
Cos< T >::type cos(const T &t)
int diff_nphi_s(int, int)
double ptMinForIsolation_
int diff_neta_s(int, int)
double seleXtalMinEnergy_
Abs< T >::type abs(const T &t)
DQMSourcePi0(const edm::ParameterSet &)
int ieta() const
get the crystal ieta
MonitorElement * hPtEtaEE_
Eta Pt in EE.
double seleXtalMinEnergyEndCap_
double seleS9S25GammaEtaEndCap_
MonitorElement * hEventEnergyEEpi0_
Distribution of total event energy EE (pi0)
const_iterator end() const
MonitorElement * hNRecHitsEEeta_
Distribution of number of RecHits EE (eta)
double selePtGammaEta_
for eta->gg barrel
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEpi0_
object to monitor
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
double seleEtaBeltDetaEndCap_
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * hiPhiDistrEBeta_
Distribution of rechits in iPhi (eta)
MonitorElement * hRechitEnergyEBeta_
Energy Distribution of rechits EB (eta)
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
MonitorElement * hPt1EtaEE_
Pt of the 1st most energetic Eta photon in EE.
MonitorElement * hEventEnergyEBpi0_
Distribution of total event energy EB (pi0)
MonitorElement * hPt1EtaEB_
Pt of the 1st most energetic Eta photon in EB.
MonitorElement * hEventEnergyEBeta_
Distribution of total event energy EB (eta)
MonitorElement * hIsoEtaEE_
Eta Iso EE.
MonitorElement * hS4S92Pi0EB_
S4S9 of the 2nd most energetic pi0 photon.
MonitorElement * hPt2EtaEB_
Pt of the 2nd most energetic Eta photon in EB.
std::vector< EcalRecHit > EBRecHits
MonitorElement * hMinvEtaEE_
Eta invariant mass in EE.
MonitorElement * hPtPi0EB_
Pi0 Pt in EB.
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=0)
MonitorElement * hS4S92EtaEE_
S4S9 of the 2nd most energetic eta photon EE.
unsigned int prescaleFactor_
Monitor every prescaleFactor_ events.
MonitorElement * hMeanRecHitEnergyEEeta_
Distribution of Mean energy per rechit EE (eta)
MonitorElement * hIsoPi0EE_
Pi0 Iso EE.
double seleS4S9GammaEndCap_
MonitorElement * hNRecHitsEBeta_
Distribution of number of RecHits EB (eta)
MonitorElement * hPt1Pi0EE_
Pt of the 1st most energetic Pi0 photon in EE.
MonitorElement * hS4S91EtaEE_
S4S9 of the 1st most energetic eta photon EE.
MonitorElement * hRechitEnergyEEeta_
Energy Distribution of rechits EE (eta)
MonitorElement * hMeanRecHitEnergyEBpi0_
Distribution of Mean energy per rechit EB (pi0)
MonitorElement * hEventEnergyEEeta_
Distribution of total event energy EE (eta)
MonitorElement * hNRecHitsEEpi0_
Distribution of number of RecHits EE (pi0)
double selePi0BeltDREndCap_
const_iterator begin() const
double seleS9S25GammaEta_
MonitorElement * hPt2Pi0EB_
Pt of the 2nd most energetic Pi0 photon in EB.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double clusSeedThrEndCap_