37 #define TWOPI 6.283185308 70 if (clusPhiSize_ % 2 == 0 || clusEtaSize_ % 2 == 0)
71 edm::LogError(
"AlCaPi0RecHitsProducerError") <<
"Size of eta/phi for simple clustering should be odd numbers";
220 hMinvPi0EB_ = ibooker.
book1D(
"Pi0InvmassEB",
"Pi0 Invariant Mass in EB", 100, 0., 0.5);
223 hMinvPi0EE_ = ibooker.
book1D(
"Pi0InvmassEE",
"Pi0 Invariant Mass in EE", 100, 0., 0.5);
226 hMinvEtaEB_ = ibooker.
book1D(
"EtaInvmassEB",
"Eta Invariant Mass in EB", 100, 0., 0.85);
229 hMinvEtaEE_ = ibooker.
book1D(
"EtaInvmassEE",
"Eta Invariant Mass in EE", 100, 0., 0.85);
232 hPt1Pi0EB_ = ibooker.
book1D(
"Pt1Pi0EB",
"Pt 1st most energetic Pi0 photon in EB", 100, 0., 20.);
235 hPt1Pi0EE_ = ibooker.
book1D(
"Pt1Pi0EE",
"Pt 1st most energetic Pi0 photon in EE", 100, 0., 20.);
238 hPt1EtaEB_ = ibooker.
book1D(
"Pt1EtaEB",
"Pt 1st most energetic Eta photon in EB", 100, 0., 20.);
241 hPt1EtaEE_ = ibooker.
book1D(
"Pt1EtaEE",
"Pt 1st most energetic Eta photon in EE", 100, 0., 20.);
244 hPt2Pi0EB_ = ibooker.
book1D(
"Pt2Pi0EB",
"Pt 2nd most energetic Pi0 photon in EB", 100, 0., 20.);
247 hPt2Pi0EE_ = ibooker.
book1D(
"Pt2Pi0EE",
"Pt 2nd most energetic Pi0 photon in EE", 100, 0., 20.);
250 hPt2EtaEB_ = ibooker.
book1D(
"Pt2EtaEB",
"Pt 2nd most energetic Eta photon in EB", 100, 0., 20.);
253 hPt2EtaEE_ = ibooker.
book1D(
"Pt2EtaEE",
"Pt 2nd most energetic Eta photon in EE", 100, 0., 20.);
280 hS4S91Pi0EB_ = ibooker.
book1D(
"S4S91Pi0EB",
"S4S9 1st most energetic Pi0 photon in EB", 50, 0., 1.);
283 hS4S91Pi0EE_ = ibooker.
book1D(
"S4S91Pi0EE",
"S4S9 1st most energetic Pi0 photon in EE", 50, 0., 1.);
286 hS4S91EtaEB_ = ibooker.
book1D(
"S4S91EtaEB",
"S4S9 1st most energetic Eta photon in EB", 50, 0., 1.);
289 hS4S91EtaEE_ = ibooker.
book1D(
"S4S91EtaEE",
"S4S9 1st most energetic Eta photon in EE", 50, 0., 1.);
292 hS4S92Pi0EB_ = ibooker.
book1D(
"S4S92Pi0EB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
295 hS4S92Pi0EE_ = ibooker.
book1D(
"S4S92Pi0EE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
298 hS4S92EtaEB_ = ibooker.
book1D(
"S4S92EtaEB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
301 hS4S92EtaEE_ = ibooker.
book1D(
"S4S92EtaEE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
314 std::vector<EcalRecHit> seeds;
317 vector<EBDetId> usedXtals;
355 for (itb = rhEBpi0->
begin(); itb != rhEBpi0->
end(); ++itb) {
357 double energy = itb->energy();
367 seeds.push_back(*itb);
373 etot += itb->energy();
390 vector<float> etClus;
391 vector<float> etaClus;
392 vector<float> thetaClus;
393 vector<float> phiClus;
394 vector<EBDetId> max_hit;
396 vector<vector<EcalRecHit>> RecHitsCluster;
397 vector<vector<EcalRecHit>> RecHitsCluster5x5;
398 vector<float> s4s9Clus;
399 vector<float> s9s25Clus;
406 for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
407 EBDetId seed_id = itseed->id();
408 std::vector<EBDetId>::const_iterator usedIds;
410 bool seedAlreadyUsed =
false;
411 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
412 if (*usedIds == seed_id) {
413 seedAlreadyUsed =
true;
422 std::vector<std::pair<DetId, float>> clus_used;
426 vector<EcalRecHit> RecHitsInWindow;
427 vector<EcalRecHit> RecHitsInWindow5x5;
429 double simple_energy = 0;
431 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
435 bool HitAlreadyUsed =
false;
436 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
437 if (*usedIds == *det) {
438 HitAlreadyUsed =
true;
450 usedXtals.push_back(*det);
451 RecHitsInWindow.push_back(
EBRecHits[nn]);
452 clus_used.push_back(std::make_pair(*det, 1));
453 simple_energy = simple_energy +
EBRecHits[
nn].energy();
456 if (simple_energy <= 0)
467 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
474 float et_s = simple_energy *
sin(theta_s);
482 for (
int i = 0;
i < 4;
i++)
485 int seed_ieta = seed_id.
ieta();
486 int seed_iphi = seed_id.
iphi();
493 for (
unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
496 int ieta = det.
ieta();
497 int iphi = det.
iphi();
501 float en = RecHitsInWindow[j].energy();
506 if (dx <= 0 && dy <= 0)
508 if (dx >= 0 && dy <= 0)
510 if (dx <= 0 && dy >= 0)
512 if (dx >= 0 && dy >= 0)
524 float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
527 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
528 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
531 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
534 if (itdet0 != usedXtals.end())
544 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
551 eClus.push_back(simple_energy);
552 etClus.push_back(et_s);
553 etaClus.push_back(clus_pos.eta());
554 thetaClus.push_back(theta_s);
555 phiClus.push_back(clus_pos.phi());
556 s4s9Clus.push_back(s4s9_max);
557 s9s25Clus.push_back(e3x3 / e5x5);
558 RecHitsCluster.push_back(RecHitsInWindow);
559 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
576 for (Int_t
i = 0;
i < nClus;
i++) {
577 for (Int_t j =
i + 1; j < nClus; j++) {
582 float p0x = etClus[
i] *
cos(phiClus[
i]);
583 float p1x = etClus[j] *
cos(phiClus[j]);
584 float p0y = etClus[
i] *
sin(phiClus[i]);
585 float p1y = etClus[j] *
sin(phiClus[j]);
586 float p0z = eClus[
i] *
cos(thetaClus[i]);
587 float p1z = eClus[j] *
cos(thetaClus[j]);
589 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
594 float m_inv =
sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
595 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
601 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
602 for (Int_t
k = 0;
k < nClus;
k++) {
606 if (
k == i ||
k == j)
609 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]), eClus[k] *
cos(thetaClus[k]));
611 float dretacl = fabs(etaClus[k] - pairVect.Eta());
612 float drcl = ClusVect.DeltaR(pairVect);
619 Iso = Iso + etClus[
k];
620 IsoClus.push_back(k);
664 for (itb = rhEBeta->
begin(); itb != rhEBeta->
end(); ++itb) {
666 double energy = itb->energy();
676 seeds.push_back(*itb);
682 etot += itb->energy();
699 vector<float> etClus;
700 vector<float> etaClus;
701 vector<float> thetaClus;
702 vector<float> phiClus;
703 vector<EBDetId> max_hit;
705 vector<vector<EcalRecHit>> RecHitsCluster;
706 vector<vector<EcalRecHit>> RecHitsCluster5x5;
707 vector<float> s4s9Clus;
708 vector<float> s9s25Clus;
715 for (std::vector<EcalRecHit>::iterator itseed = seeds.begin(); itseed != seeds.end(); itseed++) {
716 EBDetId seed_id = itseed->id();
717 std::vector<EBDetId>::const_iterator usedIds;
719 bool seedAlreadyUsed =
false;
720 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
721 if (*usedIds == seed_id) {
722 seedAlreadyUsed =
true;
731 std::vector<std::pair<DetId, float>> clus_used;
735 vector<EcalRecHit> RecHitsInWindow;
736 vector<EcalRecHit> RecHitsInWindow5x5;
738 double simple_energy = 0;
740 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
744 bool HitAlreadyUsed =
false;
745 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
746 if (*usedIds == *det) {
747 HitAlreadyUsed =
true;
759 usedXtals.push_back(*det);
760 RecHitsInWindow.push_back(
EBRecHits[nn]);
761 clus_used.push_back(std::make_pair(*det, 1));
762 simple_energy = simple_energy +
EBRecHits[
nn].energy();
765 if (simple_energy <= 0)
776 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
783 float et_s = simple_energy *
sin(theta_s);
791 for (
int i = 0;
i < 4;
i++)
794 int seed_ieta = seed_id.
ieta();
795 int seed_iphi = seed_id.
iphi();
802 for (
unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
805 int ieta = det.
ieta();
806 int iphi = det.
iphi();
810 float en = RecHitsInWindow[j].energy();
815 if (dx <= 0 && dy <= 0)
817 if (dx >= 0 && dy <= 0)
819 if (dx <= 0 && dy >= 0)
821 if (dx >= 0 && dy >= 0)
833 float s4s9_max = *max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
836 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
837 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
840 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
843 if (itdet0 != usedXtals.end())
853 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
860 eClus.push_back(simple_energy);
861 etClus.push_back(et_s);
862 etaClus.push_back(clus_pos.eta());
863 thetaClus.push_back(theta_s);
864 phiClus.push_back(clus_pos.phi());
865 s4s9Clus.push_back(s4s9_max);
866 s9s25Clus.push_back(e3x3 / e5x5);
867 RecHitsCluster.push_back(RecHitsInWindow);
868 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
885 for (Int_t
i = 0;
i < nClus;
i++) {
886 for (Int_t j =
i + 1; j < nClus; j++) {
891 float p0x = etClus[
i] *
cos(phiClus[
i]);
892 float p1x = etClus[j] *
cos(phiClus[j]);
893 float p0y = etClus[
i] *
sin(phiClus[i]);
894 float p1y = etClus[j] *
sin(phiClus[j]);
895 float p0z = eClus[
i] *
cos(thetaClus[i]);
896 float p1z = eClus[j] *
cos(thetaClus[j]);
898 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
903 float m_inv =
sqrt((eClus[i] + eClus[j]) * (eClus[i] + eClus[j]) - (p0x + p1x) * (p0x + p1x) -
904 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
910 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
911 for (Int_t
k = 0;
k < nClus;
k++) {
915 if (
k == i ||
k == j)
918 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]), eClus[k] *
cos(thetaClus[k]));
920 float dretacl = fabs(etaClus[k] - pairVect.Eta());
921 float drcl = ClusVect.DeltaR(pairVect);
928 Iso = Iso + etClus[
k];
929 IsoClus.push_back(k);
981 std::vector<EcalRecHit> seedsEndCap;
984 vector<EEDetId> usedXtalsEndCap;
985 usedXtalsEndCap.clear();
989 for (ite = rhEEpi0->
begin(); ite != rhEEpi0->
end(); ite++) {
990 double energy = ite->energy();
1005 seedsEndCap.push_back(*ite);
1007 etot += ite->energy();
1018 vector<float> eClusEndCap;
1019 vector<float> etClusEndCap;
1020 vector<float> etaClusEndCap;
1021 vector<float> thetaClusEndCap;
1022 vector<float> phiClusEndCap;
1023 vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1024 vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1025 vector<float> s4s9ClusEndCap;
1026 vector<float> s9s25ClusEndCap;
1033 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1034 EEDetId seed_id = itseed->id();
1035 std::vector<EEDetId>::const_iterator usedIds;
1037 bool seedAlreadyUsed =
false;
1038 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1039 if (*usedIds == seed_id) {
1040 seedAlreadyUsed =
true;
1045 if (seedAlreadyUsed)
1048 std::vector<std::pair<DetId, float>> clus_used;
1050 vector<EcalRecHit> RecHitsInWindow;
1051 vector<EcalRecHit> RecHitsInWindow5x5;
1053 float simple_energy = 0;
1055 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1058 bool HitAlreadyUsed =
false;
1059 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1060 if (*usedIds == *det) {
1061 HitAlreadyUsed =
true;
1074 usedXtalsEndCap.push_back(*det);
1075 RecHitsInWindow.push_back(
EERecHits[nn]);
1076 clus_used.push_back(std::make_pair(*det, 1));
1077 simple_energy = simple_energy +
EERecHits[
nn].energy();
1080 if (simple_energy <= 0)
1086 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1087 float et_s = simple_energy *
sin(theta_s);
1095 for (
int i = 0;
i < 4;
i++)
1098 int ixSeed = seed_id.
ix();
1099 int iySeed = seed_id.
iy();
1103 for (
unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
1105 int dx = ixSeed - det_this.
ix();
1106 int dy = iySeed - det_this.
iy();
1108 float en = RecHitsInWindow[j].energy();
1110 if (dx <= 0 && dy <= 0)
1112 if (dx >= 0 && dy <= 0)
1114 if (dx <= 0 && dy >= 0)
1116 if (dx >= 0 && dy >= 0)
1128 eClusEndCap.push_back(simple_energy);
1129 etClusEndCap.push_back(et_s);
1130 etaClusEndCap.push_back(clus_pos.eta());
1131 thetaClusEndCap.push_back(theta_s);
1132 phiClusEndCap.push_back(clus_pos.phi());
1133 s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1134 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1135 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1136 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1151 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1152 for (Int_t j =
i + 1; j < nClusEndCap; j++) {
1155 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1156 float p1x = etClusEndCap[j] *
cos(phiClusEndCap[j]);
1157 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1158 float p1y = etClusEndCap[j] *
sin(phiClusEndCap[j]);
1159 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1160 float p1z = eClusEndCap[j] *
cos(thetaClusEndCap[j]);
1162 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1165 float m_inv =
sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1166 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1170 vector<int> IsoClus;
1173 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1174 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1178 if (
k == i ||
k == j)
1181 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1182 etClusEndCap[k] *
sin(phiClusEndCap[k]),
1183 eClusEndCap[k] *
cos(thetaClusEndCap[k]));
1184 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1185 float drcl = clusVect.DeltaR(pairVect);
1188 Iso = Iso + etClusEndCap[
k];
1189 IsoClus.push_back(k);
1233 std::vector<EcalRecHit> seedsEndCap;
1234 seedsEndCap.clear();
1236 vector<EEDetId> usedXtalsEndCap;
1237 usedXtalsEndCap.clear();
1241 for (ite = rhEEeta->
begin(); ite != rhEEeta->
end(); ite++) {
1242 double energy = ite->energy();
1257 seedsEndCap.push_back(*ite);
1259 etot += ite->energy();
1270 vector<float> eClusEndCap;
1271 vector<float> etClusEndCap;
1272 vector<float> etaClusEndCap;
1273 vector<float> thetaClusEndCap;
1274 vector<float> phiClusEndCap;
1275 vector<vector<EcalRecHit>> RecHitsClusterEndCap;
1276 vector<vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1277 vector<float> s4s9ClusEndCap;
1278 vector<float> s9s25ClusEndCap;
1285 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1286 EEDetId seed_id = itseed->id();
1287 std::vector<EEDetId>::const_iterator usedIds;
1289 bool seedAlreadyUsed =
false;
1290 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1291 if (*usedIds == seed_id) {
1292 seedAlreadyUsed =
true;
1297 if (seedAlreadyUsed)
1300 std::vector<std::pair<DetId, float>> clus_used;
1302 vector<EcalRecHit> RecHitsInWindow;
1303 vector<EcalRecHit> RecHitsInWindow5x5;
1305 float simple_energy = 0;
1307 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1310 bool HitAlreadyUsed =
false;
1311 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1312 if (*usedIds == *det) {
1313 HitAlreadyUsed =
true;
1326 usedXtalsEndCap.push_back(*det);
1327 RecHitsInWindow.push_back(
EERecHits[nn]);
1328 clus_used.push_back(std::make_pair(*det, 1));
1329 simple_energy = simple_energy +
EERecHits[
nn].energy();
1332 if (simple_energy <= 0)
1338 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1339 float et_s = simple_energy *
sin(theta_s);
1347 for (
int i = 0;
i < 4;
i++)
1350 int ixSeed = seed_id.
ix();
1351 int iySeed = seed_id.
iy();
1355 for (
unsigned int j = 0; j < RecHitsInWindow.size(); j++) {
1357 int dx = ixSeed - det_this.
ix();
1358 int dy = iySeed - det_this.
iy();
1360 float en = RecHitsInWindow[j].energy();
1362 if (dx <= 0 && dy <= 0)
1364 if (dx >= 0 && dy <= 0)
1366 if (dx <= 0 && dy >= 0)
1368 if (dx >= 0 && dy >= 0)
1380 eClusEndCap.push_back(simple_energy);
1381 etClusEndCap.push_back(et_s);
1382 etaClusEndCap.push_back(clus_pos.eta());
1383 thetaClusEndCap.push_back(theta_s);
1384 phiClusEndCap.push_back(clus_pos.phi());
1385 s4s9ClusEndCap.push_back(*max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1386 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1387 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1388 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1403 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1404 for (Int_t j =
i + 1; j < nClusEndCap; j++) {
1407 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1408 float p1x = etClusEndCap[j] *
cos(phiClusEndCap[j]);
1409 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1410 float p1y = etClusEndCap[j] *
sin(phiClusEndCap[j]);
1411 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1412 float p1z = eClusEndCap[j] *
cos(thetaClusEndCap[j]);
1414 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1417 float m_inv =
sqrt((eClusEndCap[i] + eClusEndCap[j]) * (eClusEndCap[i] + eClusEndCap[j]) -
1418 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1422 vector<int> IsoClus;
1425 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1426 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1430 if (
k == i ||
k == j)
1433 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1434 etClusEndCap[k] *
sin(phiClusEndCap[k]),
1435 eClusEndCap[k] *
cos(thetaClusEndCap[k]));
1436 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1437 float drcl = clusVect.DeltaR(pairVect);
1440 Iso = Iso + etClusEndCap[
k];
1441 IsoClus.push_back(k);
1491 mdiff = (neta1 - neta2);
1500 mdiff = nphi1 - nphi2;
1502 mdiff = 360 -
std::abs(nphi1 - nphi2);
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEeta_
double seleEtaBeltDREndCap_
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_
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.
void setCurrentFolder(std::string const &fullpath)
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)
MonitorElement * book1D(Args &&...args)
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)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
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.
double clusSeedThrEndCap_