135 bool condResult =
false;
136 bool reqObjResult =
false;
141 std::vector<GlobalObject> cndObjTypeVec(nObjInCond);
149 bool convertCaloScales =
false;
152 convertCaloScales =
true;
165 switch (cond0Categ) {
176 cndObjTypeVec[0] = (corrMuon->
objectType())[0];
179 std::ostringstream myCout;
180 muCondition.
print(myCout);
182 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
197 cndObjTypeVec[0] = (corrCalo->
objectType())[0];
200 std::ostringstream myCout;
201 caloCondition.
print(myCout);
203 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
217 cndObjTypeVec[0] = (corrEnergySum->
objectType())[0];
220 std::ostringstream myCout;
221 eSumCondition.
print(myCout);
223 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
237 <<
"\n First sub-condition false, second sub-condition not evaluated and not printed." 243 reqObjResult =
false;
245 switch (cond1Categ) {
257 cndObjTypeVec[1] = (corrMuon->
objectType())[0];
260 std::ostringstream myCout;
261 muCondition.
print(myCout);
263 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
277 cndObjTypeVec[1] = (corrCalo->
objectType())[0];
280 std::ostringstream myCout;
281 caloCondition.
print(myCout);
283 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
298 cndObjTypeVec[1] = (corrEnergySum->
objectType())[0];
301 std::ostringstream myCout;
302 eSumCondition.
print(myCout);
304 LogDebug(
"L1TGlobal") << myCout.str() << std::endl;
320 <<
" Both sub-conditions true for object requirements." 321 <<
" Evaluate correlation requirements.\n" << std::endl;
333 objectsInComb.reserve(nObjInCond);
343 bool etSumCond =
false;
382 LogDebug(
"L1TGlobal") <<
"Phi Bound = " << phiBound << std::endl;
391 <<
" Sub-condition 0: std::vector<SingleCombInCond> size: " 392 << (cond0Comb.size()) << std::endl;
394 <<
" Sub-condition 1: std::vector<SingleCombInCond> size: " 395 << (cond1Comb.size()) << std::endl;
402 for (std::vector<SingleCombInCond>::const_iterator it0Comb =
403 cond0Comb.begin(); it0Comb != cond0Comb.end(); it0Comb++) {
409 if (!(*it0Comb).empty()) {
410 obj0Index = (*it0Comb)[0];
413 <<
"\n SingleCombInCond (*it0Comb).size() " 414 << ((*it0Comb).size()) << std::endl;
419 switch (cond0Categ) {
423 phiIndex0 = (candMuVec->
at(cond0bx,obj0Index))->hwPhiAtVtx();
424 etaIndex0 = (candMuVec->
at(cond0bx,obj0Index))->hwEtaAtVtx();
425 etIndex0 = (candMuVec->
at(cond0bx,obj0Index))->hwPt();
426 chrg0 = (candMuVec->
at(cond0bx,obj0Index))->hwCharge();
427 int etaBin0 = etaIndex0;
433 if (etBin0 >= ssize){
436 <<
"muon0 hw et" << etBin0 <<
" out of scale range. Setting to maximum.";
441 phi0Phy = 0.5*(binEdges.second + binEdges.first);
443 eta0Phy = 0.5*(binEdges.second + binEdges.first);
445 et0Phy = 0.5*(binEdges.second + binEdges.first);
447 LogDebug(
"L1TGlobal") <<
"Found all quantities for the muon 0" << std::endl;
454 switch(cndObjTypeVec[0]) {
458 phiIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPhi();
459 etaIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwEta();
460 etIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPt();
467 if (etBin0 >= ssize){
470 <<
"EG0 hw et" << etBin0 <<
" out of scale range. Setting to maximum.";
475 phi0Phy = 0.5*(binEdges.second + binEdges.first);
477 eta0Phy = 0.5*(binEdges.second + binEdges.first);
479 et0Phy = 0.5*(binEdges.second + binEdges.first);
486 phiIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPhi();
487 etaIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwEta();
488 etIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPt();
494 if (etBin0 >= ssize){
502 phi0Phy = 0.5*(binEdges.second + binEdges.first);
504 eta0Phy = 0.5*(binEdges.second + binEdges.first);
506 et0Phy = 0.5*(binEdges.second + binEdges.first);
512 phiIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPhi();
513 etaIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwEta();
514 etIndex0 = (candCaloVec->
at(cond0bx,obj0Index))->hwPt();
520 if (etBin0 >= ssize){
523 <<
"tau0 hw et" << etBin0 <<
" out of scale range. Setting to maximum.";
529 phi0Phy = 0.5*(binEdges.second + binEdges.first);
531 eta0Phy = 0.5*(binEdges.second + binEdges.first);
533 et0Phy = 0.5*(binEdges.second + binEdges.first);
543 if(convertCaloScales) {
547 LogDebug(
"L1TGlobal") << lutName <<
" EtaCal = " << etaIndex0 <<
" etaBin0 = " << etaBin0 <<
" EtaMu = " << tst << std::endl;
552 LogDebug(
"L1TGlobal") << lutName <<
" PhiCal = " << phiIndex0 <<
" PhiMu = " << tst << std::endl;
566 switch( cndObjTypeVec[0] ){
601 <<
"Unmatched object type from template to EtSumType, cndObjTypeVec[0] = " 610 for(
int iEtSum=0; iEtSum < (
int)candEtSumVec->
size(cond0bx); iEtSum++) {
611 if( (candEtSumVec->
at(cond0bx,iEtSum))->getType() ==
type ) {
612 phiIndex0 = (candEtSumVec->
at(cond0bx,iEtSum))->hwPhi();
613 etaIndex0 = (candEtSumVec->
at(cond0bx,iEtSum))->hwEta();
614 etIndex0 = (candEtSumVec->
at(cond0bx,iEtSum))->hwPt();
622 if(cndObjTypeVec[0] ==
gtETM ) {
624 phi0Phy = 0.5*(binEdges.second + binEdges.first);
630 if (etBin0 >= ssize){ etBin0 = ssize-1; }
633 et0Phy = 0.5*(binEdges.second + binEdges.first);
634 }
else if (cndObjTypeVec[0] ==
gtHTM) {
636 phi0Phy = 0.5*(binEdges.second + binEdges.first);
642 if (etBin0 >= ssize){ etBin0 = ssize-1; }
645 et0Phy = 0.5*(binEdges.second + binEdges.first);
646 }
else if (cndObjTypeVec[0] ==
gtETMHF) {
648 phi0Phy = 0.5*(binEdges.second + binEdges.first);
654 if (etBin0 >= ssize){ etBin0 = ssize-1; }
657 et0Phy = 0.5*(binEdges.second + binEdges.first);
662 if(convertCaloScales) {
667 LogDebug(
"L1TGlobal") << lutName <<
" PhiCal = " << phiIndex0 <<
" PhiMu = " << tst << std::endl;
681 LogDebug(
"L1TGlobal") <<
"Error could not find the Cond Category for Leg 0" << std::endl;
688 for (std::vector<SingleCombInCond>::const_iterator it1Comb =
689 cond1Comb.begin(); it1Comb != cond1Comb.end(); it1Comb++) {
691 LogDebug(
"L1TGlobal") <<
"Looking at second Condition" << std::endl;
696 if (!(*it1Comb).empty()) {
697 obj1Index = (*it1Comb)[0];
700 <<
"\n SingleCombInCond (*it1Comb).size() " 701 << ((*it1Comb).size()) << std::endl;
707 if( cndObjTypeVec[0] == cndObjTypeVec[1] &&
708 obj0Index == obj1Index &&
709 cond0bx == cond1bx) {
711 LogDebug(
"L1TGlobal") <<
"Corr Condition looking at same leg...skip" << std::endl;
715 switch (cond1Categ) {
719 phiIndex1 = (candMuVec->
at(cond1bx,obj1Index))->hwPhiAtVtx();
720 etaIndex1 = (candMuVec->
at(cond1bx,obj1Index))->hwEtaAtVtx();
721 etIndex1 = (candMuVec->
at(cond1bx,obj1Index))->hwPt();
722 chrg1 = (candMuVec->
at(cond1bx,obj1Index))->hwCharge();
729 if (etBin1 >= ssize){
731 <<
"muon2 hw et" << etBin1 <<
" out of scale range. Setting to maximum.";
737 phi1Phy = 0.5*(binEdges.second + binEdges.first);
739 eta1Phy = 0.5*(binEdges.second + binEdges.first);
741 et1Phy = 0.5*(binEdges.second + binEdges.first);
746 switch(cndObjTypeVec[1]) {
749 phiIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPhi();
750 etaIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwEta();
751 etIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPt();
757 if (etBin1 >= ssize){
759 <<
"EG1 hw et" << etBin1 <<
" out of scale range. Setting to maximum.";
765 phi1Phy = 0.5*(binEdges.second + binEdges.first);
767 eta1Phy = 0.5*(binEdges.second + binEdges.first);
769 et1Phy = 0.5*(binEdges.second + binEdges.first);
775 phiIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPhi();
776 etaIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwEta();
777 etIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPt();
784 if (etBin1 >= ssize){
792 phi1Phy = 0.5*(binEdges.second + binEdges.first);
794 eta1Phy = 0.5*(binEdges.second + binEdges.first);
797 et1Phy = 0.5*(binEdges.second + binEdges.first);
803 phiIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPhi();
804 etaIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwEta();
805 etIndex1 = (candCaloVec->
at(cond1bx,obj1Index))->hwPt();
811 if (etBin1 >= ssize){
813 <<
"tau2 hw et" << etBin1 <<
" out of scale range. Setting to maximum.";
819 phi1Phy = 0.5*(binEdges.second + binEdges.first);
821 eta1Phy = 0.5*(binEdges.second + binEdges.first);
823 et1Phy = 0.5*(binEdges.second + binEdges.first);
834 if(convertCaloScales) {
839 LogDebug(
"L1TGlobal") << lutName <<
" EtaCal = " << etaIndex1 <<
" EtaMu = " << tst << std::endl;
844 LogDebug(
"L1TGlobal") << lutName <<
" PhiCal = " << phiIndex1 <<
" PhiMu = " << tst << std::endl;
854 LogDebug(
"L1TGlobal") <<
"Looking at second Condition as Energy Sum: " << cndObjTypeVec[1] << std::endl;
859 switch( cndObjTypeVec[1] ){
894 <<
"Unmatched object type from template to EtSumType, cndObjTypeVec[1] = " 904 LogDebug(
"L1TGlobal") <<
"obj " << lutObj1 <<
" Vector Size " << candEtSumVec->
size(cond1bx) << std::endl;
905 for(
int iEtSum=0; iEtSum < (
int)candEtSumVec->
size(cond1bx); iEtSum++) {
906 if( (candEtSumVec->
at(cond1bx,iEtSum))->getType() ==
type ) {
907 phiIndex1 = (candEtSumVec->
at(cond1bx,iEtSum))->hwPhi();
908 etaIndex1 = (candEtSumVec->
at(cond1bx,iEtSum))->hwEta();
909 etIndex1 = (candEtSumVec->
at(cond1bx,iEtSum))->hwPt();
913 if(cndObjTypeVec[1] ==
gtETM) {
915 phi1Phy = 0.5*(binEdges.second + binEdges.first);
921 if (etBin1 >= ssize){ etBin1 = ssize-1; }
924 et1Phy = 0.5*(binEdges.second + binEdges.first);
925 }
else if(cndObjTypeVec[1] ==
gtHTM) {
927 phi1Phy = 0.5*(binEdges.second + binEdges.first);
933 if (etBin1 >= ssize){ etBin1 = ssize-1; }
936 et1Phy = 0.5*(binEdges.second + binEdges.first);
937 }
else if(cndObjTypeVec[1] ==
gtETMHF) {
939 phi1Phy = 0.5*(binEdges.second + binEdges.first);
945 if (etBin1 >= ssize){ etBin1 = ssize-1; }
948 et1Phy = 0.5*(binEdges.second + binEdges.first);
953 if(convertCaloScales) {
958 LogDebug(
"L1TGlobal") << lutName <<
" PhiCal = " << phiIndex1 <<
" PhiMu = " << tst << std::endl;
971 LogDebug(
"L1TGlobal") <<
"Error could not find the Cond Category for Leg 0" << std::endl;
978 LogDebug(
"L1TGlobal") <<
" Correlation pair [" 981 <<
"] with collection indices [" << obj0Index <<
", " 982 << obj1Index <<
"] " <<
" has: \n" 983 <<
" Et value = ["<< etIndex0 <<
", " << etIndex1 <<
"]\n" 984 <<
" phi indices = ["<< phiIndex0 <<
", " << phiIndex1 <<
"]\n" 985 <<
" eta indices = ["<< etaIndex0 <<
", " << etaIndex1 <<
"]\n" 986 <<
" chrg = ["<< chrg0 <<
", " << chrg1 <<
"]\n"<< std::endl;
991 bool reqResult =
true;
994 objectsInComb.clear();
996 objectsInComb.push_back(obj0Index);
997 objectsInComb.push_back(obj1Index);
1005 double deltaPhiPhy = fabs(phi1Phy - phi0Phy);
1006 if(deltaPhiPhy>
M_PI) deltaPhiPhy = 2.*
M_PI - deltaPhiPhy;
1007 double deltaEtaPhy = fabs(eta1Phy - eta0Phy);
1011 int deltaPhiFW =
abs(phiIndex0 - phiIndex1);
1012 if(deltaPhiFW>=phiBound) deltaPhiFW = 2*phiBound - deltaPhiFW;
1019 int deltaEtaFW =
abs(etaIndex0 - etaIndex1);
1020 long long deltaEtaLUT = 0;
1021 unsigned int precDeltaEtaLUT = 0;
1028 LogDebug(
"L1TGlobal") <<
"Obj0 phiFW = " << phiIndex0 <<
" Obj1 phiFW = " << phiIndex1 <<
"\n" 1029 <<
" DeltaPhiFW = " << deltaPhiFW <<
"\n" 1030 <<
" LUT Name = " << lutName <<
" Prec = " << precDeltaPhiLUT <<
" DeltaPhiLUT = " << deltaPhiLUT <<
"\n" 1031 <<
"Obj0 etaFW = " << etaIndex0 <<
" Obj1 etaFW = " << etaIndex1 <<
"\n" 1032 <<
" DeltaEtaFW = " << deltaEtaFW <<
"\n" 1033 <<
" LUT Name = " << lutName <<
" Prec = " << precDeltaEtaLUT <<
" DeltaEtaLUT = " << deltaEtaLUT << std::endl;
1039 unsigned int preShift = precDeltaEtaLUT - corrPar.
precEtaCut;
1040 LogDebug(
"L1TGlobal") <<
" Testing Delta Eta Cut (" << lutObj0 <<
"," << lutObj1 <<
") [" << (
long long)(corrPar.
minEtaCutValue*
pow(10,preShift))
1042 <<
" deltaEtaLUT = " << deltaEtaLUT <<
"\n" 1043 <<
" Precision Shift = " << preShift <<
"\n" 1044 <<
" deltaEta (shift)= " << (deltaEtaLUT/
pow(10,preShift+corrPar.
precEtaCut)) <<
"\n" 1045 <<
" deltaEtaPhy = " << deltaEtaPhy << std::endl;
1052 <<
"," << (
long long)(corrPar.
maxEtaCutValue*
pow(10,preShift)) <<
"]" << std::endl;
1057 <<
"," << (
long long)(corrPar.
maxEtaCutValue*
pow(10,preShift)) <<
"]" << std::endl;
1065 unsigned int preShift = precDeltaPhiLUT - corrPar.
precPhiCut;
1066 LogDebug(
"L1TGlobal") <<
" Testing Delta Phi Cut (" << lutObj0 <<
"," << lutObj1 <<
") [" << (
long long)(corrPar.
minPhiCutValue*
pow(10,preShift))
1068 <<
" deltaPhiLUT = " << deltaPhiLUT <<
"\n" 1069 <<
" Precision Shift = " << preShift <<
"\n" 1070 <<
" deltaPhi (shift)= " << (deltaPhiLUT/
pow(10,preShift+corrPar.
precPhiCut)) <<
"\n" 1071 <<
" deltaPhiPhy = " << deltaPhiPhy << std::endl;
1078 <<
"," << (
long long)(corrPar.
maxPhiCutValue*
pow(10,preShift)) <<
"]" << std::endl;
1083 <<
"," << (
long long)(corrPar.
maxPhiCutValue*
pow(10,preShift)) <<
"]" << std::endl;
1092 unsigned int preShift = 2*precDeltaPhiLUT - corrPar.
precDRCut;
1093 double deltaRSqPhy = deltaPhiPhy*deltaPhiPhy + deltaEtaPhy*deltaEtaPhy;
1094 long long deltaRSq = deltaEtaLUT*deltaEtaLUT + deltaPhiLUT*deltaPhiLUT;
1096 LogDebug(
"L1TGlobal") <<
" Testing Delta R Cut (" << lutObj0 <<
"," << lutObj1 <<
") [" << (
long long)(corrPar.
minDRCutValue*
pow(10,preShift))
1098 <<
" deltaPhiLUT = " << deltaPhiLUT <<
"\n" 1099 <<
" deltaEtaLUT = " << deltaEtaLUT <<
"\n" 1100 <<
" deltaRSqLUT = " << deltaRSq <<
"\n" 1101 <<
" Precision Shift = " << preShift <<
"\n" 1102 <<
" deltaRSqLUT (shift)= " << (deltaRSq/
pow(10,preShift+corrPar.
precDRCut)) <<
"\n" 1103 <<
" deltaRSqPhy = " << deltaRSqPhy << std::endl;
1110 <<
"," << (
long long)(corrPar.
maxDRCutValue*
pow(10,preShift)) <<
"]" << deltaRSq << std::endl;
1115 <<
"," << (
long long)(corrPar.
maxDRCutValue*
pow(10,preShift)) <<
"]" << deltaRSq << std::endl;
1126 double cosPhi1Phy =
cos(phi0Phy);
1127 double sinPhi1Phy =
sin(phi0Phy);
1128 double cosPhi2Phy =
cos(phi1Phy);
1129 double sinPhi2Phy =
sin(phi1Phy);
1131 double tbptSqPhy = et0Phy*et0Phy + et1Phy*et1Phy + 2*et0Phy*et1Phy*(cosPhi1Phy*cosPhi2Phy + sinPhi1Phy*sinPhi2Phy);
1142 if(precCosLUT0 - precCosLUT1 != 0)
LogDebug(
"L1TGlobal") <<
"Warning: Cos LUTs for TwoBodyPt on different Precision" << std::endl;
1143 if(precSinLUT0 - precSinLUT1 != 0)
LogDebug(
"L1TGlobal") <<
"Warning: Sin LUTs for TwoBodyPt on different Precision" << std::endl;
1144 if(precSinLUT0 - precCosLUT1 != 0)
LogDebug(
"L1TGlobal") <<
"Warning: Sin and Cos LUTs for TwoBodyPt on different Precision" << std::endl;
1145 if(precSinLUT1 - precCosLUT0 != 0)
LogDebug(
"L1TGlobal") <<
"Warning: Sin and Cos LUTs for TwoBodyPt on different Precision" << std::endl;
1165 LogTrace(
"L1TGlobal") <<
" TBPT Trig precisions:\t " << precCosLUT0 <<
"\t" << precCosLUT1 <<
"\t" << precSinLUT0 <<
"\t" << precSinLUT1;
1166 LogTrace(
"L1TGlobal") <<
" TBPT Pt precisions:\t " << precPtLUTObj0 <<
"\t" << precPtLUTObj1;
1168 LogTrace(
"L1TGlobal") <<
" TBPT Pt1*Pt1 -- Phys:\t " << et0Phy*et0Phy <<
"\tHW:\t" << ptObj0*ptObj0*(
pow(10,6));
1169 LogTrace(
"L1TGlobal") <<
" TBPT Pt2*Pt2 -- Phys:\t " << et1Phy*et1Phy <<
"\tHW:\t" << ptObj1*ptObj1*(
pow(10,6));
1170 LogTrace(
"L1TGlobal") <<
" TBPT 2Pt1*Pt2 -- Phys:\t " << 2*et0Phy*et1Phy <<
"\tHW:\t" << 2*(ptObj0*
pow(10,0))*(ptObj1*
pow(10,0));
1171 LogTrace(
"L1TGlobal") <<
" TBPT Trig -- Phys:\t " << cosPhi1Phy*cosPhi2Phy + sinPhi1Phy*sinPhi2Phy <<
"\tHW:\t" << cosPhi1LUT*cosPhi2LUT + sinPhi1LUT*sinPhi2LUT;
1174 long long tbptSqHW =
1175 ptObj0*ptObj0*(
pow(10,2*precCosLUT0)) +
1176 ptObj1*ptObj1*(
pow(10,2*precCosLUT0)) +
1177 2*ptObj0*ptObj1*(cosPhi1LUT*cosPhi2LUT + sinPhi1LUT*sinPhi2LUT);
1179 unsigned int preShift = precPtLUTObj0 + precPtLUTObj1 + 2*precCosLUT0;
1181 LogTrace(
"L1TGlobal") <<
"TBPT Result -- Phys: " << tbptSqPhy <<
"\tHW: " << tbptSqHW <<
"\tShifted\t" << tbptSqHW/
pow(10,preShift) << std::endl;
1186 LogDebug(
"L1TGlobal") <<
" Testing Two Body Pt Cut (" << lutObj0 <<
"," << lutObj1
1189 <<
" etIndex0 = " << etIndex0 <<
" pt0LUT = " << ptObj0 <<
" PhyEt0 = " << et0Phy <<
"\n" 1190 <<
" etIndex1 = " << etIndex1 <<
" pt1LUT = " << ptObj1 <<
" PhyEt1 = " << et1Phy <<
"\n" 1191 <<
" Precision Shift = " << preShift <<
"\n" 1192 <<
" Sin(phi1): LUT/Phys\t " << sinPhi1LUT <<
" / " << sinPhi1Phy <<
"\n" 1193 <<
" Sin(phi2): LUT/Phys\t " << sinPhi2LUT <<
" / " << sinPhi2Phy <<
"\n" 1194 <<
" Cos(phi1): LUT/Phys\t " << cosPhi1LUT <<
" / " << cosPhi1Phy <<
"\n" 1195 <<
" Cos(phi2): LUT/Phys\t " << cosPhi2LUT <<
" / " << cosPhi2Phy <<
"\n" 1205 if( tbptSqHW > 0. &&
1208 <<
"]" <<
"\twith value: " << tbptSqHW <<
"\n" 1215 <<
"]" <<
"\t with value: " << tbptSqHW <<
"\n" 1228 double cosDeltaPhiPhy =
cos(deltaPhiPhy);
1229 double coshDeltaEtaPhy = cosh(deltaEtaPhy);
1230 if (corrPar.
corrCutType & 0x10) coshDeltaEtaPhy=1.;
1231 double massSqPhy = et0Phy*et1Phy*(coshDeltaEtaPhy - cosDeltaPhiPhy);
1236 long long coshDeltaEtaLUT;
1238 coshDeltaEtaLUT=1*
pow(10,precCosLUT);
1242 if(precCoshLUT - precCosLUT != 0)
LogDebug(
"L1TGlobal") <<
"Warning: Cos and Cosh LUTs on different Precision" << std::endl;
1257 long long massSq = ptObj0*ptObj1*(coshDeltaEtaLUT - cosDeltaPhiLUT);
1260 unsigned int preShift = precPtLUTObj0 + precPtLUTObj1 + precCosLUT - corrPar.
precMassCut;
1262 LogDebug(
"L1TGlobal") <<
" Testing Invariant Mass (" << lutObj0 <<
"," << lutObj1 <<
") [" << (
long long)(corrPar.
minMassCutValue*
pow(10,preShift))
1264 <<
" deltaPhiLUT = " << deltaPhiLUT <<
" cosLUT = " << cosDeltaPhiLUT <<
"\n" 1265 <<
" deltaEtaLUT = " << deltaEtaLUT <<
" coshLUT = " << coshDeltaEtaLUT <<
"\n" 1266 <<
" etIndex0 = " << etIndex0 <<
" pt0LUT = " << ptObj0 <<
" PhyEt0 = " << et0Phy <<
"\n" 1267 <<
" etIndex1 = " << etIndex1 <<
" pt1LUT = " << ptObj1 <<
" PhyEt1 = " << et1Phy <<
"\n" 1268 <<
" massSq/2 = " << massSq <<
"\n" 1269 <<
" Precision Shift = " << preShift <<
"\n" 1270 <<
" massSq (shift)= " << (massSq/
pow(10,preShift+corrPar.
precMassCut)) <<
"\n" 1271 <<
" deltaPhiPhy = " << deltaPhiPhy <<
" cos() = " << cosDeltaPhiPhy <<
"\n" 1272 <<
" deltaEtaPhy = " << deltaEtaPhy <<
" cosh()= " << coshDeltaEtaPhy <<
"\n" 1273 <<
" massSqPhy/2 = " << massSqPhy <<
" sqrt(|massSq|) = "<<
sqrt(fabs(2.*massSqPhy)) << std::endl;
1292 bool chrgCorrel =
true;
1301 if (reqResult & chrgCorrel) {
1315 LogDebug(
"L1TGlobal") <<
" pass(es) the correlation condition.\n" 1367 myCout <<
"Dummy Print for CorrCondition" << std::endl;
const GlobalCondition * m_gtCond0
void print(std::ostream &myCout) const override
print condition
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
const ScaleParameters & getETMScales() const
unsigned int getPrec_Cos(const std::string &lutName) const
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
unsigned int getPrec_Pt(const std::string &lutName) const
unsigned size(int bx) const
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
void evaluateConditionStoreResult(const int bxEval)
call evaluateCondition and save last result
long long getLUT_Sin(const std::string &lutName, int element) const
void setGtCorrelationTemplate(const CorrelationTemplate *)
void print(std::ostream &myCout) const override
print condition
const GlobalBoard * m_uGtB
pointer to uGt GlobalBoard, to be able to get the trigger objects
unsigned int chargeCorrelation
std::vector< std::pair< double, double > > etaBins
Sin< T >::type sin(const T &t)
std::vector< std::pair< double, double > > phiBins
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
const GlobalCondition * m_gtCond1
void setuGtB(const GlobalBoard *)
set the pointer to uGT GlobalBoard
long long minMassCutValue
const ScaleParameters & getJETScales() const
virtual void print(std::ostream &myCout) const
print condition
std::vector< int > SingleCombInCond
typedefs
unsigned int getPrec_DeltaEta_Cosh(const std::string &lutName) const
const ScaleParameters & getETMHFScales() const
const ScaleParameters & getEGScales() const
long long getLUT_DeltaEta(std::string lutName, int element) const
unsigned int getPrec_Sin(const std::string &lutName) const
std::string l1TGtObjectEnumToString(const GlobalObject &)
long long maxMassCutValue
bool condLastResult() const
get the latest result for the condition
GtConditionCategory
condition categories
const int & condRelativeBx() const
get / set the condition relative bx
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
const l1t::GtConditionCategory cond1Category() const
const bool evaluateCondition(const int bxEval) const override
the core function to check if the condition matches
long long getLUT_DeltaPhi_Cos(std::string lutName, int element) const
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
long long getLUT_Cos(const std::string &lutName, int element) const
CorrCondition & operator=(const CorrCondition &)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
void print(std::ostream &myCout) const override
print condition
long long minTBPTCutValue
long long getLUT_Pt(const std::string &lutName, int element) const
Cos< T >::type cos(const T &t)
unsigned int getPrec_DeltaEta(const std::string &lutName) const
const BXVector< const l1t::EtSum * > * getCandL1EtSum() const
pointer to Tau data list
Abs< T >::type abs(const T &t)
void copy(const CorrCondition &cp)
copy function for copy constructor and operator=
void print(std::ostream &myCout) const override
print the condition
const CorrelationTemplate * m_gtCorrelationTemplate
pointer to a CorrelationTemplate
const ScaleParameters & getTAUScales() const
long long getLUT_CalMuPhi(const std::string &lutName, int element) const
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
void setScales(const GlobalScales *)
long long getLUT_CalMuEta(const std::string &lutName, int element) const
const GlobalScales * m_gtScales
std::vector< std::pair< double, double > > etBins
long long getLUT_DeltaEta_Cosh(std::string lutName, int element) const
const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate &cand) const
function to check a single object if it matches a condition
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
int m_verbosity
verbosity level
~CorrCondition() override
const CorrelationTemplate * gtCorrelationTemplate() const
get / set the pointer to a Condition
long long getLUT_DeltaPhi(std::string lutName, int element) const
int condMaxNumberObjects() const
void print(std::ostream &myCout) const override
print condition
bool m_condLastResult
the last result of evaluateCondition()
const GlobalBoard * getuGtB() const
get / set the pointer to uGt GlobalBoard
const l1t::L1Candidate * getCandidate(const int bx, const int indexCand) const
load candidates
typedef for a single object template
unsigned int getPrec_DeltaPhi(const std::string &lutName) const
const CorrelationParameter * correlationParameter() const
get / set correlation parameters
long long maxTBPTCutValue
int m_condMaxNumberObjects
const ScaleParameters & getMUScales() const
typedef for correlation parameters
const ScaleParameters & getHTMScales() const
std::vector< SingleCombInCond > CombinationsInCond
all the object combinations evaluated to true in the condition
unsigned int getPrec_DeltaPhi_Cos(const std::string &lutName) const
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
Power< A, B >::type pow(const A &a, const B &b)
const T & at(int bx, unsigned i) const