318 #define TWOPI 6.283185308 351 edm::LogError(
"AlCaPi0RecHitsProducerError") <<
"Size of eta/phi for simple clustering should be odd numbers";
500 hMinvPi0EB_ = ibooker.
book1D(
"Pi0InvmassEB",
"Pi0 Invariant Mass in EB", 100, 0., 0.5);
503 hMinvPi0EE_ = ibooker.
book1D(
"Pi0InvmassEE",
"Pi0 Invariant Mass in EE", 100, 0., 0.5);
506 hMinvEtaEB_ = ibooker.
book1D(
"EtaInvmassEB",
"Eta Invariant Mass in EB", 100, 0., 0.85);
509 hMinvEtaEE_ = ibooker.
book1D(
"EtaInvmassEE",
"Eta Invariant Mass in EE", 100, 0., 0.85);
512 hPt1Pi0EB_ = ibooker.
book1D(
"Pt1Pi0EB",
"Pt 1st most energetic Pi0 photon in EB", 100, 0., 20.);
515 hPt1Pi0EE_ = ibooker.
book1D(
"Pt1Pi0EE",
"Pt 1st most energetic Pi0 photon in EE", 100, 0., 20.);
518 hPt1EtaEB_ = ibooker.
book1D(
"Pt1EtaEB",
"Pt 1st most energetic Eta photon in EB", 100, 0., 20.);
521 hPt1EtaEE_ = ibooker.
book1D(
"Pt1EtaEE",
"Pt 1st most energetic Eta photon in EE", 100, 0., 20.);
524 hPt2Pi0EB_ = ibooker.
book1D(
"Pt2Pi0EB",
"Pt 2nd most energetic Pi0 photon in EB", 100, 0., 20.);
527 hPt2Pi0EE_ = ibooker.
book1D(
"Pt2Pi0EE",
"Pt 2nd most energetic Pi0 photon in EE", 100, 0., 20.);
530 hPt2EtaEB_ = ibooker.
book1D(
"Pt2EtaEB",
"Pt 2nd most energetic Eta photon in EB", 100, 0., 20.);
533 hPt2EtaEE_ = ibooker.
book1D(
"Pt2EtaEE",
"Pt 2nd most energetic Eta photon in EE", 100, 0., 20.);
560 hS4S91Pi0EB_ = ibooker.
book1D(
"S4S91Pi0EB",
"S4S9 1st most energetic Pi0 photon in EB", 50, 0., 1.);
563 hS4S91Pi0EE_ = ibooker.
book1D(
"S4S91Pi0EE",
"S4S9 1st most energetic Pi0 photon in EE", 50, 0., 1.);
566 hS4S91EtaEB_ = ibooker.
book1D(
"S4S91EtaEB",
"S4S9 1st most energetic Eta photon in EB", 50, 0., 1.);
569 hS4S91EtaEE_ = ibooker.
book1D(
"S4S91EtaEE",
"S4S9 1st most energetic Eta photon in EE", 50, 0., 1.);
572 hS4S92Pi0EB_ = ibooker.
book1D(
"S4S92Pi0EB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
575 hS4S92Pi0EE_ = ibooker.
book1D(
"S4S92Pi0EE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
578 hS4S92EtaEB_ = ibooker.
book1D(
"S4S92EtaEB",
"S4S9 2nd most energetic Pi0 photon in EB", 50, 0., 1.);
581 hS4S92EtaEE_ = ibooker.
book1D(
"S4S92EtaEE",
"S4S9 2nd most energetic Pi0 photon in EE", 50, 0., 1.);
593 std::vector<EcalRecHit>
seeds;
596 std::vector<EBDetId> usedXtals;
635 for (itb = rhEBpi0->
begin(); itb != rhEBpi0->
end(); ++itb) {
637 double energy = itb->energy();
647 seeds.push_back(*itb);
653 etot += itb->energy();
669 std::vector<float> eClus;
670 std::vector<float> etClus;
671 std::vector<float> etaClus;
672 std::vector<float> thetaClus;
673 std::vector<float> phiClus;
674 std::vector<EBDetId> max_hit;
676 std::vector<std::vector<EcalRecHit>> RecHitsCluster;
677 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5;
678 std::vector<float> s4s9Clus;
679 std::vector<float> s9s25Clus;
686 for (std::vector<EcalRecHit>::iterator itseed =
seeds.begin(); itseed !=
seeds.end(); itseed++) {
687 EBDetId seed_id = itseed->id();
688 std::vector<EBDetId>::const_iterator usedIds;
690 bool seedAlreadyUsed =
false;
691 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
692 if (*usedIds == seed_id) {
693 seedAlreadyUsed =
true;
702 std::vector<std::pair<DetId, float>> clus_used;
706 std::vector<EcalRecHit> RecHitsInWindow;
707 std::vector<EcalRecHit> RecHitsInWindow5x5;
709 double simple_energy = 0;
711 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
715 bool HitAlreadyUsed =
false;
716 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
717 if (*usedIds == *det) {
718 HitAlreadyUsed =
true;
730 usedXtals.push_back(*det);
732 clus_used.push_back(std::make_pair(*det, 1));
733 simple_energy = simple_energy +
EBRecHits[
nn].energy();
736 if (simple_energy <= 0)
747 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
754 float et_s = simple_energy *
sin(theta_s);
762 for (
int i = 0;
i < 4;
i++)
765 int seed_ieta = seed_id.
ieta();
766 int seed_iphi = seed_id.
iphi();
773 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
781 float en = RecHitsInWindow[
j].energy();
786 if (
dx <= 0 &&
dy <= 0)
788 if (
dx >= 0 &&
dy <= 0)
790 if (dx <= 0 && dy >= 0)
792 if (
dx >= 0 &&
dy >= 0)
804 float s4s9_max = *std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
807 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
808 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
811 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
814 if (itdet0 != usedXtals.end())
831 eClus.push_back(simple_energy);
832 etClus.push_back(et_s);
833 etaClus.push_back(clus_pos.eta());
834 thetaClus.push_back(theta_s);
835 phiClus.push_back(clus_pos.phi());
836 s4s9Clus.push_back(s4s9_max);
837 s9s25Clus.push_back(e3x3 / e5x5);
838 RecHitsCluster.push_back(RecHitsInWindow);
839 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
856 for (Int_t
i = 0;
i < nClus;
i++) {
857 for (Int_t
j =
i + 1;
j < nClus;
j++) {
862 float p0x = etClus[
i] *
cos(phiClus[
i]);
863 float p1x = etClus[
j] *
cos(phiClus[
j]);
864 float p0y = etClus[
i] *
sin(phiClus[
i]);
865 float p1y = etClus[
j] *
sin(phiClus[
j]);
866 float p0z = eClus[
i] *
cos(thetaClus[
i]);
867 float p1z = eClus[
j] *
cos(thetaClus[
j]);
869 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
874 float m_inv =
sqrt((eClus[
i] + eClus[
j]) * (eClus[
i] + eClus[
j]) - (p0x + p1x) * (p0x + p1x) -
875 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
878 std::vector<int> IsoClus;
881 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
882 for (Int_t
k = 0;
k < nClus;
k++) {
886 if (
k ==
i ||
k ==
j)
889 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[
k] *
sin(phiClus[
k]), eClus[
k] *
cos(thetaClus[
k]));
891 float dretacl = fabs(etaClus[
k] - pairVect.Eta());
892 float drcl = ClusVect.DeltaR(pairVect);
899 Iso = Iso + etClus[
k];
900 IsoClus.push_back(
k);
944 for (itb = rhEBeta->
begin(); itb != rhEBeta->
end(); ++itb) {
946 double energy = itb->energy();
956 seeds.push_back(*itb);
962 etot += itb->energy();
978 std::vector<float> eClus;
979 std::vector<float> etClus;
980 std::vector<float> etaClus;
981 std::vector<float> thetaClus;
982 std::vector<float> phiClus;
983 std::vector<EBDetId> max_hit;
985 std::vector<std::vector<EcalRecHit>> RecHitsCluster;
986 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5;
987 std::vector<float> s4s9Clus;
988 std::vector<float> s9s25Clus;
995 for (std::vector<EcalRecHit>::iterator itseed =
seeds.begin(); itseed !=
seeds.end(); itseed++) {
996 EBDetId seed_id = itseed->id();
997 std::vector<EBDetId>::const_iterator usedIds;
999 bool seedAlreadyUsed =
false;
1000 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
1001 if (*usedIds == seed_id) {
1002 seedAlreadyUsed =
true;
1008 if (seedAlreadyUsed)
1011 std::vector<std::pair<DetId, float>> clus_used;
1015 std::vector<EcalRecHit> RecHitsInWindow;
1016 std::vector<EcalRecHit> RecHitsInWindow5x5;
1018 double simple_energy = 0;
1020 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1024 bool HitAlreadyUsed =
false;
1025 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
1026 if (*usedIds == *det) {
1027 HitAlreadyUsed =
true;
1039 usedXtals.push_back(*det);
1041 clus_used.push_back(std::make_pair(*det, 1));
1042 simple_energy = simple_energy +
EBRecHits[
nn].energy();
1045 if (simple_energy <= 0)
1056 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1063 float et_s = simple_energy *
sin(theta_s);
1071 for (
int i = 0;
i < 4;
i++)
1074 int seed_ieta = seed_id.
ieta();
1075 int seed_iphi = seed_id.
iphi();
1082 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1090 float en = RecHitsInWindow[
j].energy();
1095 if (
dx <= 0 &&
dy <= 0)
1097 if (
dx >= 0 &&
dy <= 0)
1099 if (dx <= 0 && dy >= 0)
1101 if (
dx >= 0 &&
dy >= 0)
1113 float s4s9_max = *std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
1116 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
1117 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
1120 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
1123 if (itdet0 != usedXtals.end())
1140 eClus.push_back(simple_energy);
1141 etClus.push_back(et_s);
1142 etaClus.push_back(clus_pos.eta());
1143 thetaClus.push_back(theta_s);
1144 phiClus.push_back(clus_pos.phi());
1145 s4s9Clus.push_back(s4s9_max);
1146 s9s25Clus.push_back(e3x3 / e5x5);
1147 RecHitsCluster.push_back(RecHitsInWindow);
1148 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
1165 for (Int_t
i = 0;
i < nClus;
i++) {
1166 for (Int_t
j =
i + 1;
j < nClus;
j++) {
1171 float p0x = etClus[
i] *
cos(phiClus[
i]);
1172 float p1x = etClus[
j] *
cos(phiClus[
j]);
1173 float p0y = etClus[
i] *
sin(phiClus[
i]);
1174 float p1y = etClus[
j] *
sin(phiClus[
j]);
1175 float p0z = eClus[
i] *
cos(thetaClus[
i]);
1176 float p1z = eClus[
j] *
cos(thetaClus[
j]);
1178 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1183 float m_inv =
sqrt((eClus[
i] + eClus[
j]) * (eClus[
i] + eClus[
j]) - (p0x + p1x) * (p0x + p1x) -
1184 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1187 std::vector<int> IsoClus;
1190 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1191 for (Int_t
k = 0;
k < nClus;
k++) {
1195 if (
k ==
i ||
k ==
j)
1198 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[
k] *
sin(phiClus[
k]), eClus[
k] *
cos(thetaClus[
k]));
1200 float dretacl = fabs(etaClus[
k] - pairVect.Eta());
1201 float drcl = ClusVect.DeltaR(pairVect);
1208 Iso = Iso + etClus[
k];
1209 IsoClus.push_back(
k);
1261 std::vector<EcalRecHit> seedsEndCap;
1262 seedsEndCap.clear();
1264 std::vector<EEDetId> usedXtalsEndCap;
1265 usedXtalsEndCap.clear();
1269 for (ite = rhEEpi0->
begin(); ite != rhEEpi0->
end(); ite++) {
1270 double energy = ite->energy();
1285 seedsEndCap.push_back(*ite);
1287 etot += ite->energy();
1298 std::vector<float> eClusEndCap;
1299 std::vector<float> etClusEndCap;
1300 std::vector<float> etaClusEndCap;
1301 std::vector<float> thetaClusEndCap;
1302 std::vector<float> phiClusEndCap;
1303 std::vector<std::vector<EcalRecHit>> RecHitsClusterEndCap;
1304 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1305 std::vector<float> s4s9ClusEndCap;
1306 std::vector<float> s9s25ClusEndCap;
1313 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1314 EEDetId seed_id = itseed->id();
1315 std::vector<EEDetId>::const_iterator usedIds;
1317 bool seedAlreadyUsed =
false;
1318 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1319 if (*usedIds == seed_id) {
1320 seedAlreadyUsed =
true;
1325 if (seedAlreadyUsed)
1328 std::vector<std::pair<DetId, float>> clus_used;
1330 std::vector<EcalRecHit> RecHitsInWindow;
1331 std::vector<EcalRecHit> RecHitsInWindow5x5;
1333 float simple_energy = 0;
1335 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1338 bool HitAlreadyUsed =
false;
1339 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1340 if (*usedIds == *det) {
1341 HitAlreadyUsed =
true;
1354 usedXtalsEndCap.push_back(*det);
1356 clus_used.push_back(std::make_pair(*det, 1));
1357 simple_energy = simple_energy +
EERecHits[
nn].energy();
1360 if (simple_energy <= 0)
1366 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1367 float et_s = simple_energy *
sin(theta_s);
1375 for (
int i = 0;
i < 4;
i++)
1378 int ixSeed = seed_id.
ix();
1379 int iySeed = seed_id.
iy();
1383 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1385 int dx = ixSeed - det_this.
ix();
1386 int dy = iySeed - det_this.
iy();
1388 float en = RecHitsInWindow[
j].energy();
1390 if (
dx <= 0 &&
dy <= 0)
1392 if (
dx >= 0 &&
dy <= 0)
1394 if (dx <= 0 && dy >= 0)
1396 if (
dx >= 0 &&
dy >= 0)
1408 eClusEndCap.push_back(simple_energy);
1409 etClusEndCap.push_back(et_s);
1410 etaClusEndCap.push_back(clus_pos.eta());
1411 thetaClusEndCap.push_back(theta_s);
1412 phiClusEndCap.push_back(clus_pos.phi());
1413 s4s9ClusEndCap.push_back(*std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1414 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1415 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1416 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1431 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1432 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1435 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1436 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1437 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[
i]);
1438 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[
j]);
1439 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[
i]);
1440 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[
j]);
1442 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1445 float m_inv =
sqrt((eClusEndCap[
i] + eClusEndCap[
j]) * (eClusEndCap[
i] + eClusEndCap[
j]) -
1446 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1450 std::vector<int> IsoClus;
1453 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1454 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1458 if (
k ==
i ||
k ==
j)
1461 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1462 etClusEndCap[
k] *
sin(phiClusEndCap[
k]),
1463 eClusEndCap[
k] *
cos(thetaClusEndCap[
k]));
1464 float dretacl = fabs(etaClusEndCap[
k] - pairVect.Eta());
1465 float drcl = clusVect.DeltaR(pairVect);
1468 Iso = Iso + etClusEndCap[
k];
1469 IsoClus.push_back(
k);
1513 std::vector<EcalRecHit> seedsEndCap;
1514 seedsEndCap.clear();
1516 std::vector<EEDetId> usedXtalsEndCap;
1517 usedXtalsEndCap.clear();
1521 for (ite = rhEEeta->
begin(); ite != rhEEeta->
end(); ite++) {
1522 double energy = ite->energy();
1537 seedsEndCap.push_back(*ite);
1539 etot += ite->energy();
1550 std::vector<float> eClusEndCap;
1551 std::vector<float> etClusEndCap;
1552 std::vector<float> etaClusEndCap;
1553 std::vector<float> thetaClusEndCap;
1554 std::vector<float> phiClusEndCap;
1555 std::vector<std::vector<EcalRecHit>> RecHitsClusterEndCap;
1556 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1557 std::vector<float> s4s9ClusEndCap;
1558 std::vector<float> s9s25ClusEndCap;
1565 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1566 EEDetId seed_id = itseed->id();
1567 std::vector<EEDetId>::const_iterator usedIds;
1569 bool seedAlreadyUsed =
false;
1570 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1571 if (*usedIds == seed_id) {
1572 seedAlreadyUsed =
true;
1577 if (seedAlreadyUsed)
1580 std::vector<std::pair<DetId, float>> clus_used;
1582 std::vector<EcalRecHit> RecHitsInWindow;
1583 std::vector<EcalRecHit> RecHitsInWindow5x5;
1585 float simple_energy = 0;
1587 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1590 bool HitAlreadyUsed =
false;
1591 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1592 if (*usedIds == *det) {
1593 HitAlreadyUsed =
true;
1606 usedXtalsEndCap.push_back(*det);
1608 clus_used.push_back(std::make_pair(*det, 1));
1609 simple_energy = simple_energy +
EERecHits[
nn].energy();
1612 if (simple_energy <= 0)
1618 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1619 float et_s = simple_energy *
sin(theta_s);
1627 for (
int i = 0;
i < 4;
i++)
1630 int ixSeed = seed_id.
ix();
1631 int iySeed = seed_id.
iy();
1635 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1637 int dx = ixSeed - det_this.
ix();
1638 int dy = iySeed - det_this.
iy();
1640 float en = RecHitsInWindow[
j].energy();
1642 if (
dx <= 0 &&
dy <= 0)
1644 if (
dx >= 0 &&
dy <= 0)
1646 if (dx <= 0 && dy >= 0)
1648 if (
dx >= 0 &&
dy >= 0)
1660 eClusEndCap.push_back(simple_energy);
1661 etClusEndCap.push_back(et_s);
1662 etaClusEndCap.push_back(clus_pos.eta());
1663 thetaClusEndCap.push_back(theta_s);
1664 phiClusEndCap.push_back(clus_pos.phi());
1665 s4s9ClusEndCap.push_back(*std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1666 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1667 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1668 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1683 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1684 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1687 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1688 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1689 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[
i]);
1690 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[
j]);
1691 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[
i]);
1692 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[
j]);
1694 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1697 float m_inv =
sqrt((eClusEndCap[
i] + eClusEndCap[
j]) * (eClusEndCap[
i] + eClusEndCap[
j]) -
1698 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1702 std::vector<int> IsoClus;
1705 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1706 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1710 if (
k ==
i ||
k ==
j)
1713 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1714 etClusEndCap[
k] *
sin(phiClusEndCap[
k]),
1715 eClusEndCap[
k] *
cos(thetaClusEndCap[
k]));
1716 float dretacl = fabs(etaClusEndCap[
k] - pairVect.Eta());
1717 float drcl = clusVect.DeltaR(pairVect);
1720 Iso = Iso + etClusEndCap[
k];
1721 IsoClus.push_back(
k);
1771 mdiff = (neta1 - neta2);
1780 mdiff = nphi1 - nphi2;
1782 mdiff = 360 -
std::abs(nphi1 - nphi2);
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEeta_
double seleEtaBeltDREndCap_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * hiYDistrEEeta_
Distribution of rechits in iy EE (eta)
double seleMinvMinPi0EndCap_
MonitorElement * hMinvPi0EE_
Pi0 invariant mass in EE.
T getParameter(std::string const &) const
MonitorElement * hiXDistrEEeta_
Distribution of rechits in ix EE (eta)
double ParameterT0_endcPresh_
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_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * hPtPi0EE_
Pi0 Pt in EE.
MonitorElement * hMinvEtaEB_
Eta invariant mass in EB.
bool ecalRecHitGreater(EcalRecHit x, EcalRecHit y)
std::vector< EEDetId > detIdEERecHits
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
PositionCalc posCalculator_
double seleMinvMinEtaEndCap_
int iphi() const
get the crystal iphi
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)
T const * product() const
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.
Log< level::Error, false > LogError
double seleS4S9GammaEtaEndCap_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
MonitorElement * hIsoPi0EB_
Pi0 Iso EB.
MonitorElement * hS4S91Pi0EE_
S4S9 of the 1st most energetic pi0 photon EE.
MonitorElement * hS4S91EtaEB_
S4S9 of the 1st most energetic eta photon.
double ptMinForIsolationEta_
int ieta() const
get the crystal ieta
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hMinvPi0EB_
Pi0 invariant mass in EB.
MonitorElement * hS4S92Pi0EE_
S4S9 of the 2nd most energetic pi0 photon EE.
void convxtalid(int &, int &)
double ptMinForIsolationEndCap_
bool ParameterLogWeighted_
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 &)
math::XYZPoint Calculate_Location(const HitsAndFractions &iDetIds, const edm::SortedCollection< HitType > *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=nullptr)
#define DEFINE_FWK_MODULE(type)
const_iterator begin() const
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
MonitorElement * hPtEtaEE_
Eta Pt in EE.
double seleXtalMinEnergyEndCap_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
double seleS9S25GammaEtaEndCap_
MonitorElement * hEventEnergyEEpi0_
Distribution of total event energy EE (pi0)
const_iterator end() const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
MonitorElement * hNRecHitsEEeta_
Distribution of number of RecHits EE (eta)
double selePtGammaEta_
for eta->gg barrel
edm::EDGetTokenT< EcalRecHitCollection > productMonitoredEEpi0_
object to monitor
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
double seleEtaBeltDetaEndCap_
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)
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.
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 * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
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_
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_