////////////////////////////////////////// Loop over selected constituents and collect information //////////////////////////////////////////
////////////////////////////////////////// Calculate & fill features //////////////////////////////////////////
310 bool foundIt =
false;
311 std::vector<PanTau::TauConstituent*> list_TypeConstituents;
314 if (!foundIt)
return StatusCode::SUCCESS;
316 unsigned int n_Constituents_All = list_AllConstituents.size();
317 unsigned int n_Constituents_Type = list_TypeConstituents.size();
323 TLorentzVector tlv_1st_Et;
324 TLorentzVector tlv_2nd_Et;
325 TLorentzVector tlv_3rd_Et;
327 if(!list_TypeConstituents.empty()) tlv_1st_Et = list_TypeConstituents[0]->p4();
328 if(list_TypeConstituents.size() > 1) tlv_2nd_Et = list_TypeConstituents[1]->p4();
329 if(list_TypeConstituents.size() > 2) tlv_3rd_Et = list_TypeConstituents[2]->p4();
332 TLorentzVector tlv_Last_Et;
333 if(!list_TypeConstituents.empty()) tlv_Last_Et = list_TypeConstituents.back()->p4();
336 std::vector<PanTau::TauConstituent*> list_TypeConstituents_SortBDT = list_TypeConstituents;
339 TLorentzVector tlv_1st_BDT;
340 TLorentzVector tlv_2nd_BDT;
341 TLorentzVector tlv_3rd_BDT;
343 if(!list_TypeConstituents_SortBDT.empty()) tlv_1st_BDT = list_TypeConstituents_SortBDT[0]->p4();
344 if(list_TypeConstituents_SortBDT.size() > 1) tlv_2nd_BDT = list_TypeConstituents_SortBDT[1]->p4();
345 if(list_TypeConstituents_SortBDT.size() > 2) tlv_3rd_BDT = list_TypeConstituents_SortBDT[2]->p4();
352 TLorentzVector tlv_TypeConstituents;
354 double sum_DRToReference = 0;
355 double sum_DR2ToReference = 0;
356 double sum_DRToLeading = 0;
357 double sum_DR2ToLeading = 0;
364 double sum_EtxDR = 0;
365 double sum_EtxDR2 = 0;
366 double sum_EtxDRprime = 0;
367 double sum_EtxAngle = 0;
369 double sum_EtInRing00To01 = 0;
370 double sum_EtInRing01To02 = 0;
371 double sum_EtInRing02To03 = 0;
372 double sum_EtInRing03To04 = 0;
373 double sum_EtInRing04To05 = 0;
375 unsigned int num_EFOs = 0;
376 unsigned int num_ConstsIn00To01 = 0;
377 unsigned int num_ConstsIn01To02 = 0;
378 unsigned int num_ConstsIn02To03 = 0;
379 unsigned int num_ConstsIn03To04 = 0;
381 double max_DeltaR = 0;
387 for(
unsigned int iTypeConst=0; iTypeConst<list_TypeConstituents.size(); iTypeConst++) {
390 TLorentzVector tlv_curConst = list_TypeConstituents.at(iTypeConst)->p4();
393 if (std::isnan(tlv_curConst.Pt()) || std::isinf(tlv_curConst.Pt()))
continue;
398 tlv_TypeConstituents += tlv_curConst;
401 double hlp_Et = tlv_curConst.Et();
402 double hlp_Et2 = hlp_Et * hlp_Et;
403 double hlp_E = tlv_curConst.E();
404 double hlp_E2 = hlp_E * hlp_E;
405 double hlp_DeltaR = tlv_Reference.DeltaR(tlv_curConst);
406 double hlp_DeltaR2 = hlp_DeltaR * hlp_DeltaR;
407 double hlp_DeltaRLeading = (tlv_1st_Et.Pt() == 0 ? 0 : tlv_1st_Et.DeltaR(tlv_curConst));
408 double hlp_DeltaR2Leading = hlp_DeltaRLeading * hlp_DeltaRLeading;
410 double hlp_Angle = tlv_Reference.Angle(tlv_curConst.Vect());
413 sum_DRToReference += hlp_DeltaR;
414 sum_DR2ToReference += hlp_DeltaR2;
415 sum_DRToLeading += hlp_DeltaRLeading;
416 sum_DR2ToLeading += hlp_DeltaR2Leading;
423 sum_EtxDR += hlp_Et * hlp_DeltaR;
424 sum_EtxDR2 += hlp_Et * hlp_DeltaR2;
425 sum_EtxDRprime += hlp_Et * hlp_DeltaRprime;
426 sum_EtxAngle += hlp_Et * hlp_Angle;
428 if(hlp_DeltaR >= 0.0 && hlp_DeltaR < 0.1) sum_EtInRing00To01 += hlp_Et;
429 if(hlp_DeltaR >= 0.1 && hlp_DeltaR < 0.2) sum_EtInRing01To02 += hlp_Et;
430 if(hlp_DeltaR >= 0.2 && hlp_DeltaR < 0.3) sum_EtInRing02To03 += hlp_Et;
431 if(hlp_DeltaR >= 0.3 && hlp_DeltaR < 0.4) sum_EtInRing03To04 += hlp_Et;
432 if(hlp_DeltaR >= 0.4 && hlp_DeltaR < 0.5) sum_EtInRing04To05 += hlp_Et;
435 if(hlp_DeltaR >= 0.0 && hlp_DeltaR < 0.1) num_ConstsIn00To01++;
436 if(hlp_DeltaR >= 0.1 && hlp_DeltaR < 0.2) num_ConstsIn01To02++;
437 if(hlp_DeltaR >= 0.2 && hlp_DeltaR < 0.3) num_ConstsIn02To03++;
438 if(hlp_DeltaR >= 0.3 && hlp_DeltaR < 0.4) num_ConstsIn03To04++;
440 if(hlp_DeltaR > max_DeltaR) max_DeltaR = hlp_DeltaR;
450 std::string prefixVARType =
"";
454 if( num_EFOs == 0 ) {
455 return StatusCode::SUCCESS;
459 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ConstsIn00To01", num_ConstsIn00To01);
460 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ConstsIn01To02", num_ConstsIn01To02);
461 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ConstsIn02To03", num_ConstsIn02To03);
462 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ConstsIn03To04", num_ConstsIn03To04);
468 double value_sumBDT_BDTSort = 0;
469 for(
unsigned int iTypeConst=0; iTypeConst<n_Constituents_Type; iTypeConst++) {
471 double value_BDT = list_TypeConstituents_SortBDT[iTypeConst]->getBDTValue();
472 if( std::isnan(value_BDT) || std::isinf(value_BDT) )
continue;
476 double mvaCorrection = 0.0;
477 double etaCurConst = list_TypeConstituents_SortBDT[iTypeConst]->p4().Eta();
483 value_BDT = value_BDT - mvaCorrection;
486 value_sumBDT_BDTSort += value_BDT;
488 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_BDTValues_BDTSort_" + iConst, value_BDT);
489 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_BDTValuesSum_BDTSort_" + iConst, value_sumBDT_BDTSort);
493 double value_sumBDT_EtSort = 0;
494 for(
unsigned int iTypeConst=0; iTypeConst<n_Constituents_Type; iTypeConst++) {
496 double value_BDT = list_TypeConstituents[iTypeConst]->getBDTValue();
497 if( std::isnan(value_BDT) || std::isinf(value_BDT) )
continue;
499 value_sumBDT_EtSort += value_BDT;
501 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_BDTValues_EtSort_" + iConst, value_BDT);
502 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_BDTValuesSum_EtSort_" + iConst, value_sumBDT_EtSort);
511 TLorentzVector totalTLV_SumShots = TLorentzVector(0., 0., 0., 0.);
512 unsigned int totalPhotonsInSeed = 0;
513 unsigned int totalShotsInSeed = 0;
514 double maxDeltaRSumShotToConst = -999;
515 double minDeltaRSumShotToConst = 999;
516 double maxDeltaRSumShotToTau = -999;
517 double minDeltaRSumShotToTau = 999;
519 std::vector<TLorentzVector> allShotTLVs = std::vector<TLorentzVector>(0);
521 for(
unsigned int iConst=0; iConst<list_TypeConstituents_SortBDT.size(); iConst++) {
524 TLorentzVector tlv_CurConst = curConst->
p4();
525 std::vector<PanTau::TauConstituent*> shotConstituents = curConst->
getShots();
526 unsigned int nShots = shotConstituents.size();
528 unsigned int totalPhotonsInNeutral = 0;
529 TLorentzVector tlv_SumShots = TLorentzVector(0., 0., 0., 0.);
531 for(
unsigned int iShot=0; iShot<nShots; iShot++) {
534 tlv_SumShots += curShot->
p4();
535 allShotTLVs.push_back(curShot->
p4());
537 totalShotsInSeed += nShots;
538 totalTLV_SumShots += tlv_SumShots;
539 totalPhotonsInSeed += totalPhotonsInNeutral;
543 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_nPhotons_BDTSort_" + iConstStr, totalPhotonsInNeutral);
544 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_nShots_BDTSort_" + iConstStr, nShots);
547 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_SumShots_Et_BDTSort_" + iConstStr, tlv_SumShots.Et());
548 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_SumShots_Eta_BDTSort_" + iConstStr, tlv_SumShots.Eta());
549 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_SumShots_Phi_BDTSort_" + iConstStr, tlv_SumShots.Phi());
550 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_SumShots_M_BDTSort_" + iConstStr, tlv_SumShots.M());
553 double deltaRSumShotToConst = tlv_CurConst.DeltaR(tlv_SumShots);
554 if(deltaRSumShotToConst > maxDeltaRSumShotToConst) maxDeltaRSumShotToConst = deltaRSumShotToConst;
555 if(deltaRSumShotToConst < minDeltaRSumShotToConst) minDeltaRSumShotToConst = deltaRSumShotToConst;
556 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ConstDeltaRToSumShots_BDTSort_" + iConstStr, deltaRSumShotToConst);
557 if(tlv_CurConst.Et() > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtSumShotsOverConstEt_BDTSort_" + iConstStr, tlv_SumShots.Et() / tlv_CurConst.Et());
560 double deltaRSumShotToTau = tlv_Reference.DeltaR(tlv_SumShots);
561 if(deltaRSumShotToTau > maxDeltaRSumShotToTau) maxDeltaRSumShotToTau = deltaRSumShotToTau;
562 if(deltaRSumShotToTau < minDeltaRSumShotToTau) minDeltaRSumShotToTau = deltaRSumShotToTau;
563 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_TauDeltaRToSumShots_BDTSort_" + iConstStr, deltaRSumShotToTau);
564 if(tlv_Reference.Et() > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtSumShotsOverTauEt_BDTSort_" + iConstStr, tlv_SumShots.Et() / tlv_Reference.Et());
569 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MaxDeltaRSumShotToConst", maxDeltaRSumShotToConst);
570 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MinDeltaRSumShotToConst", minDeltaRSumShotToConst);
571 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MaxDeltaRSumShotToTau", maxDeltaRSumShotToTau);
572 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MinDeltaRSumShotToTau", minDeltaRSumShotToTau);
573 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_DeltaRAllShotsToTau", tlv_Reference.DeltaR(totalTLV_SumShots));
576 if(tlv_Reference.Et() > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtAllShotsOverEtTau", totalTLV_SumShots.Et() / tlv_Reference.Et());
579 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_NShotsInSeed", totalShotsInSeed);
580 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_NPhotonsInSeed", totalPhotonsInSeed);
583 double maxDiShotMass = -200;
584 double minDiShotMass = 99999;
585 double bestDiShotMass = -200;
586 double bestPi0Diff = 99999;
587 for(
unsigned int iShot=0; iShot<allShotTLVs.size(); iShot++) {
588 TLorentzVector cur_iShot = allShotTLVs.at(iShot);
590 for(
unsigned int jShot=iShot+1; jShot<allShotTLVs.size(); jShot++) {
591 TLorentzVector cur_jShot = allShotTLVs.at(jShot);
593 ATH_MSG_DEBUG(
"\t\tBuilding di-shot mass of shots " << iShot <<
" & " << jShot);
594 TLorentzVector tlv_DiShot = cur_iShot + cur_jShot;
595 double curDiShotMass = tlv_DiShot.M();
596 double curpi0Diff = std::abs(curDiShotMass - 134.98);
598 if(curpi0Diff < bestPi0Diff) bestDiShotMass = curDiShotMass;
599 if(curDiShotMass > maxDiShotMass) maxDiShotMass = curDiShotMass;
600 if(curDiShotMass < minDiShotMass) minDiShotMass = curDiShotMass;
604 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_BestDiShotMass", bestDiShotMass);
605 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MaxDiShotMass", maxDiShotMass);
606 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MinDiShotMass", minDiShotMass);
614 if(curTypeName != curTypeName_All)
addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtOver", sum_Et, variants_SeedEt);
616 if(tlv_1st_Et.Pt() != 0)
addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stEtOver", tlv_1st_Et.Et(), variants_SeedEt);
617 if(tlv_1st_BDT.Pt() != 0)
addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stBDTEtOver", tlv_1st_BDT.Et(), variants_SeedEt);
619 if(tlv_Last_Et.Pt() != 0)
addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_SoftestEtOver", tlv_Last_Et.Et(), variants_SeedEt);
621 if(tlv_1st_Et.Pt() != 0 && sum_Et > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stEtOverTypeEt", tlv_1st_Et.Et() / sum_Et);
622 if(tlv_1st_BDT.Pt() != 0 && sum_Et > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stBDTEtOverTypeEt", tlv_1st_BDT.Et() / sum_Et);
624 if(n_Constituents_All != 0 && curTypeName != curTypeName_All) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EFOsOverTotalEFOs", (
double)(((
double)num_EFOs) / ((
double)n_Constituents_All)));
625 if(tlv_1st_Et.Pt() != 0 && tlv_2nd_Et.Pt() != 0) {
626 if(tlv_1st_Et.Et() > 0. && tlv_2nd_Et.Et() > 0. ) {
627 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log1stEtOver2ndEt", std::log10(tlv_1st_Et.Et() / tlv_2nd_Et.Et()));
630 if(tlv_1st_Et.Pt() != 0 && tlv_3rd_Et.Pt() != 0) {
631 if(tlv_1st_Et.Et() > 0. && tlv_3rd_Et.Et() > 0.) {
632 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log1stEtOver3rdEt", std::log10(tlv_1st_Et.Et() / tlv_3rd_Et.Et()));
635 if(tlv_2nd_Et.Pt() != 0 && tlv_3rd_Et.Pt() != 0) {
636 if(tlv_2nd_Et.Et() > 0. && tlv_3rd_Et.Et() > 0.) {
637 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log2ndEtOver3rdEt", std::log10(tlv_2nd_Et.Et() / tlv_3rd_Et.Et()));
642 if(tlv_1st_BDT.Pt() != 0 && tlv_2nd_BDT.Pt() != 0) {
643 if(tlv_1st_BDT.Et() > 0. && tlv_2nd_BDT.Et() > 0. ) {
644 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log1stEtOver2ndEt_BDTSort", std::log10(tlv_1st_BDT.Et() / tlv_2nd_BDT.Et()));
647 if(tlv_1st_BDT.Pt() != 0 && tlv_3rd_BDT.Pt() != 0) {
648 if(tlv_1st_BDT.Et() > 0. && tlv_3rd_BDT.Et() > 0.) {
649 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log1stEtOver3rdEt_BDTSort", std::log10(tlv_1st_BDT.Et() / tlv_3rd_BDT.Et()));
652 if(tlv_2nd_BDT.Pt() != 0 && tlv_3rd_BDT.Pt() != 0) {
653 if(tlv_2nd_BDT.Et() > 0. && tlv_3rd_BDT.Et() > 0.) {
654 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Log2ndEtOver3rdEt_BDTSort", std::log10(tlv_2nd_BDT.Et() / tlv_3rd_BDT.Et()));
660 if(curTypeName == curTypeName_All) {
663 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_00To01", sum_EtInRing00To01);
664 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_01To02", sum_EtInRing01To02);
665 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_02To03", sum_EtInRing02To03);
666 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_03To04", sum_EtInRing03To04);
667 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_04To05", sum_EtInRing04To05);
672 if(curTypeName == curTypeName_All) {
675 double iso_EtIn01 = sum_EtInRing00To01;
676 double iso_EtIn02 = iso_EtIn01 + sum_EtInRing01To02;
677 double iso_EtIn03 = iso_EtIn02 + sum_EtInRing02To03;
678 double iso_EtIn04 = iso_EtIn03 + sum_EtInRing03To04;
680 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn01Over", iso_EtIn01, variants_SeedEt);
681 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn02Over", iso_EtIn02, variants_SeedEt);
682 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn03Over", iso_EtIn03, variants_SeedEt);
683 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn04Over", iso_EtIn04, variants_SeedEt);
685 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn00To02Over", (sum_EtInRing00To01 + sum_EtInRing01To02), variants_SeedEt);
686 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn02To04Over", (sum_EtInRing02To03 + sum_EtInRing03To04), variants_SeedEt);
688 if(iso_EtIn02>0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn01OverEtIn02", iso_EtIn01 / iso_EtIn02);
689 if(iso_EtIn04>0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtIn01OverEtIn04", iso_EtIn01 / iso_EtIn04);
697 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Et_Wrt", (sum_Et / num_EFOs), variants_SeedEt);
698 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_DRToJetAxis_Wrt", (sum_DRToReference / num_EFOs), variants_SeedEt);
699 addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_DRToLeading_Wrt", (sum_DRToLeading / num_EFOs), variants_SeedEt);
711 if(stddev_E > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_E", stddev_E);
712 if(stddev_Et > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Et", stddev_Et);
713 if(stddev_Et > 0.)
addFeatureWrtSeedEnergy(tauFeatureMap, inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Et_Wrt", stddev_Et, variants_SeedEt);
714 if(stddev_DRToJetAxis > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_DRToJetAxis", stddev_DRToJetAxis);
715 if(stddev_DRToLeading > 0.) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_DRToLeading", stddev_DRToLeading);
725 if(curTypeName != curTypeName_All) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ToJetAxis", tlv_Reference.Angle(tlv_TypeConstituents.Vect()));
726 if(tlv_1st_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stToJetAxis", tlv_Reference.Angle(tlv_1st_Et.Vect()));
727 if(tlv_2nd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndToJetAxis", tlv_Reference.Angle(tlv_2nd_Et.Vect()));
728 if(tlv_3rd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_3rdToJetAxis", tlv_Reference.Angle(tlv_3rd_Et.Vect()));
729 if(tlv_1st_Et.Pt() != 0) {
730 if(tlv_2nd_Et.Pt() != 0) {
731 angle_12 = tlv_1st_Et.Angle(tlv_2nd_Et.Vect());
732 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo2nd", angle_12);
734 if(tlv_3rd_Et.Pt() != 0) {
735 angle_13 = tlv_1st_Et.Angle(tlv_3rd_Et.Vect());
736 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo3rd", angle_13);
739 if(tlv_2nd_Et.Pt() != 0 && tlv_3rd_Et.Pt() != 0) {
740 angle_23 = tlv_2nd_Et.Angle(tlv_3rd_Et.Vect());
741 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndTo3rd", angle_23);
743 if(num_EFOs > 2 && tlv_1st_Et.Pt() != 0 && tlv_2nd_Et.Pt() != 0 && tlv_3rd_Et.Pt() != 0) {
744 double angle_Planes = ( tlv_1st_Et.Vect().Cross(tlv_2nd_Et.Vect()) ).
Angle( tlv_1st_Et.Vect().Cross(tlv_3rd_Et.Vect()) );
745 double angle_max = 0;
746 if(angle_12 > angle_13) {
747 if(angle_12 > angle_23) angle_max = angle_12;
748 else angle_max =angle_23;
750 if(angle_13 > angle_23) angle_max =angle_13;
751 else angle_max =angle_23;
753 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MaxToJetAxis", angle_max);
754 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MeanValue123", (angle_12 + angle_13 + angle_23)/3.);
755 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_Btw1213Planes", angle_Planes);
763 if(curTypeName != curTypeName_All) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_ToJetAxis", tlv_Reference.DeltaR(tlv_TypeConstituents));
764 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_MaxToJetAxis_EtSort", max_DeltaR);
765 if(tlv_1st_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stToJetAxis_EtSort", tlv_Reference.DeltaR(tlv_1st_Et));
766 if(tlv_2nd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndToJetAxis_EtSort", tlv_Reference.DeltaR(tlv_2nd_Et));
767 if(tlv_3rd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_3rdToJetAxis_EtSort", tlv_Reference.DeltaR(tlv_3rd_Et));
768 if(tlv_1st_Et.Pt() != 0) {
769 if(tlv_2nd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo2nd_EtSort", tlv_1st_Et.DeltaR(tlv_2nd_Et));
770 if(tlv_3rd_Et.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo3rd_EtSort", tlv_1st_Et.DeltaR(tlv_3rd_Et));
772 if(tlv_2nd_Et.Pt() != 0 && tlv_3rd_Et.Pt() != 0) {
773 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndTo3rd_EtSort", tlv_2nd_Et.DeltaR(tlv_3rd_Et));
776 if(tlv_1st_BDT.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stToJetAxis_BDTSort", tlv_Reference.DeltaR(tlv_1st_BDT));
777 if(tlv_2nd_BDT.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndToJetAxis_BDTSort", tlv_Reference.DeltaR(tlv_2nd_BDT));
778 if(tlv_3rd_BDT.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_3rdToJetAxis_BDTSort", tlv_Reference.DeltaR(tlv_3rd_BDT));
779 if(tlv_1st_BDT.Pt() != 0) {
780 if(tlv_2nd_BDT.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo2nd_BDTSort", tlv_1st_BDT.DeltaR(tlv_2nd_BDT));
781 if(tlv_3rd_BDT.Pt() != 0) tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_1stTo3rd_BDTSort", tlv_1st_BDT.DeltaR(tlv_3rd_BDT));
783 if(tlv_2nd_BDT.Pt() != 0 && tlv_3rd_BDT.Pt() != 0) {
784 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_2ndTo3rd_BDTSort", tlv_2nd_BDT.DeltaR(tlv_3rd_BDT));
796 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtDR", sum_EtxDR / sum_Et);
797 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtDRprime", sum_EtxDRprime / sum_Et);
798 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtDR2", sum_EtxDR2 / sum_Et);
799 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtAngle", sum_EtxAngle / sum_Et);
800 tauFeatureMap->
addFeature(inputAlgName +
"_" + curTypeName +
"_" + prefixVARType +
"_EtDRxTotalEt", (sum_EtxDR / sum_Et) * variants_SeedEt.at(
"EtAllConsts"));
803 return StatusCode::SUCCESS;