42 #define TWOPI 6.283185308
77 if ( clusPhiSize_ % 2 == 0 || clusEtaSize_ % 2 == 0)
78 edm::LogError(
"AlCaPi0RecHitsProducerError") <<
"Size of eta/phi for simple clustering should be odd numbers";
355 std::vector<EcalRecHit> seeds;
358 std::vector<EBDetId> usedXtals;
374 bool GetRecHitsCollectionEBpi0 =
true;
380 GetRecHitsCollectionEBpi0 =
false;
384 bool GetRecHitsCollectionEBeta =
true;
392 GetRecHitsCollectionEBeta =
false;
396 bool GetRecHitsCollectionEEpi0 =
true;
402 GetRecHitsCollectionEEpi0 =
false;
406 bool GetRecHitsCollectionEEeta =
true;
412 GetRecHitsCollectionEEeta =
false;
443 if (rhEBpi0.
isValid() && (rhEBpi0->size() > 0) && GetRecHitsCollectionEBpi0){
448 for(itb=rhEBpi0->begin(); itb!=rhEBpi0->end(); ++itb){
451 double energy = itb->energy();
466 etot+= itb->energy();
482 std::vector<float> eClus;
483 std::vector<float> etClus;
484 std::vector<float> etaClus;
485 std::vector<float> thetaClus;
486 std::vector<float> phiClus;
487 std::vector<EBDetId> max_hit;
489 std::vector< std::vector<EcalRecHit> > RecHitsCluster;
490 std::vector< std::vector<EcalRecHit> > RecHitsCluster5x5;
491 std::vector<float> s4s9Clus;
492 std::vector<float> s9s25Clus;
501 for (std::vector<EcalRecHit>::iterator itseed=seeds.begin(); itseed!=seeds.end(); itseed++) {
502 EBDetId seed_id = itseed->id();
503 std::vector<EBDetId>::const_iterator usedIds;
505 bool seedAlreadyUsed=
false;
506 for(usedIds=usedXtals.begin(); usedIds!=usedXtals.end(); usedIds++){
507 if(*usedIds==seed_id){
508 seedAlreadyUsed=
true;
513 if(seedAlreadyUsed)
continue;
515 std::vector< std::pair<DetId, float> > clus_used;
518 vector<EcalRecHit> RecHitsInWindow;
519 vector<EcalRecHit> RecHitsInWindow5x5;
521 double simple_energy = 0;
523 for (std::vector<DetId>::iterator det=clus_v.begin(); det!=clus_v.end(); det++) {
526 bool HitAlreadyUsed=
false;
527 for(usedIds=usedXtals.begin(); usedIds!=usedXtals.end(); usedIds++){
533 if(HitAlreadyUsed)
continue;
540 usedXtals.push_back(*det);
541 RecHitsInWindow.push_back(
EBRecHits[nn]);
542 clus_used.push_back(std::pair<DetId, float>(*det, 1) );
543 simple_energy = simple_energy +
EBRecHits[nn].energy();
548 if(simple_energy <= 0)
continue;
555 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
561 float et_s = simple_energy *
sin(theta_s);
568 for(
int i=0;
i<4;
i++)s4s9_tmp[
i]= 0;
570 int seed_ieta = seed_id.
ieta();
571 int seed_iphi = seed_id.
iphi();
578 for(
unsigned int j=0;
j<RecHitsInWindow.size();
j++){
581 int ieta = det.
ieta();
582 int iphi = det.
iphi();
586 float en = RecHitsInWindow[
j].energy();
591 if(dx <= 0 && dy <=0) s4s9_tmp[0] += en;
592 if(dx >= 0 && dy <=0) s4s9_tmp[1] += en;
593 if(dx <= 0 && dy >=0) s4s9_tmp[2] += en;
594 if(dx >= 0 && dy >=0) s4s9_tmp[3] += en;
596 if(
abs(dx)<=1 &&
abs(dy)<=1) e3x3 += en;
597 if(
abs(dx)<=2 &&
abs(dy)<=2) e5x5 += en;
602 if(e3x3 <= 0)
continue;
604 float s4s9_max = *max_element( s4s9_tmp,s4s9_tmp+4)/e3x3;
608 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id,5,5);
609 for( std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++){
613 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(),usedXtals.end(),det);
616 if(itdet0 != usedXtals.end())
continue;
624 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
631 if(e5x5 <= 0)
continue;
633 eClus.push_back(simple_energy);
634 etClus.push_back(et_s);
635 etaClus.push_back(clus_pos.eta());
636 thetaClus.push_back(theta_s);
637 phiClus.push_back(clus_pos.phi());
638 s4s9Clus.push_back(s4s9_max);
639 s9s25Clus.push_back(e3x3/e5x5);
640 RecHitsCluster.push_back(RecHitsInWindow);
641 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
658 for(Int_t
i=0 ;
i<nClus ;
i++){
659 for(Int_t
j=
i+1 ;
j<nClus ;
j++){
664 float p0x = etClus[
i] *
cos(phiClus[
i]);
665 float p1x = etClus[
j] *
cos(phiClus[
j]);
666 float p0y = etClus[
i] *
sin(phiClus[i]);
667 float p1y = etClus[
j] *
sin(phiClus[j]);
668 float p0z = eClus[
i] *
cos(thetaClus[i]);
669 float p1z = eClus[
j] *
cos(thetaClus[j]);
672 float pt_pair =
sqrt( (p0x+p1x)*(p0x+p1x) + (p0y+p1y)*(p0y+p1y));
676 float m_inv =
sqrt ( (eClus[i] + eClus[j])*(eClus[i] + eClus[j]) - (p0x+p1x)*(p0x+p1x) - (p0y+p1y)*(p0y+p1y) - (p0z+p1z)*(p0z+p1z) );
680 std::vector<int> IsoClus;
683 TVector3 pairVect = TVector3((p0x+p1x), (p0y+p1y), (p0z+p1z));
684 for(Int_t
k=0 ;
k<nClus ;
k++){
689 if(
k==i ||
k==j)
continue;
690 TVector3 ClusVect = TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]) , eClus[k] *
cos(thetaClus[k]));
692 float dretacl = fabs(etaClus[k] - pairVect.Eta());
693 float drcl = ClusVect.DeltaR(pairVect);
697 Iso = Iso + etClus[
k];
698 IsoClus.push_back(k);
740 if (rhEBeta.
isValid() && (rhEBeta->size() > 0) && GetRecHitsCollectionEBeta){
745 for(itb=rhEBeta->begin(); itb!=rhEBeta->end(); ++itb){
748 double energy = itb->energy();
763 etot+= itb->energy();
779 std::vector<float> eClus;
780 std::vector<float> etClus;
781 std::vector<float> etaClus;
782 std::vector<float> thetaClus;
783 std::vector<float> phiClus;
784 std::vector<EBDetId> max_hit;
786 std::vector< std::vector<EcalRecHit> > RecHitsCluster;
787 std::vector< std::vector<EcalRecHit> > RecHitsCluster5x5;
788 std::vector<float> s4s9Clus;
789 std::vector<float> s9s25Clus;
797 for (std::vector<EcalRecHit>::iterator itseed=seeds.begin(); itseed!=seeds.end(); itseed++) {
798 EBDetId seed_id = itseed->id();
799 std::vector<EBDetId>::const_iterator usedIds;
801 bool seedAlreadyUsed=
false;
802 for(usedIds=usedXtals.begin(); usedIds!=usedXtals.end(); usedIds++){
803 if(*usedIds==seed_id){
804 seedAlreadyUsed=
true;
809 if(seedAlreadyUsed)
continue;
811 std::vector< std::pair<DetId, float> > clus_used;
814 vector<EcalRecHit> RecHitsInWindow;
815 vector<EcalRecHit> RecHitsInWindow5x5;
817 double simple_energy = 0;
819 for (std::vector<DetId>::iterator det=clus_v.begin(); det!=clus_v.end(); det++) {
822 bool HitAlreadyUsed=
false;
823 for(usedIds=usedXtals.begin(); usedIds!=usedXtals.end(); usedIds++){
829 if(HitAlreadyUsed)
continue;
836 usedXtals.push_back(*det);
837 RecHitsInWindow.push_back(
EBRecHits[nn]);
838 clus_used.push_back(std::pair<DetId, float>(*det, 1));
839 simple_energy = simple_energy +
EBRecHits[nn].energy();
844 if(simple_energy <= 0)
continue;
851 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
857 float et_s = simple_energy *
sin(theta_s);
864 for(
int i=0;
i<4;
i++)s4s9_tmp[
i]= 0;
866 int seed_ieta = seed_id.
ieta();
867 int seed_iphi = seed_id.
iphi();
874 for(
unsigned int j=0;
j<RecHitsInWindow.size();
j++){
877 int ieta = det.
ieta();
878 int iphi = det.
iphi();
882 float en = RecHitsInWindow[
j].energy();
887 if(dx <= 0 && dy <=0) s4s9_tmp[0] += en;
888 if(dx >= 0 && dy <=0) s4s9_tmp[1] += en;
889 if(dx <= 0 && dy >=0) s4s9_tmp[2] += en;
890 if(dx >= 0 && dy >=0) s4s9_tmp[3] += en;
892 if(
abs(dx)<=1 &&
abs(dy)<=1) e3x3 += en;
893 if(
abs(dx)<=2 &&
abs(dy)<=2) e5x5 += en;
898 if(e3x3 <= 0)
continue;
900 float s4s9_max = *max_element( s4s9_tmp,s4s9_tmp+4)/e3x3;
904 std::vector<DetId> clus_v5x5 = topology_p->
getWindow(seed_id,5,5);
905 for( std::vector<DetId>::const_iterator idItr = clus_v5x5.begin(); idItr != clus_v5x5.end(); idItr++){
909 std::vector<EBDetId>::iterator itdet0 =
find(usedXtals.begin(),usedXtals.end(),det);
912 if(itdet0 != usedXtals.end())
continue;
920 RecHitsInWindow5x5.push_back(
EBRecHits[nn]);
927 if(e5x5 <= 0)
continue;
929 eClus.push_back(simple_energy);
930 etClus.push_back(et_s);
931 etaClus.push_back(clus_pos.eta());
932 thetaClus.push_back(theta_s);
933 phiClus.push_back(clus_pos.phi());
934 s4s9Clus.push_back(s4s9_max);
935 s9s25Clus.push_back(e3x3/e5x5);
936 RecHitsCluster.push_back(RecHitsInWindow);
937 RecHitsCluster5x5.push_back(RecHitsInWindow5x5);
954 for(Int_t
i=0 ;
i<nClus ;
i++){
955 for(Int_t
j=
i+1 ;
j<nClus ;
j++){
960 float p0x = etClus[
i] *
cos(phiClus[
i]);
961 float p1x = etClus[
j] *
cos(phiClus[
j]);
962 float p0y = etClus[
i] *
sin(phiClus[i]);
963 float p1y = etClus[
j] *
sin(phiClus[j]);
964 float p0z = eClus[
i] *
cos(thetaClus[i]);
965 float p1z = eClus[
j] *
cos(thetaClus[j]);
968 float pt_pair =
sqrt( (p0x+p1x)*(p0x+p1x) + (p0y+p1y)*(p0y+p1y));
972 float m_inv =
sqrt ( (eClus[i] + eClus[j])*(eClus[i] + eClus[j]) - (p0x+p1x)*(p0x+p1x) - (p0y+p1y)*(p0y+p1y) - (p0z+p1z)*(p0z+p1z) );
976 std::vector<int> IsoClus;
979 TVector3 pairVect = TVector3((p0x+p1x), (p0y+p1y), (p0z+p1z));
980 for(Int_t
k=0 ;
k<nClus ;
k++){
985 if(
k==i ||
k==j)
continue;
986 TVector3 ClusVect = TVector3(etClus[
k] *
cos(phiClus[
k]), etClus[k] *
sin(phiClus[k]) , eClus[k] *
cos(thetaClus[k]));
988 float dretacl = fabs(etaClus[k] - pairVect.Eta());
989 float drcl = ClusVect.DeltaR(pairVect);
993 Iso = Iso + etClus[
k];
994 IsoClus.push_back(k);
1045 if (rhEEpi0.
isValid() && (rhEEpi0->size() > 0) && GetRecHitsCollectionEEpi0){
1055 std::vector<EcalRecHit> seedsEndCap;
1056 seedsEndCap.clear();
1058 std::vector<EEDetId> usedXtalsEndCap;
1059 usedXtalsEndCap.clear();
1064 for (ite=rhEEpi0->begin(); ite!=rhEEpi0->end(); ite++) {
1065 double energy = ite->energy();
1081 etot+= ite->energy();
1091 std::vector<float> eClusEndCap;
1092 std::vector<float> etClusEndCap;
1093 std::vector<float> etaClusEndCap;
1094 std::vector<float> thetaClusEndCap;
1095 std::vector<float> phiClusEndCap;
1096 std::vector< std::vector<EcalRecHit> > RecHitsClusterEndCap;
1097 std::vector< std::vector<EcalRecHit> > RecHitsCluster5x5EndCap;
1098 std::vector<float> s4s9ClusEndCap;
1099 std::vector<float> s9s25ClusEndCap;
1108 for (std::vector<EcalRecHit>::iterator itseed=seedsEndCap.begin(); itseed!=seedsEndCap.end(); itseed++) {
1109 EEDetId seed_id = itseed->id();
1110 std::vector<EEDetId>::const_iterator usedIds;
1112 bool seedAlreadyUsed=
false;
1113 for(usedIds=usedXtalsEndCap.begin(); usedIds!=usedXtalsEndCap.end(); usedIds++){
1114 if(*usedIds==seed_id){
1115 seedAlreadyUsed=
true;
1120 if(seedAlreadyUsed)
continue;
1122 std::vector< std::pair<DetId, float> > clus_used;
1124 vector<EcalRecHit> RecHitsInWindow;
1125 vector<EcalRecHit> RecHitsInWindow5x5;
1127 float simple_energy = 0;
1129 for (std::vector<DetId>::iterator det=clus_v.begin(); det!=clus_v.end(); det++) {
1132 bool HitAlreadyUsed=
false;
1133 for(usedIds=usedXtalsEndCap.begin(); usedIds!=usedXtalsEndCap.end(); usedIds++){
1135 HitAlreadyUsed=
true;
1140 if(HitAlreadyUsed)
continue;
1147 usedXtalsEndCap.push_back(*det);
1148 RecHitsInWindow.push_back(
EERecHits[nn]);
1149 clus_used.push_back(std::pair<DetId, float>(*det, 1));
1150 simple_energy = simple_energy +
EERecHits[nn].energy();
1155 if( simple_energy <= 0)
continue;
1160 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1161 float et_s = simple_energy *
sin(theta_s);
1170 for(
int i=0;
i<4;
i++) s4s9_tmp[
i]= 0;
1172 int ixSeed = seed_id.
ix();
1173 int iySeed = seed_id.
iy();
1177 for(
unsigned int j=0;
j<RecHitsInWindow.size();
j++){
1179 int dx = ixSeed - det_this.
ix();
1180 int dy = iySeed - det_this.
iy();
1182 float en = RecHitsInWindow[
j].energy();
1184 if(dx <= 0 && dy <=0) s4s9_tmp[0] += en;
1185 if(dx >= 0 && dy <=0) s4s9_tmp[1] += en;
1186 if(dx <= 0 && dy >=0) s4s9_tmp[2] += en;
1187 if(dx >= 0 && dy >=0) s4s9_tmp[3] += en;
1189 if(
abs(dx)<=1 &&
abs(dy)<=1) e3x3 += en;
1190 if(
abs(dx)<=2 &&
abs(dy)<=2) e5x5 += en;
1195 if(e3x3 <= 0)
continue;
1197 eClusEndCap.push_back(simple_energy);
1198 etClusEndCap.push_back(et_s);
1199 etaClusEndCap.push_back(clus_pos.eta());
1200 thetaClusEndCap.push_back(theta_s);
1201 phiClusEndCap.push_back(clus_pos.phi());
1202 s4s9ClusEndCap.push_back(*max_element( s4s9_tmp,s4s9_tmp+4)/e3x3);
1203 s9s25ClusEndCap.push_back(e3x3/e5x5);
1204 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1205 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1223 for(Int_t
i=0 ;
i<nClusEndCap ;
i++){
1224 for(Int_t
j=
i+1 ;
j<nClusEndCap ;
j++){
1228 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1229 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1230 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1231 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[j]);
1232 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1233 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[j]);
1236 float pt_pair =
sqrt( (p0x+p1x)*(p0x+p1x) + (p0y+p1y)*(p0y+p1y));
1238 float m_inv =
sqrt ( (eClusEndCap[i] + eClusEndCap[j])*(eClusEndCap[i] + eClusEndCap[j]) - (p0x+p1x)*(p0x+p1x) - (p0y+p1y)*(p0y+p1y) - (p0z+p1z)*(p0z+p1z) );
1245 std::vector<int> IsoClus;
1248 TVector3 pairVect = TVector3((p0x+p1x), (p0y+p1y), (p0z+p1z));
1249 for(Int_t
k=0 ;
k<nClusEndCap ;
k++){
1254 if(
k==i ||
k==j)
continue;
1257 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]), etClusEndCap[k] *
sin(phiClusEndCap[k]) , eClusEndCap[k] *
cos(thetaClusEndCap[k]) ) ;
1258 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1259 float drcl = clusVect.DeltaR(pairVect);
1262 Iso = Iso + etClusEndCap[
k];
1263 IsoClus.push_back(k);
1299 if (rhEEeta.
isValid() && (rhEEeta->size() > 0) && GetRecHitsCollectionEEeta){
1308 std::vector<EcalRecHit> seedsEndCap;
1309 seedsEndCap.clear();
1311 std::vector<EEDetId> usedXtalsEndCap;
1312 usedXtalsEndCap.clear();
1317 for (ite=rhEEeta->begin(); ite!=rhEEeta->end(); ite++) {
1318 double energy = ite->energy();
1334 etot+= ite->energy();
1344 std::vector<float> eClusEndCap;
1345 std::vector<float> etClusEndCap;
1346 std::vector<float> etaClusEndCap;
1347 std::vector<float> thetaClusEndCap;
1348 std::vector<float> phiClusEndCap;
1349 std::vector< std::vector<EcalRecHit> > RecHitsClusterEndCap;
1350 std::vector< std::vector<EcalRecHit> > RecHitsCluster5x5EndCap;
1351 std::vector<float> s4s9ClusEndCap;
1352 std::vector<float> s9s25ClusEndCap;
1361 for (std::vector<EcalRecHit>::iterator itseed=seedsEndCap.begin(); itseed!=seedsEndCap.end(); itseed++) {
1362 EEDetId seed_id = itseed->id();
1363 std::vector<EEDetId>::const_iterator usedIds;
1365 bool seedAlreadyUsed=
false;
1366 for(usedIds=usedXtalsEndCap.begin(); usedIds!=usedXtalsEndCap.end(); usedIds++){
1367 if(*usedIds==seed_id){
1368 seedAlreadyUsed=
true;
1373 if(seedAlreadyUsed)
continue;
1375 std::vector< std::pair<DetId, float> > clus_used;
1377 vector<EcalRecHit> RecHitsInWindow;
1378 vector<EcalRecHit> RecHitsInWindow5x5;
1380 float simple_energy = 0;
1382 for (std::vector<DetId>::iterator det=clus_v.begin(); det!=clus_v.end(); det++) {
1385 bool HitAlreadyUsed=
false;
1386 for(usedIds=usedXtalsEndCap.begin(); usedIds!=usedXtalsEndCap.end(); usedIds++){
1388 HitAlreadyUsed=
true;
1393 if(HitAlreadyUsed)
continue;
1400 usedXtalsEndCap.push_back(*det);
1401 RecHitsInWindow.push_back(
EERecHits[nn]);
1402 clus_used.push_back(std::pair<DetId, float>(*det, 1));
1403 simple_energy = simple_energy +
EERecHits[nn].energy();
1408 if( simple_energy <= 0)
continue;
1413 float theta_s = 2. * atan(
exp(-clus_pos.eta()));
1414 float et_s = simple_energy *
sin(theta_s);
1423 for(
int i=0;
i<4;
i++) s4s9_tmp[
i]= 0;
1425 int ixSeed = seed_id.
ix();
1426 int iySeed = seed_id.
iy();
1430 for(
unsigned int j=0;
j<RecHitsInWindow.size();
j++){
1432 int dx = ixSeed - det_this.
ix();
1433 int dy = iySeed - det_this.
iy();
1435 float en = RecHitsInWindow[
j].energy();
1437 if(dx <= 0 && dy <=0) s4s9_tmp[0] += en;
1438 if(dx >= 0 && dy <=0) s4s9_tmp[1] += en;
1439 if(dx <= 0 && dy >=0) s4s9_tmp[2] += en;
1440 if(dx >= 0 && dy >=0) s4s9_tmp[3] += en;
1442 if(
abs(dx)<=1 &&
abs(dy)<=1) e3x3 += en;
1443 if(
abs(dx)<=2 &&
abs(dy)<=2) e5x5 += en;
1448 if(e3x3 <= 0)
continue;
1450 eClusEndCap.push_back(simple_energy);
1451 etClusEndCap.push_back(et_s);
1452 etaClusEndCap.push_back(clus_pos.eta());
1453 thetaClusEndCap.push_back(theta_s);
1454 phiClusEndCap.push_back(clus_pos.phi());
1455 s4s9ClusEndCap.push_back(*max_element( s4s9_tmp,s4s9_tmp+4)/e3x3);
1456 s9s25ClusEndCap.push_back(e3x3/e5x5);
1457 RecHitsClusterEndCap.push_back(RecHitsInWindow);
1458 RecHitsCluster5x5EndCap.push_back(RecHitsInWindow5x5);
1473 for(Int_t
i=0 ;
i<nClusEndCap ;
i++){
1474 for(Int_t
j=
i+1 ;
j<nClusEndCap ;
j++){
1478 float p0x = etClusEndCap[
i] *
cos(phiClusEndCap[
i]);
1479 float p1x = etClusEndCap[
j] *
cos(phiClusEndCap[
j]);
1480 float p0y = etClusEndCap[
i] *
sin(phiClusEndCap[i]);
1481 float p1y = etClusEndCap[
j] *
sin(phiClusEndCap[j]);
1482 float p0z = eClusEndCap[
i] *
cos(thetaClusEndCap[i]);
1483 float p1z = eClusEndCap[
j] *
cos(thetaClusEndCap[j]);
1486 float pt_pair =
sqrt( (p0x+p1x)*(p0x+p1x) + (p0y+p1y)*(p0y+p1y));
1488 float m_inv =
sqrt ( (eClusEndCap[i] + eClusEndCap[j])*(eClusEndCap[i] + eClusEndCap[j]) - (p0x+p1x)*(p0x+p1x) - (p0y+p1y)*(p0y+p1y) - (p0z+p1z)*(p0z+p1z) );
1495 std::vector<int> IsoClus;
1498 TVector3 pairVect = TVector3((p0x+p1x), (p0y+p1y), (p0z+p1z));
1499 for(Int_t
k=0 ;
k<nClusEndCap ;
k++){
1504 if(
k==i ||
k==j)
continue;
1507 TVector3 clusVect = TVector3(etClusEndCap[
k] *
cos(phiClusEndCap[
k]), etClusEndCap[k] *
sin(phiClusEndCap[k]) , eClusEndCap[k] *
cos(thetaClusEndCap[k]) ) ;
1508 float dretacl = fabs(etaClusEndCap[k] - pairVect.Eta());
1509 float drcl = clusVect.DeltaR(pairVect);
1512 Iso = Iso + etClusEndCap[
k];
1513 IsoClus.push_back(k);
1580 if(neta > 0) neta -= 1;
1581 if(nphi > 359) nphi=nphi-360;
1584 if(nphi >359 || nphi <0 || neta< -85 || neta > 84)
1586 std::cout <<
" unexpected fatal error in HLTPi0RecHitsFilter::convxtalid "<< nphi <<
" " << neta <<
" "
1594 mdiff=(neta1-neta2);
1601 if(
abs(nphi1-nphi2) < (360-
abs(nphi1-nphi2))) {
1605 mdiff=360-
abs(nphi1-nphi2);
1606 if(nphi1>nphi2) mdiff=-mdiff;
double selePi0BeltDREndCap_
T getParameter(std::string const &) const
MonitorElement * hMinvPi0EE_
Pi0 invariant mass in EE.
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * hMinvEtaEE_
Eta invariant mass in EE.
double selePtGammaEndCap_
for pi0->gg endcap
MonitorElement * hEventEnergyEEpi0_
Distribution of total event energy EE (pi0)
MonitorElement * hPt1EtaEE_
Pt of the 1st most energetic Eta photon in EE.
void analyze(const edm::Event &e, const edm::EventSetup &c)
double ptMinForIsolation_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * hRechitEnergyEBpi0_
Energy Distribution of rechits EB (pi0)
MonitorElement * hiXDistrEEeta_
Distribution of rechits in ix EE (eta)
MonitorElement * hEventEnergyEBeta_
Distribution of total event energy EB (eta)
std::vector< EEDetId > detIdEERecHits
MonitorElement * hIsoPi0EB_
Pi0 Iso EB.
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Sin< T >::type sin(const T &t)
MonitorElement * hS4S92EtaEE_
S4S9 of the 2nd most energetic eta photon EE.
double seleMinvMinPi0EndCap_
MonitorElement * hMeanRecHitEnergyEEpi0_
Distribution of Mean energy per rechit EE (pi0)
double seleS9S25GammaEta_
MonitorElement * hPt1Pi0EE_
Pt of the 1st most energetic Pi0 photon in EE.
std::vector< EcalRecHit >::const_iterator const_iterator
double selePi0BeltDetaEndCap_
HLTAlCaMonPi0(const edm::ParameterSet &)
MonitorElement * hNRecHitsEEpi0_
Distribution of number of RecHits EE (pi0)
MonitorElement * hNRecHitsEBpi0_
Distribution of number of RecHits EB (pi0)
MonitorElement * hIsoEtaEB_
Eta Iso EB.
MonitorElement * hPt2EtaEE_
Pt of the 2nd most energetic Eta photon in EE.
double clusSeedThrEndCap_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
double seleS4S9GammaEndCap_
void endRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * hS4S92Pi0EE_
S4S9 of the 2nd most energetic pi0 photon EE.
double seleEtaBeltDREndCap_
double seleMinvMaxPi0EndCap_
MonitorElement * hS4S91Pi0EB_
S4S9 of the 1st most energetic pi0 photon.
MonitorElement * hRechitEnergyEEpi0_
Energy Distribution of rechits EE (pi0)
MonitorElement * hPt1EtaEB_
Pt of the 1st most energetic Eta photon in EB.
int iphi() const
get the crystal iphi
MonitorElement * hPt2Pi0EE_
Pt of the 2nd most energetic Pi0 photon in EE.
MonitorElement * hEventEnergyEBpi0_
Distribution of total event energy EB (pi0)
MonitorElement * hMinvEtaEB_
Eta invariant mass in EB.
double ptMinForIsolationEndCap_
MonitorElement * hPt1Pi0EB_
Pt of the 1st most energetic Pi0 photon in EB.
MonitorElement * hPtPi0EE_
Pi0 Pt in EE.
MonitorElement * hiPhiDistrEBpi0_
Distribution of rechits in iPhi (pi0)
int diff_neta_s(int, int)
bool saveToFile_
Write to file.
edm::InputTag productMonitoredEBeta_
double seleEtaBeltDetaEndCap_
Cos< T >::type cos(const T &t)
MonitorElement * hS4S91Pi0EE_
S4S9 of the 1st most energetic pi0 photon EE.
std::vector< EcalRecHit > EERecHits
MonitorElement * hMeanRecHitEnergyEBeta_
Distribution of Mean energy per rechit EB (eta)
double seleMinvMaxEtaEndCap_
double selePtGammaEtaEndCap_
for eta->gg endcap
MonitorElement * hRechitEnergyEEeta_
Energy Distribution of rechits EE (eta)
MonitorElement * hS4S92EtaEB_
S4S9 of the 2nd most energetic eta photon.
double seleS4S9GammaEtaEndCap_
MonitorElement * hiPhiDistrEBeta_
Distribution of rechits in iPhi (eta)
PositionCalc posCalculator_
edm::InputTag productMonitoredEBpi0_
object to monitor
std::string folderName_
DQM folder name.
unsigned int prescaleFactor_
Monitor every prescaleFactor_ events.
int ieta() const
get the crystal ieta
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * hMeanRecHitEnergyEBpi0_
Distribution of Mean energy per rechit EB (pi0)
MonitorElement * hPt2Pi0EB_
Pt of the 2nd most energetic Pi0 photon in EB.
EventAuxiliary const & eventAuxiliary() const
std::string fileName_
Output file name if required.
MonitorElement * hNRecHitsEBeta_
Distribution of number of RecHits EB (eta)
MonitorElement * hiXDistrEEpi0_
Distribution of rechits in ix EE (pi0)
MonitorElement * hiYDistrEEpi0_
Distribution of rechits in iy EE (pi0)
MonitorElement * hS4S91EtaEB_
S4S9 of the 1st most energetic eta photon.
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
void convxtalid(int &, int &)
MonitorElement * hPtPi0EB_
Pi0 Pt in EB.
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
XYZPointD XYZPoint
point in space with cartesian internal representation
MonitorElement * hiYDistrEEeta_
Distribution of rechits in iy EE (eta)
double seleXtalMinEnergy_
MonitorElement * hRechitEnergyEBeta_
Energy Distribution of rechits EB (eta)
MonitorElement * hPt2EtaEB_
Pt of the 2nd most energetic Eta photon in EB.
MonitorElement * hPtEtaEB_
Eta Pt in EB.
MonitorElement * hIsoPi0EE_
Pi0 Iso EE.
bool isMonEBpi0_
which subdet will be monitored
T const * product() const
MonitorElement * hEventEnergyEEeta_
Distribution of total event energy EE (eta)
MonitorElement * hiEtaDistrEBpi0_
Distribution of rechits in iEta (pi0)
MonitorElement * hMinvPi0EB_
Pi0 invariant mass in EB.
double ptMinForIsolationEtaEndCap_
math::XYZPoint Calculate_Location(const std::vector< std::pair< DetId, float > > &iDetIds, const EcalRecHitCollection *iRecHits, const CaloSubdetectorGeometry *iSubGeom, const CaloSubdetectorGeometry *iESGeom=0)
double seleXtalMinEnergyEndCap_
int diff_nphi_s(int, int)
edm::InputTag productMonitoredEEeta_
MonitorElement * hNRecHitsEEeta_
Distribution of number of RecHits EE (eta)
double ptMinForIsolationEta_
std::vector< EBDetId > detIdEBRecHits
MonitorElement * hS4S92Pi0EB_
S4S9 of the 2nd most energetic pi0 photon.
double seleMinvMinEtaEndCap_
double selePtGammaEta_
for eta->gg barrel
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * hIsoEtaEE_
Eta Iso EE.
edm::InputTag productMonitoredEEpi0_
object to monitor
EventNumber_t event() const
double seleS9S25GammaEtaEndCap_
std::vector< EcalRecHit > EBRecHits
MonitorElement * hPtEtaEE_
Eta Pt in EE.
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hMeanRecHitEnergyEEeta_
Distribution of Mean energy per rechit EE (eta)
MonitorElement * hiEtaDistrEBeta_
Distribution of rechits in iEta (eta)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * hS4S91EtaEE_
S4S9 of the 1st most energetic eta photon EE.