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);
855 for (Int_t
i = 0;
i < nClus;
i++) {
856 for (Int_t
j =
i + 1;
j < nClus;
j++) {
861 float p0x = etClus[
i] *
cos(phiClus[
i]);
862 float p1x = etClus[
j] *
cos(phiClus[
j]);
863 float p0y = etClus[
i] *
sin(phiClus[
i]);
864 float p1y = etClus[
j] *
sin(phiClus[
j]);
865 float p0z = eClus[
i] *
cos(thetaClus[
i]);
866 float p1z = eClus[
j] *
cos(thetaClus[
j]);
868 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
873 float m_inv =
sqrt((eClus[
i] + eClus[
j]) * (eClus[
i] + eClus[
j]) - (p0x + p1x) * (p0x + p1x) -
874 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
877 std::vector<int> IsoClus;
880 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
881 for (Int_t
k = 0;
k < nClus;
k++) {
885 if (
k ==
i ||
k ==
j)
888 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[
k] *
sin(phiClus[
k]), eClus[
k] *
cos(thetaClus[
k]));
890 float dretacl = fabs(etaClus[
k] - pairVect.Eta());
891 float drcl = ClusVect.DeltaR(pairVect);
898 Iso = Iso + etClus[
k];
899 IsoClus.push_back(
k);
939 for (itb = rhEBeta->
begin(); itb != rhEBeta->
end(); ++itb) {
941 double energy = itb->energy();
951 seeds.push_back(*itb);
957 etot += itb->energy();
973 std::vector<float> eClus;
974 std::vector<float> etClus;
975 std::vector<float> etaClus;
976 std::vector<float> thetaClus;
977 std::vector<float> phiClus;
978 std::vector<EBDetId> max_hit;
980 std::vector<std::vector<EcalRecHit>> RecHitsCluster;
981 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5;
982 std::vector<float> s4s9Clus;
983 std::vector<float> s9s25Clus;
990 for (std::vector<EcalRecHit>::iterator itseed =
seeds.begin(); itseed !=
seeds.end(); itseed++) {
991 EBDetId seed_id = itseed->id();
992 std::vector<EBDetId>::const_iterator usedIds;
994 bool seedAlreadyUsed =
false;
995 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
996 if (*usedIds == seed_id) {
997 seedAlreadyUsed =
true;
1003 if (seedAlreadyUsed)
1006 std::vector<std::pair<DetId, float>> clus_used;
1010 std::vector<EcalRecHit> RecHitsInWindow;
1011 std::vector<EcalRecHit> RecHitsInWindow5x5;
1013 double simple_energy = 0;
1015 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1019 bool HitAlreadyUsed =
false;
1020 for (usedIds = usedXtals.begin(); usedIds != usedXtals.end(); usedIds++) {
1021 if (*usedIds == *det) {
1022 HitAlreadyUsed =
true;
1034 usedXtals.push_back(*det);
1036 clus_used.push_back(std::make_pair(*det, 1));
1037 simple_energy = simple_energy +
EBRecHits[
nn].energy();
1040 if (simple_energy <= 0)
1051 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1058 float et_s = simple_energy *
sin(theta_s);
1066 for (
int i = 0;
i < 4;
i++)
1069 int seed_ieta = seed_id.
ieta();
1070 int seed_iphi = seed_id.
iphi();
1077 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1085 float en = RecHitsInWindow[
j].energy();
1090 if (
dx <= 0 &&
dy <= 0)
1092 if (
dx >= 0 &&
dy <= 0)
1094 if (dx <= 0 && dy >= 0)
1096 if (
dx >= 0 &&
dy >= 0)
1108 float s4s9_max = *std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3;
1111 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id, 5, 5);
1112 for (std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++) {
1115 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(), usedXtals.end(), det);
1118 if (itdet0 != usedXtals.end())
1135 eClus.push_back(simple_energy);
1136 etClus.push_back(et_s);
1137 etaClus.push_back(clus_pos.eta());
1138 thetaClus.push_back(theta_s);
1139 phiClus.push_back(clus_pos.phi());
1140 s4s9Clus.push_back(s4s9_max);
1141 s9s25Clus.push_back(e3x3 / e5x5);
1142 RecHitsCluster.push_back(RecHitsInWindow);
1143 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
1159 for (Int_t
i = 0;
i < nClus;
i++) {
1160 for (Int_t
j =
i + 1;
j < nClus;
j++) {
1165 float p0x = etClus[
i] *
cos(phiClus[
i]);
1166 float p1x = etClus[
j] *
cos(phiClus[
j]);
1167 float p0y = etClus[
i] *
sin(phiClus[
i]);
1168 float p1y = etClus[
j] *
sin(phiClus[
j]);
1169 float p0z = eClus[
i] *
cos(thetaClus[
i]);
1170 float p1z = eClus[
j] *
cos(thetaClus[
j]);
1172 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1177 float m_inv =
sqrt((eClus[
i] + eClus[
j]) * (eClus[
i] + eClus[
j]) - (p0x + p1x) * (p0x + p1x) -
1178 (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1181 std::vector<int> IsoClus;
1184 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1185 for (Int_t
k = 0;
k < nClus;
k++) {
1189 if (
k ==
i ||
k ==
j)
1192 TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[
k] *
sin(phiClus[
k]), eClus[
k] *
cos(thetaClus[
k]));
1194 float dretacl = fabs(etaClus[
k] - pairVect.Eta());
1195 float drcl = ClusVect.DeltaR(pairVect);
1202 Iso = Iso + etClus[
k];
1203 IsoClus.push_back(
k);
1251 std::vector<EcalRecHit> seedsEndCap;
1252 seedsEndCap.clear();
1254 std::vector<EEDetId> usedXtalsEndCap;
1255 usedXtalsEndCap.clear();
1259 for (ite = rhEEpi0->
begin(); ite != rhEEpi0->
end(); ite++) {
1260 double energy = ite->energy();
1275 seedsEndCap.push_back(*ite);
1277 etot += ite->energy();
1288 std::vector<float> eClusEndCap;
1289 std::vector<float> etClusEndCap;
1290 std::vector<float> etaClusEndCap;
1291 std::vector<float> thetaClusEndCap;
1292 std::vector<float> phiClusEndCap;
1293 std::vector<std::vector<EcalRecHit>> RecHitsClusterEndCap;
1294 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1295 std::vector<float> s4s9ClusEndCap;
1296 std::vector<float> s9s25ClusEndCap;
1303 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1304 EEDetId seed_id = itseed->id();
1305 std::vector<EEDetId>::const_iterator usedIds;
1307 bool seedAlreadyUsed =
false;
1308 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1309 if (*usedIds == seed_id) {
1310 seedAlreadyUsed =
true;
1315 if (seedAlreadyUsed)
1318 std::vector<std::pair<DetId, float>> clus_used;
1320 std::vector<EcalRecHit> RecHitsInWindow;
1321 std::vector<EcalRecHit> RecHitsInWindow5x5;
1323 float simple_energy = 0;
1325 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1328 bool HitAlreadyUsed =
false;
1329 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1330 if (*usedIds == *det) {
1331 HitAlreadyUsed =
true;
1344 usedXtalsEndCap.push_back(*det);
1346 clus_used.push_back(std::make_pair(*det, 1));
1347 simple_energy = simple_energy +
EERecHits[
nn].energy();
1350 if (simple_energy <= 0)
1356 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1357 float et_s = simple_energy *
sin(theta_s);
1365 for (
int i = 0;
i < 4;
i++)
1368 int ixSeed = seed_id.
ix();
1369 int iySeed = seed_id.
iy();
1373 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1375 int dx = ixSeed - det_this.
ix();
1376 int dy = iySeed - det_this.
iy();
1378 float en = RecHitsInWindow[
j].energy();
1380 if (
dx <= 0 &&
dy <= 0)
1382 if (
dx >= 0 &&
dy <= 0)
1384 if (dx <= 0 && dy >= 0)
1386 if (
dx >= 0 &&
dy >= 0)
1398 eClusEndCap.push_back(simple_energy);
1399 etClusEndCap.push_back(et_s);
1400 etaClusEndCap.push_back(clus_pos.eta());
1401 thetaClusEndCap.push_back(theta_s);
1402 phiClusEndCap.push_back(clus_pos.phi());
1403 s4s9ClusEndCap.push_back(*std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1404 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1405 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1406 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1420 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1421 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1424 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1425 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1426 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[
i]);
1427 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[
j]);
1428 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[
i]);
1429 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[
j]);
1431 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1434 float m_inv =
sqrt((eClusEndCap[
i] + eClusEndCap[
j]) * (eClusEndCap[
i] + eClusEndCap[
j]) -
1435 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1439 std::vector<int> IsoClus;
1442 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1443 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1447 if (
k ==
i ||
k ==
j)
1450 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1451 etClusEndCap[
k] *
sin(phiClusEndCap[
k]),
1452 eClusEndCap[
k] *
cos(thetaClusEndCap[
k]));
1453 float dretacl = fabs(etaClusEndCap[
k] - pairVect.Eta());
1454 float drcl = clusVect.DeltaR(pairVect);
1457 Iso = Iso + etClusEndCap[
k];
1458 IsoClus.push_back(
k);
1497 std::vector<EcalRecHit> seedsEndCap;
1498 seedsEndCap.clear();
1500 std::vector<EEDetId> usedXtalsEndCap;
1501 usedXtalsEndCap.clear();
1505 for (ite = rhEEeta->
begin(); ite != rhEEeta->
end(); ite++) {
1506 double energy = ite->energy();
1521 seedsEndCap.push_back(*ite);
1523 etot += ite->energy();
1534 std::vector<float> eClusEndCap;
1535 std::vector<float> etClusEndCap;
1536 std::vector<float> etaClusEndCap;
1537 std::vector<float> thetaClusEndCap;
1538 std::vector<float> phiClusEndCap;
1539 std::vector<std::vector<EcalRecHit>> RecHitsClusterEndCap;
1540 std::vector<std::vector<EcalRecHit>> RecHitsCluster5x5EndCap;
1541 std::vector<float> s4s9ClusEndCap;
1542 std::vector<float> s9s25ClusEndCap;
1549 for (std::vector<EcalRecHit>::iterator itseed = seedsEndCap.begin(); itseed != seedsEndCap.end(); itseed++) {
1550 EEDetId seed_id = itseed->id();
1551 std::vector<EEDetId>::const_iterator usedIds;
1553 bool seedAlreadyUsed =
false;
1554 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1555 if (*usedIds == seed_id) {
1556 seedAlreadyUsed =
true;
1561 if (seedAlreadyUsed)
1564 std::vector<std::pair<DetId, float>> clus_used;
1566 std::vector<EcalRecHit> RecHitsInWindow;
1567 std::vector<EcalRecHit> RecHitsInWindow5x5;
1569 float simple_energy = 0;
1571 for (std::vector<DetId>::iterator det = clus_v.begin(); det != clus_v.end(); det++) {
1574 bool HitAlreadyUsed =
false;
1575 for (usedIds = usedXtalsEndCap.begin(); usedIds != usedXtalsEndCap.end(); usedIds++) {
1576 if (*usedIds == *det) {
1577 HitAlreadyUsed =
true;
1590 usedXtalsEndCap.push_back(*det);
1592 clus_used.push_back(std::make_pair(*det, 1));
1593 simple_energy = simple_energy +
EERecHits[
nn].energy();
1596 if (simple_energy <= 0)
1602 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1603 float et_s = simple_energy *
sin(theta_s);
1611 for (
int i = 0;
i < 4;
i++)
1614 int ixSeed = seed_id.
ix();
1615 int iySeed = seed_id.
iy();
1619 for (
unsigned int j = 0;
j < RecHitsInWindow.size();
j++) {
1621 int dx = ixSeed - det_this.
ix();
1622 int dy = iySeed - det_this.
iy();
1624 float en = RecHitsInWindow[
j].energy();
1626 if (
dx <= 0 &&
dy <= 0)
1628 if (
dx >= 0 &&
dy <= 0)
1630 if (dx <= 0 && dy >= 0)
1632 if (
dx >= 0 &&
dy >= 0)
1644 eClusEndCap.push_back(simple_energy);
1645 etClusEndCap.push_back(et_s);
1646 etaClusEndCap.push_back(clus_pos.eta());
1647 thetaClusEndCap.push_back(theta_s);
1648 phiClusEndCap.push_back(clus_pos.phi());
1649 s4s9ClusEndCap.push_back(*std::max_element(s4s9_tmp, s4s9_tmp + 4) / e3x3);
1650 s9s25ClusEndCap.push_back(e3x3 / e5x5);
1651 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1652 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1666 for (Int_t
i = 0;
i < nClusEndCap;
i++) {
1667 for (Int_t
j =
i + 1;
j < nClusEndCap;
j++) {
1670 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1671 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1672 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[
i]);
1673 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[
j]);
1674 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[
i]);
1675 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[
j]);
1677 float pt_pair =
sqrt((p0x + p1x) * (p0x + p1x) + (p0y + p1y) * (p0y + p1y));
1680 float m_inv =
sqrt((eClusEndCap[
i] + eClusEndCap[
j]) * (eClusEndCap[
i] + eClusEndCap[
j]) -
1681 (p0x + p1x) * (p0x + p1x) - (p0y + p1y) * (p0y + p1y) - (p0z + p1z) * (p0z + p1z));
1685 std::vector<int> IsoClus;
1688 TVector3 pairVect = TVector3((p0x + p1x), (p0y + p1y), (p0z + p1z));
1689 for (Int_t
k = 0;
k < nClusEndCap;
k++) {
1693 if (
k ==
i ||
k ==
j)
1696 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]),
1697 etClusEndCap[
k] *
sin(phiClusEndCap[
k]),
1698 eClusEndCap[
k] *
cos(thetaClusEndCap[
k]));
1699 float dretacl = fabs(etaClusEndCap[
k] - pairVect.Eta());
1700 float drcl = clusVect.DeltaR(pairVect);
1703 Iso = Iso + etClusEndCap[
k];
1704 IsoClus.push_back(
k);
1749 mdiff = (neta1 - neta2);
1758 mdiff = nphi1 - nphi2;
1760 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)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
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)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
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_