diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterAbbreviated.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterAbbreviated.cxx index 0d85547549739cfadf31f297c38bdc7c3e909c29..9776db58acea81aea14c82c85994ecfb73775f88 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterAbbreviated.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterAbbreviated.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // ClusterAbbreviated.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterNoSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterNoSort.cxx index 34f6085a8ddfa4b29b71368f5af8424e61d0929e..d2b3241b6b4c037746eeb99b30396c36da0069e8 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterNoSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterNoSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // ClusterNoSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSelect.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSelect.cxx index 619535b3320e78c3dce5348aac8711c24ac578ba..5945adb170f5104ac7bd345adf4bacafce724f18 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSelect.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSelect.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // ClusterSelect.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSort.cxx index f9992a961247f983a1068f026d4e63d8840198e1..2861daff18c7854cca4e0ec9cc5d30ae34b4b2ef 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // ClusterSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSortingAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSortingAlg.cxx index 969be0fa953aa85f21f3d0006b69ff7865188cd1..ee3e2ed38a8ba0cae40ea002630e3eef8ff05bd1 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSortingAlg.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ClusterSortingAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // ClusterSortingAlg.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx index df377622a24cfb153c46ccf2569ab04821225988..b13c14b24743b921070f2c20ded8b0951cd128b4 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaEtaIncl1.cpp @@ -16,12 +16,10 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/DeltaEtaIncl1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaEtaIncl1) @@ -124,7 +122,7 @@ TCS::DeltaEtaIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> if( parType_t((*tob2)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1[i],p_MinET2[i]))) continue; // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 ); std::stringstream msgss; msgss << "Combination : " << distance( input[0]->begin(), tob1) << " x " << distance( input[0]->begin(), tob2) @@ -178,7 +176,7 @@ TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input, if( parType_t((*tob2)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut if( (parType_t((*tob1)->Et()) <= std::max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= std::max(p_MinET1[i],p_MinET2[i]))) continue; // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 ); std::stringstream msgss; msgss << "Combination : " << distance( input[0]->begin(), tob1) << " x " << distance( input[0]->begin(), tob2) diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx index 4ec3f32b1c81807c53a03658ad637175df38bb18..4838f0693e4c5d015c4f8b51acd918dad1901980 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaEtaIncl2.cpp @@ -16,12 +16,10 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/DeltaEtaIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaEtaIncl2) @@ -115,7 +113,7 @@ TCS::DeltaEtaIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaEtaMin, DeltaEtaMax - unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut @@ -158,7 +156,7 @@ TCS::DeltaEtaIncl2::process( const std::vector<TCS::TOBArray const *> & input, tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaEtaMin, DeltaEtaMax - unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx index f367d26cd34daa9d8c0267661e420c880135816d..959b10635205fa275a822cfa652b6fdfefa96b68 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaEtaPhiIncl1.cpp @@ -12,13 +12,10 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaEtaPhiIncl1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaEtaPhiIncl1) @@ -114,9 +111,9 @@ TCS::DeltaEtaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 ); // // to-do change message output std::stringstream msgss; @@ -168,9 +165,9 @@ TCS::DeltaEtaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < p_NumberLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 ); // // to-do change message output std::stringstream msgss; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx index acb8953eb78b77337251d92816d308858eef6086..f0dbc75a2bc8ad310b2a635b9cbfce3a64d55ac5 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaPhiIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaEtaPhiIncl2.cpp @@ -11,13 +11,10 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaEtaPhiIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaEtaPhiIncl2) @@ -114,9 +111,9 @@ TCS::DeltaEtaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const tob2 != input[1]->end() && distance( input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 ); // // to-do change message output std::stringstream msgss; @@ -167,9 +164,9 @@ TCS::DeltaEtaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input tob2 != input[1]->end() && distance( input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 ); // // to-do change message output std::stringstream msgss; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx index 115e4b6df41e71447de63ad34f06b3e34c6f14b8..993182c087b897b4ee6a96809431e05cf5a4bc79 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaPhiIncl1.cpp @@ -12,12 +12,10 @@ **********************************/ #include <cmath> -#include "TH1F.h" #include "L1TopoAlgorithms/DeltaPhiIncl1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaPhiIncl1) @@ -103,7 +101,7 @@ TCS::DeltaPhiIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < nLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); std::stringstream msgss; msgss << " phi1=" << (*tob1)->phi() << " , phi2=" << (*tob2)->phi() << ", DeltaPhi = " << deltaPhi << " -> "; @@ -154,7 +152,7 @@ TCS::DeltaPhiIncl1::process( const std::vector<TCS::TOBArray const *> & input, tob2 != input[0]->end() && distance( input[0]->begin(), tob2) < nLeading2; ++tob2) { // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); std::stringstream msgss; msgss << " Combination : " << distance( input[0]->begin(), tob1) << " x " << distance( input[0]->begin(), tob2) diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx index cd782796a491acbbccf5485b79e8c0be3f17de4f..cc5c111a01145866ac8817037ce26ef673419ef0 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaPhiIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaPhiIncl2.cpp @@ -16,12 +16,10 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/DeltaPhiIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaPhiIncl2) @@ -101,7 +99,7 @@ TCS::DeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut @@ -146,7 +144,7 @@ TCS::DeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input, tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx index ce755cd5a87346800587811c945afa1cde9cba88..163adf00e552bf3d700539963e3237910dde8c33 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaRApproxBoxCutIncl1.cpp @@ -12,8 +12,6 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaRApproxBoxCutIncl1.h" #include "L1TopoCommon/Exception.h" @@ -21,24 +19,6 @@ REGISTER_ALG_TCS(DeltaRApproxBoxCutIncl1) -namespace { - unsigned int - calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - - return round( 10 * dphi ); - } - - unsigned int - calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = std::abs( tob1->eta() - tob2->eta() ); - return deta; - } -} - - TCS::DeltaRApproxBoxCutIncl1::DeltaRApproxBoxCutIncl1(const std::string & name) : DecisionAlg(name) { defineParameter("InputWidth", 3); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx index a9ee935a7fa3e8ce8257199da60ba0bd3d83c191..ae79e57d695ad99a23ec701b5d57f5fb10f777e3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRApproxBoxCutIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaRApproxBoxCutIncl2.cpp @@ -11,8 +11,6 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaRApproxBoxCutIncl2.h" #include "L1TopoCommon/Exception.h" @@ -20,25 +18,6 @@ REGISTER_ALG_TCS(DeltaRApproxBoxCutIncl2) - -namespace { - unsigned int - calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - - return round( 10 * dphi ); - } - - unsigned int - calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = std::abs( tob1->eta() - tob2->eta() ); - return deta; - } -} - - TCS::DeltaRApproxBoxCutIncl2::DeltaRApproxBoxCutIncl2(const std::string & name) : DecisionAlg(name) { defineParameter("InputWidth1", 5); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx index 693ed0743733b8fb67dfdef2cd8bc3f075eaa3fa..f21a7a69ea9b3eebd8627a66fa1dd03396134bea 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DeltaRSqrIncl1.cpp @@ -11,13 +11,10 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaRSqrIncl1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaRSqrIncl1) @@ -111,7 +108,7 @@ TCS::DeltaRSqrIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *> // OneBarrel if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue; // DeltaR2 cuts - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i]; @@ -157,7 +154,7 @@ TCS::DeltaRSqrIncl1::process( const std::vector<TCS::TOBArray const *> & input, // OneBarrel if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue; // DeltaR2 cuts - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; accept = deltaR2 >= p_DeltaRMin[i] && deltaR2 <= p_DeltaRMax[i]; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx index e6213716dbb11b7461a33b21affe4cee7518e38d..f81203196f5b71fef98225ba6c186287187f3778 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaRSqrIncl2.cxx @@ -11,13 +11,10 @@ **********************************/ #include <cmath> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/DeltaRSqrIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DeltaRSqrIncl2) @@ -105,7 +102,7 @@ TCS::DeltaRSqrIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", deltaR2 = " << deltaR2); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; @@ -152,7 +149,7 @@ TCS::DeltaRSqrIncl2::process( const std::vector<TCS::TOBArray const *> & input, tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", deltaR2 = " << deltaR2); for(unsigned int i=0; i<numberOutputBits(); ++i) { diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx index 5e19282c2005c9992004c66d31c19788f46a4326..b8ac8058638ecae092a392434dfb60f5ae9b6dc9 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationDRIncl2.cpp @@ -16,7 +16,6 @@ #include "L1TopoAlgorithms/DisambiguationDRIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DisambiguationDRIncl2) @@ -102,7 +101,7 @@ TCS::DisambiguationDRIncl2::processBitCorrect( const std::vector<TCS::TOBArray c tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2Cut = calcDeltaR2BW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut @@ -151,7 +150,7 @@ TCS::DisambiguationDRIncl2::process( const std::vector<TCS::TOBArray const *> & tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2Cut = calcDeltaR2( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx index 66281666584f14f9e9ce4a0fa8d25533805e17a2..1e7ac1203e838b6b0bbe4467515f1a7474d11692 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDRIncl3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationDRIncl3.cpp @@ -16,7 +16,6 @@ #include "L1TopoAlgorithms/DisambiguationDRIncl3.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DisambiguationDRIncl3) @@ -116,13 +115,13 @@ TCS::DisambiguationDRIncl3::processBitCorrect( const std::vector<TCS::TOBArray c // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2Cut = calcDeltaR2BW( *tob1, *tob2 ); for( TCS::TOBArray::const_iterator tob3 = input[2]->begin(); tob3 != input[2]->end() ; ++tob3) { - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut @@ -170,13 +169,13 @@ TCS::DisambiguationDRIncl3::process( const std::vector<TCS::TOBArray const *> & // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2Cut = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2Cut = calcDeltaR2( *tob1, *tob2 ); for( TCS::TOBArray::const_iterator tob3 = input[2]->begin(); tob3 != input[2]->end() ; ++tob3) { - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx index d16a33b25cbe145d45822d0b27ce898b2846e866..0f4a7979d9e45e97d24e593343f9ed56400989a8 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationDetaDPhiIncl3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationDetaDPhiIncl3.cpp @@ -16,7 +16,6 @@ #include "L1TopoAlgorithms/DisambiguationDetaDPhiIncl3.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DisambiguationDetaDPhiIncl3) @@ -140,9 +139,9 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEtaBW( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEtaBW( *tob1, *tob2 ); if(deltaPhi > p_DeltaPhiMax || deltaEta > p_DeltaEtaMax) continue; if (deltaEta < p_DeltaEtaMin && deltaPhi < p_DeltaPhiMin ) continue; @@ -153,8 +152,8 @@ TCS::DisambiguationDetaDPhiIncl3::processBitCorrect( const std::vector<TCS::TOBA if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut if( parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut if( parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; accept = deltaR13 > p_DisambDR[i] && deltaR23 > p_DisambDR[i] ; @@ -202,9 +201,9 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const if( parType_t(std::abs((*tob2)->eta())) < p_EtaMin2 ) continue; // Eta cut // DeltaPhi cuts - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); // DeltaEta cuts - unsigned int deltaEta = TSU::Kinematics::calcDeltaEta( *tob1, *tob2 ); + unsigned int deltaEta = calcDeltaEta( *tob1, *tob2 ); if(deltaPhi > p_DeltaPhiMax || deltaEta > p_DeltaEtaMax) continue; if (deltaEta < p_DeltaEtaMin && deltaPhi < p_DeltaPhiMin ) continue; @@ -215,8 +214,8 @@ TCS::DisambiguationDetaDPhiIncl3::process( const std::vector<TCS::TOBArray const if( parType_t((*tob3)->Et()) <= p_MinET3) continue; // ET cut if( parType_t(std::abs((*tob3)->eta())) > p_EtaMax3 ) continue; // Eta cut if( parType_t(std::abs((*tob3)->eta())) < p_EtaMin3 ) continue; // Eta cut - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; accept = deltaR13 > p_DisambDR[i] && deltaR23 > p_DisambDR[i] ; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx index 66e7e66fa8fa8ce04bbf73840bf78876bf861729..a1fec9d708f880e652512c067570914444d28a33 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationIncl2.cpp @@ -15,7 +15,6 @@ #include "L1TopoAlgorithms/DisambiguationIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DisambiguationIncl2) @@ -95,7 +94,7 @@ TCS::DisambiguationIncl2::processBitCorrect( const std::vector<TCS::TOBArray con // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; @@ -141,7 +140,7 @@ TCS::DisambiguationIncl2::process( const std::vector<TCS::TOBArray const *> & in // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx index 871f282dc9116b45a693d2d60dc16e6032480f03..453c91cd068f7a48e11943b723fbdc0470c442e7 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationIncl3.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationIncl3.cpp @@ -15,7 +15,6 @@ #include "L1TopoAlgorithms/DisambiguationIncl3.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(DisambiguationIncl3) @@ -115,8 +114,8 @@ TCS::DisambiguationIncl3::processBitCorrect( const std::vector<TCS::TOBArray con ++tob3) { - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2BW( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2BW( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2BW( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; @@ -180,8 +179,8 @@ TCS::DisambiguationIncl3::process( const std::vector<TCS::TOBArray const *> & in ++tob3) { - unsigned int deltaR13 = TSU::Kinematics::calcDeltaR2( *tob1, *tob3 ); - unsigned int deltaR23 = TSU::Kinematics::calcDeltaR2( *tob2, *tob3 ); + unsigned int deltaR13 = calcDeltaR2( *tob1, *tob3 ); + unsigned int deltaR23 = calcDeltaR2( *tob2, *tob3 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationInvmIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationInvmIncl2.cxx index 3b575685bb66f839ffffdd8732b31311e4dbb4b8..519a52a086c7b34e774da1278ba532eb8edc5f98 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationInvmIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DisambiguationInvmIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * DisambiguationInvmIncl2.cpp @@ -17,10 +17,6 @@ #include "L1TopoAlgorithms/DisambiguationInvmIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" REGISTER_ALG_TCS(DisambiguationInvmIncl2) @@ -28,48 +24,6 @@ REGISTER_ALG_TCS(DisambiguationInvmIncl2) // not the best solution but we will move to athena where this comes for free #define LOG std::cout << "TCS::DisambiguationInvmIncl2: " -namespace { -unsigned int -calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = fabs( tob1->etaDouble() - tob2->etaDouble() ); - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - double cosheta = cosh (deta); - double cosphi = cos (dphi); - double invmass2 = 2*tob1->Et()*tob2->Et()*(cosheta - cosphi); - return round( invmass2 ); -} - -unsigned int -calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(abs(tob1->eta() - tob2->eta()))); - auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs(tob1->phi() - tob2->phi()))); - TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); - TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); - auto bit_invmass2 = 2*bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi); - return int(bit_invmass2) ; -} - -unsigned int -calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = ( tob1->etaDouble() - tob2->etaDouble() ); - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ; -} - -unsigned int -calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - int detaB = abs( tob1->eta() - tob2->eta() ); - int dphiB = abs( tob1->phi() - tob2->phi() ); - if(dphiB>32) - dphiB = 64 - dphiB; - unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB; - return bit_dr2; -} -} // namespace TCS::DisambiguationInvmIncl2::DisambiguationInvmIncl2(const std::string & name) : DecisionAlg(name) { diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EMMultiplicity.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EMMultiplicity.cxx index 46c70b5829479c4a5d7c80c542788309fbceb8b8..2f979b78422371f96a220e070f67c006ed4be101 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EMMultiplicity.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EMMultiplicity.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * EMMultiplicity.cpp @@ -22,9 +22,6 @@ #include "L1TopoEvent/ClusterTOBArray.h" #include "L1TopoEvent/GenericTOB.h" -#include "TH1F.h" -#include "TH2F.h" - REGISTER_ALG_TCS(EMMultiplicity) using namespace std; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx index 58bdcd3528db6df131f9aad13bfdd51cdab03de9..5726ac50b599a541466002ee6e967ba910fb7143 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtCut.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * LAr.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx index 16653c8f83ef7dcda721a1ae43be844c3ea625db..b92fdafab4155cb194de7e46fa75168c171b1d17 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/EtaPhiWindow.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ @@ -11,9 +11,7 @@ #include <cmath> #include <iterator> -// -#include "TH1F.h" -#include "TH2F.h" + REGISTER_ALG_TCS(EtaPhiWindow) diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx index 7d55c20175d636af6acae66fd4cb9c732ee61784..f58d5d7486e51948e8117bbdb9c882b231bdf71b 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/ExclusiveJets.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * ExclusiveJets.cxx @@ -16,17 +16,11 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" -#include "TH2F.h" + #include "L1TopoAlgorithms/ExclusiveJets.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// + REGISTER_ALG_TCS(ExclusiveJets) TCS::ExclusiveJets::ExclusiveJets(const std::string & name) : DecisionAlg(name) diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericArrayCreator.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericArrayCreator.cxx index e85d9285970e18e34c44d7f4841b042ef92339aa..b30e53e7be9a7efc66a9af6c9553419b198c8a70 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericArrayCreator.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericArrayCreator.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration #include "L1TopoAlgorithms/GenericArrayCreator.h" #include "L1TopoEvent/ClusterTOBArray.h" diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericListGenerator.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericListGenerator.cxx index ee4a9466b7d3b6a69ef8c5ffcb1df39d70b3f829..97f5929798c9af70dcdfa46e46f929f6f467e5b9 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericListGenerator.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/GenericListGenerator.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // GenericListGenerator.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx index f0583b2801a15f014379471b86d0637132f5b500..eac8d99e9f5f57d132c7e96fe920992990ac4b96 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * InvariantMassDeltaPhiInclusive2.cxx @@ -14,14 +14,6 @@ #include "L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// -#include "TH1F.h" -#include "TH2F.h" #include <cmath> @@ -156,9 +148,9 @@ TCS::InvariantMassDeltaPhiInclusive2::processBitCorrect( const std::vector<TCS:: tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); @@ -214,9 +206,9 @@ TCS::InvariantMassDeltaPhiInclusive2::process( const std::vector<TCS::TOBArray c tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx index b8ad6e87a01e6ec3f8e578e3012c4facf54c63ca..35b77e2ac321f9a4de3add904d48d41aa7e2c2cb 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassDeltaPhiInclusive2Charge.cxx @@ -14,14 +14,6 @@ #include "L1TopoAlgorithms/InvariantMassDeltaPhiInclusive2Charge.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// -#include "TH1F.h" -#include "TH2F.h" #include <cmath> @@ -164,9 +156,9 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::processBitCorrect( const std::vector tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); @@ -239,9 +231,9 @@ TCS::InvariantMassDeltaPhiInclusive2Charge::process( const std::vector<TCS::TOBA tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx index 1ebdf15ae715b357cf6c3e41b08e5ce5319a54c6..9c8389f2d947818683d33ef14d3abc7fe09884a1 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * InvariantMassInclusive1.cpp @@ -15,18 +15,11 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/InvariantMassInclusive1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// REGISTER_ALG_TCS(InvariantMassInclusive1) @@ -142,7 +135,7 @@ TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; if( parType_t((*tob1)->Et()) <= std::min(p_MinET1[i],p_MinET2[i])) continue; // ET cut @@ -199,7 +192,7 @@ TCS::InvariantMassInclusive1::process( const std::vector<TCS::TOBArray const *> // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); for(unsigned int i=0; i<numberOutputBits(); ++i) { diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx index 9291d1cb3a3b49b6d1093ee624e8c91a18364ed3..142fb8381b9df9698e504b4ad47d44ba73dccd55 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * InvariantMassInclusive2.cpp @@ -14,14 +14,6 @@ #include "L1TopoAlgorithms/InvariantMassInclusive2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// -#include "TH1F.h" -#include "TH2F.h" #include <cmath> #include <iostream> @@ -146,7 +138,7 @@ TCS::InvariantMassInclusive2::processBitCorrect( const std::vector<TCS::TOBArray tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); @@ -202,7 +194,7 @@ TCS::InvariantMassInclusive2::process( const std::vector<TCS::TOBArray const *> tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); const unsigned int aeta1 = std::abs(eta1); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx index df634f59ae701b056a35a429c7669636b11ca7c4..c35649c0e548261e17d8f07146335ee74938bd18 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * Based on InvariantMassInclusive1 and DeltaRSqrIncl1. 01/03/2019. @@ -16,19 +16,11 @@ #include <string> #include <sstream> #include <vector> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// REGISTER_ALG_TCS(InvariantMassInclusiveDeltaRSqrIncl1) @@ -156,9 +148,9 @@ TCS::InvariantMassInclusiveDeltaRSqrIncl1::processBitCorrect( const std::vector< if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2); for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; @@ -215,9 +207,9 @@ TCS::InvariantMassInclusiveDeltaRSqrIncl1::process( const std::vector<TCS::TOBAr if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2); for(unsigned int i=0; i<numberOutputBits(); ++i) { diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx index f7cf29606e5509d3f0d59d64585a0cb485fb57a9..90e68448154165baf78b8a88711f9ff37e747020 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusiveDeltaRSqrIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * Based on InvariantMassInclusive2 and DeltaRSqrIncl2. 01/03/2019. @@ -16,14 +16,6 @@ #include "L1TopoAlgorithms/InvariantMassInclusiveDeltaRSqrIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// -#include "TH1F.h" -#include "TH2F.h" #include <cmath> @@ -159,9 +151,9 @@ TCS::InvariantMassInclusiveDeltaRSqrIncl2::processBitCorrect( const std::vector< tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMassBW( *tob1, *tob2 ); // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2BW( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2BW( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); @@ -216,9 +208,9 @@ TCS::InvariantMassInclusiveDeltaRSqrIncl2::process( const std::vector<TCS::TOBAr tob2 != input[1]->end() && distance(input[1]->begin(), tob2) < p_NumberLeading2; ++tob2) { // Inv Mass calculation - unsigned int invmass2 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); + unsigned int invmass2 = calcInvMass( *tob1, *tob2 ); // test DeltaR2Min, DeltaR2Max - unsigned int deltaR2 = TSU::Kinematics::calcDeltaR2( *tob1, *tob2 ); + unsigned int deltaR2 = calcDeltaR2( *tob1, *tob2 ); TRG_MSG_DEBUG("Jet1 = " << **tob1 << ", Jet2 = " << **tob2 << ", invmass2 = " << invmass2 << ", deltaR2 = " << deltaR2); const int eta1 = (*tob1)->eta(); const int eta2 = (*tob2)->eta(); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsIncl.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsIncl.cxx index 2803a8db97cc01fa6530ccf949438b26e1d946c6..5c748f18000dc434ee83bc276f9d9b2b03b9ce15 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsIncl.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsIncl.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * InvariantMassThreeTOBsIncl.cxx @@ -23,19 +23,10 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/InvariantMassThreeTOBsIncl.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" - -// REGISTER_ALG_TCS(InvariantMassThreeTOBsIncl) @@ -140,9 +131,9 @@ TCS::InvariantMassThreeTOBsIncl::processBitCorrect( const std::vector<TCS::TOBAr if (p_OneBarrel && parType_t(abs((*tob1)->eta())) > 10 && parType_t(abs((*tob2)->eta())) > 10 && parType_t(abs((*tob3)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2_12 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); - unsigned int invmass2_13 = TSU::Kinematics::calcInvMassBW( *tob1, *tob3 ); - unsigned int invmass2_23 = TSU::Kinematics::calcInvMassBW( *tob2, *tob3 ); + unsigned int invmass2_12 = calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2_13 = calcInvMassBW( *tob1, *tob3 ); + unsigned int invmass2_23 = calcInvMassBW( *tob2, *tob3 ); unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23; for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; @@ -212,9 +203,9 @@ TCS::InvariantMassThreeTOBsIncl::process( const std::vector<TCS::TOBArray const // Inv Mass calculation - unsigned int invmass2_12 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); - unsigned int invmass2_13 = TSU::Kinematics::calcInvMass( *tob1, *tob3 ); - unsigned int invmass2_23 = TSU::Kinematics::calcInvMass( *tob2, *tob3 ); + unsigned int invmass2_12 = calcInvMass( *tob1, *tob2 ); + unsigned int invmass2_13 = calcInvMass( *tob1, *tob3 ); + unsigned int invmass2_23 = calcInvMass( *tob2, *tob3 ); unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23; for(unsigned int i=0; i<numberOutputBits(); ++i) { bool accept = false; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx index 9b122c72a91787a80da8dad435bd9f695ccb5901..b624925f6f08bd6e47a91d81333f8c81a6b90d87 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassThreeTOBsInclCharge.cxx @@ -21,19 +21,11 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" -#include "TH2F.h" #include "L1TopoAlgorithms/InvariantMassThreeTOBsInclCharge.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" -// REGISTER_ALG_TCS(InvariantMassThreeTOBsInclCharge) @@ -150,9 +142,9 @@ TCS::InvariantMassThreeTOBsInclCharge::processBitCorrect( const std::vector<TCS: if (p_OneBarrel && static_cast<parType_t>(std::abs((*tob1)->eta())) > 10 && static_cast<parType_t>(std::abs((*tob2)->eta())) > 10 && static_cast<parType_t>(std::abs((*tob3)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2_12 = TSU::Kinematics::calcInvMassBW( *tob1, *tob2 ); - unsigned int invmass2_13 = TSU::Kinematics::calcInvMassBW( *tob1, *tob3 ); - unsigned int invmass2_23 = TSU::Kinematics::calcInvMassBW( *tob2, *tob3 ); + unsigned int invmass2_12 = calcInvMassBW( *tob1, *tob2 ); + unsigned int invmass2_13 = calcInvMassBW( *tob1, *tob3 ); + unsigned int invmass2_23 = calcInvMassBW( *tob2, *tob3 ); unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23; // Muon sector and charge std::string sector1 = (*tob1)->sectorName(); @@ -240,9 +232,9 @@ TCS::InvariantMassThreeTOBsInclCharge::process( const std::vector<TCS::TOBArray if (p_OneBarrel && static_cast<parType_t>(std::abs((*tob1)->eta())) > 10 && static_cast<parType_t>(std::abs((*tob2)->eta())) > 10 && static_cast<parType_t>(std::abs((*tob3)->eta())) > 10 ) continue; // Inv Mass calculation - unsigned int invmass2_12 = TSU::Kinematics::calcInvMass( *tob1, *tob2 ); - unsigned int invmass2_13 = TSU::Kinematics::calcInvMass( *tob1, *tob3 ); - unsigned int invmass2_23 = TSU::Kinematics::calcInvMass( *tob2, *tob3 ); + unsigned int invmass2_12 = calcInvMass( *tob1, *tob2 ); + unsigned int invmass2_13 = calcInvMass( *tob1, *tob3 ); + unsigned int invmass2_23 = calcInvMass( *tob2, *tob3 ); unsigned int invmass2 = invmass2_12 + invmass2_13 + invmass2_23; // Muon sector and charge std::string sector1 = (*tob1)->sectorName(); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetAbbreviated.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetAbbreviated.cxx index 487ce46ed3fd94881ee342e2301a1e52c76b6de0..3aaf48cd0508a1a3a80c937a5f351dc242bb1871 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetAbbreviated.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetAbbreviated.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetAbbreviated.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx index 9f75ca7a417fed57785f552552d8bf4068f953c8..c3bf92a968a5ef6a2107bde522953cec91da5049 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * JetHT.cpp @@ -15,7 +15,6 @@ #include <iostream> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/JetHT.h" #include "L1TopoCommon/Exception.h" diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx index 6cf7999707f8d6be4191e8cf302e12b7848e7cdf..01f73aa920f7ca5101129943d8fcaa611843b15f 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * JetMatch.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSort.cxx index 0477925c8d4f0e4fd67783d3eab10f863e58e468..8b33f252afa5090e67651fe411ccce62b39be6da 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetNoSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSortMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSortMatch.cxx index 36e58e05ab68c12b4c87f823a1f185bc0ce605c6..bd180c2fcb0789d29e33e453adab2d7babd2c108 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSortMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetNoSortMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetNoSortMatch.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSelect.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSelect.cxx index af05f78acc3d89e903991e51b39786098e5bcc84..2a5d858359968bb262e9d2e257da38204baab5e2 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSelect.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSelect.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetSelect.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSort.cxx index d942e91e25fc1b5578524f1dd34c0042d84cf9e0..0c521f188f3b73e1ca47e877016279a294266058 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlg.cxx index 030df94201e9da709964be3050fdfff05c5b609a..5559ffd3d4bcf943cab407720217facdebf1ee2c 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlg.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetSortingAlg.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize1.cxx index 1f4208df7ee5e465ddc25983ed8ad86da270f15b..6c05dc9c1c869c68792281664a1c6bcd76d122a4 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetSortingAlgSize1.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize2.cxx index c3d39e19ea8971317fd65f55afa6186de1ea45c5..d471599a8dbeb5367bf4672018f31411ba50ad75 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetSortingAlgSize2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // JetSortingAlgSize1.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/KalmanMETCorrection.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/KalmanMETCorrection.cxx index ec70506c4d6336be195212a6cf07564ee2685fc5..8e45d09f06f0922ab49e4bfd05d9a55f17e92511 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/KalmanMETCorrection.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/KalmanMETCorrection.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * KalmanMETCorrection.cpp @@ -106,6 +106,7 @@ TCS::KalmanMETCorrection::processBitCorrect( const std::vector<TCS::TOBArray con corrfactor = LUTobj.getcorrKF(ipt,jeta); + // This part of the code has to be reviewed again for phase1 BW simulation auto cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(/*abs*/(parType_t((*tob)->phi())))); auto sinphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Sin.at(/*abs*/(parType_t((*tob)->phi())))); @@ -114,7 +115,7 @@ TCS::KalmanMETCorrection::processBitCorrect( const std::vector<TCS::TOBArray con TRG_MSG_DEBUG("corr " << corrfactor); - TRG_MSG_DEBUG("metsumx " << summetx << "metsumy " << summety ); + TRG_MSG_DEBUG("metsumx " << summetx << "metsumy " << summety ); corrfactor = 0; } diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx index 2b9908f1355cc5b9aa0180cb2f449088d7890e8f..05576c3109f83a7ee38aa6e2fbc76cdc3cfb8f51 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/LAr.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * LAr.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METCut.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METCut.cxx index e9638d1eafa6ce73ddc05cad746d063a75ed5e62..7f02ed10c512b7a7096828d413ca2a79823b1df3 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METCut.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METCut.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * METCut.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METNoSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METNoSort.cxx index a48f1a22a3c59b111c255cb09d1fd47abb140cf2..0b61035cbd69097b043cbee06f4ea792aa9808a5 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METNoSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METNoSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // METNoSort.cxx // author: Joerg Stelzer diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METSortingAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METSortingAlg.cxx index 4ef04d26f40504819b12bddb49c0bcc6517dc65c..03d5d3a4e26a360448f970e80f8b3892e980297f 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METSortingAlg.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/METSortingAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // file: METSortingAlg.cxx // author: Joerg Stelzer diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx index 7edecf894d731e1f3793c741d86b6b95ed32e179..b1cf1c6774eed18ccd30569860815e17360f0079 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MetSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MetSort.cxx // author: Joerg Stelzer @@ -14,10 +14,7 @@ #include <cmath> // Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" #include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" using std::sqrt; using std::round; @@ -51,7 +48,7 @@ TCS::MetSort::sortBitCorrect(const InputTOBArray & input, TOBArray & output) { } const MetTOBArray & mets = dynamic_cast<const MetTOBArray&>(input); - int missingET = TSU::Kinematics::quadraticSumBW(mets[0].Ex(), mets[0].Ey()); + int missingET = quadraticSumBW(mets[0].Ex(), mets[0].Ey()); int metphi = TSU::Trigo::atan2(mets[0].Ex(),mets[0].Ey()); TRG_MSG_DEBUG("MET phi values " << metphi << " " ); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx index 9844bfbf9d4187c6f2b8e794b24e1ffac03da6ea..ff0c0d5ffd5121a27d398d44df47df31fbff1e92 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * MinDeltaPhiIncl2.cpp @@ -16,13 +16,10 @@ #include <sstream> #include <vector> #include <algorithm> -#include "TH1F.h" - #include "L1TopoAlgorithms/MinDeltaPhiIncl2.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -#include "L1TopoSimulationUtils/Kinematics.h" REGISTER_ALG_TCS(MinDeltaPhiIncl2) @@ -111,7 +108,7 @@ TCS::MinDeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhiBW( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhiBW( *tob1, *tob2 ); if (firstphi) { mindphi = deltaPhi; @@ -183,7 +180,7 @@ TCS::MinDeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input if( parType_t((*tob2)->Et()) <= p_MinET2) continue; // ET cut // test DeltaPhiMin, DeltaPhiMax - unsigned int deltaPhi = TSU::Kinematics::calcDeltaPhi( *tob1, *tob2 ); + unsigned int deltaPhi = calcDeltaPhi( *tob1, *tob2 ); if (firstphi) { mindphi = deltaPhi; diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Multiplicity.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Multiplicity.cxx index 56f0d5e9ffd26fb1b7bc6f93699e5b3b33e96620..2f358f415f34efa3d6517ad64e13000b5c7026b9 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Multiplicity.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Multiplicity.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * Multiplicity.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx index 93f57b9b3ead36dfb90fd74a7d60a1536b2f881c..d3d33591977a8409b8a94d7545a2cf10afa272c9 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MultiplicityCustom.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * MultiplicityCustom.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonAbbreviated.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonAbbreviated.cxx index 3cf02404ff6960283c4ba267539c113515353abd..23798948e361edf2dcc439bf87f54f88d0b9c099 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonAbbreviated.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonAbbreviated.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MuonAbbreviated.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonNoSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonNoSort.cxx index db978d54abc99e62ee3b0ba3e7a6bd8d48169e2c..2eb9a33e18b6c54473ece871d91049257adf6143 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonNoSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonNoSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MuonNoSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSelect.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSelect.cxx index d12949bed15b7e6dcd8f03f26036a4fd1b2e9ea5..e024086e5493f531b3c4931fdd03312b4623b7f9 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSelect.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSelect.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MuonSelect.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort.cxx index 010ae7a049840e0f485b81609dae480ae680b5f4..1e7d589676d4c33eaa6e2a515358d80d26dbbb3e 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MuonSort.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort_1BC.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort_1BC.cxx index a1f6321b4dce3b1a4de722bd7323a934cd66fa76..95da70716ce272c379bc6803f74013adbfc52312 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort_1BC.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MuonSort_1BC.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // MuonSort_1BC.cxx // TopoCore diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx index caf98facaf53372f3c4b714bce06b48b3f10209f..a73b9688dc32c05ec80916582dbd9cdb3645926d 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/NotMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * NotMatch.cpp @@ -23,36 +23,6 @@ REGISTER_ALG_TCS(NotMatch) #define LOG cout << "TCS::NotMatch: " - - -namespace { - unsigned int - calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = ( tob1->etaDouble() - tob2->etaDouble() ); - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - - return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ; - - } - - unsigned int - calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - - int detaB = abs( tob1->eta() - tob2->eta() ); - int dphiB = abs( tob1->phi() - tob2->phi() ); - if(dphiB>32) - dphiB = 64 - dphiB; - - unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB; - return bit_dr2; - - } - -} - - TCS::NotMatch::NotMatch(const std::string & name) : DecisionAlg(name) { defineParameter("InputWidth1", 9); diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx index 5a9dfcad8ebfe28ea3afbed2774f4036880933f1..f2ed99d93b832158150c9a1febbad62073222c25 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * Ratio.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx index 200156b1e2a6003b1481c40df31565f266474179..3248c9cdf818a7ad378b4a1292b7ef67848f88bf 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/Ratio2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * Ratio2.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioMatch.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioMatch.cxx index 90e8ae3ed8e4c18d3c91638cb51310b2643334be..dc1b44e8a52770c85189c11c735ecc54893e0920 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioMatch.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioMatch.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * RatioMatch.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx index 0900ad4a3a772a24d6bf91be559bb3716b6235c7..e9dd27e552bbcd681ee42645d11556816e319390 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/RatioSum.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * RatioSum.cpp diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx index 2be36ed6ca8a64687c87a3a825e94cf2cb05df18..c88f85a4233a7ad6a8090ada5f3149226241628a 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * SimpleCone.cpp @@ -15,7 +15,6 @@ #include <sstream> #include <vector> #include <algorithm> -#include "TH1F.h" #include "L1TopoAlgorithms/SimpleCone.h" #include "L1TopoCommon/Exception.h" diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx index 13194780a8abcf8c62ed0b4482b7f670a50d0641..8141c4af192da215a8b44f7f0611f54af5f4e5a5 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/TransverseMassInclusive1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /********************************* * TransverseMassInclusive1.cpp @@ -14,16 +14,10 @@ #include <string> #include <sstream> #include <vector> -#include "TH1F.h" #include "L1TopoAlgorithms/TransverseMassInclusive1.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/Decision.h" -// Bitwise implementation utils -#include "L1TopoSimulationUtils/L1TopoDataTypes.h" -#include "L1TopoSimulationUtils/Trigo.h" -#include "L1TopoSimulationUtils/Hyperbolic.h" -#include "L1TopoSimulationUtils/Kinematics.h" // REGISTER_ALG_TCS(TransverseMassInclusive1) @@ -32,34 +26,6 @@ REGISTER_ALG_TCS(TransverseMassInclusive1) #define LOG std::cout << "TCS::TransverseMassInclusive1: " - - -namespace { - unsigned int - calcTMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; - - double cosphi = cos ( dphi); - double tmass2 = 2*tob1->Et()*tob2->Et()*(1 - cosphi); - return round( tmass2 ); - } - - unsigned int - calcTMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs(tob1->phi() - tob2->phi()))); - TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); - TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); - TSU::L1TopoDataTypes<22,0> bit_tmass2 = 2*bit_Et1*bit_Et2*(1. - bit_cosphi); - return int(bit_tmass2) ; - // end bitwise implementation - } - - -} - - TCS::TransverseMassInclusive1::TransverseMassInclusive1(const std::string & name) : DecisionAlg(name) { defineParameter("InputWidth", 3); diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/CMakeLists.txt b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/CMakeLists.txt index 44fb5537380335315419b5383f98855d4564b63a..8cb95ca3b40fc2690a1e1928ce941d5488c76a5b 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/CMakeLists.txt +++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/CMakeLists.txt @@ -12,4 +12,4 @@ atlas_add_library( L1TopoInterfaces PUBLIC_HEADERS L1TopoInterfaces INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} - LINK_LIBRARIES L1TopoCommon L1TopoEvent TrigConfBase TrigConfIO TrigConfData) + LINK_LIBRARIES L1TopoCommon L1TopoEvent L1TopoSimulationUtils TrigConfBase TrigConfIO TrigConfData) diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h index c87841a98fb332aafbf1855c443bd505fdfe81a0..b75511a152c544f03a6bf6587e3bff08483d816f 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h +++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/ConfigurableAlg.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // BaseTOBoAlg.h // TopoCore @@ -14,6 +14,7 @@ #include "L1TopoInterfaces/ParameterSpace.h" #include "L1TopoInterfaces/AlgFactory.h" #include "L1TopoCommon/StatusCode.h" +#include "L1TopoEvent/GenericTOB.h" #include <vector> #include <string> @@ -63,6 +64,20 @@ namespace TCS { bool isLegacyTopo() const { return m_isLegacyTopo; } + // Kinematic calculation + unsigned int calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcTMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned long quadraticSumBW(int i1, int i2); + unsigned int calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcTMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + unsigned int calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + + // const access to parameter const Parameter & parameter(const std::string & parameterName) const; diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx index 93a2cdf567db6ea784803e37fe7e29d99b33aeab..cec3de09caeb1257d7014d089fda421f42045f52 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/ConfigurableAlg.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // BaseTOBoAlg.cpp // TopoCore @@ -8,6 +8,11 @@ #include "L1TopoInterfaces/ConfigurableAlg.h" #include "L1TopoCommon/Exception.h" #include "L1TopoInterfaces/IL1TopoHistSvc.h" +// Bitwise implementation utils +#include "L1TopoSimulationUtils/L1TopoDataTypes.h" +#include "L1TopoSimulationUtils/Trigo.h" +#include "L1TopoSimulationUtils/Hyperbolic.h" +#include "L1TopoSimulationUtils/Kinematics.h" #include "TH1.h" #include "TH2.h" @@ -110,6 +115,77 @@ ConfigurableAlg::ConfigurableAlg(const std::string & name, AlgType algType) : ConfigurableAlg::~ConfigurableAlg() {} +// Kinematic Calculation +unsigned int +ConfigurableAlg::calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + if (m_isLegacyTopo) + {return TSU::Kinematics::calcDeltaPhiBWLegacy(tob1,tob2);} + else + {return TSU::Kinematics::calcDeltaPhiBW(tob1,tob2);} +} + +unsigned int +ConfigurableAlg::calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + if (m_isLegacyTopo) + {return TSU::Kinematics::calcDeltaEtaBWLegacy(tob1,tob2);} + else + {return TSU::Kinematics::calcDeltaEtaBW(tob1,tob2);} +} + +unsigned int +ConfigurableAlg::calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + if (m_isLegacyTopo) + {return TSU::Kinematics::calcInvMassBWLegacy(tob1,tob2);} + else + {return TSU::Kinematics::calcInvMassBW(tob1,tob2);} +} + +unsigned int +ConfigurableAlg::calcTMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + if (m_isLegacyTopo) + {return TSU::Kinematics::calcTMassBWLegacy(tob1,tob2);} + else + {return TSU::Kinematics::calcTMassBW(tob1,tob2);} +} + +unsigned int +ConfigurableAlg::calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + if (m_isLegacyTopo) + {return TSU::Kinematics::calcDeltaR2BWLegacy(tob1,tob2);} + else + {return TSU::Kinematics::calcDeltaR2BW(tob1,tob2);} +} + +unsigned long +ConfigurableAlg::quadraticSumBW(int i1, int i2) { + return TSU::Kinematics::quadraticSumBW(i1, i2); +} + +unsigned int +ConfigurableAlg::calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + return TSU::Kinematics::calcDeltaPhi(tob1,tob2); +} + +unsigned int +ConfigurableAlg::calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + return TSU::Kinematics::calcDeltaEta(tob1,tob2); +} + +unsigned int +ConfigurableAlg::calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + return TSU::Kinematics::calcInvMass(tob1,tob2); +} + +unsigned int +ConfigurableAlg::calcTMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + return TSU::Kinematics::calcTMass(tob1,tob2); +} + +unsigned int +ConfigurableAlg::calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + return TSU::Kinematics::calcDeltaR2(tob1,tob2); +} + // define parameters to be called by developer void diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProviderFEX.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProviderFEX.cxx index 61f543fd783640746aa5734d58779829859a866b..a281d2c1106addce9a977a756c50af56f10dd538 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProviderFEX.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProviderFEX.cxx @@ -56,13 +56,13 @@ EMTauInputProviderFEX::handle(const Incident& incident) { string histPath = "/EXPERT/" + name() + "/"; replace( histPath.begin(), histPath.end(), '.', '/'); - auto hEMEt = std::make_unique<TH1I>( "EMTOBEt", "EM TOB Et", 40, 0, 200); + auto hEMEt = std::make_unique<TH1I>( "EMTOBEt", "EM TOB Et", 400, 0, 400); hEMEt->SetXTitle("E_{T}"); auto hEMEtaPhi = std::make_unique<TH2I>( "EMTOBPhiEta", "EM TOB Location", 100, -50, 50, 64, 0, 64); hEMEtaPhi->SetXTitle("#eta"); hEMEtaPhi->SetYTitle("#phi"); - auto hTauEt = std::make_unique<TH1I>( "TauTOBEt", "Tau TOB Et", 40, 0, 200); + auto hTauEt = std::make_unique<TH1I>( "TauTOBEt", "Tau TOB Et", 400, 0, 400); hTauEt->SetXTitle("E_{T}"); auto hTauEtaPhi = std::make_unique<TH2I>( "TauTOBPhiEta", "Tau TOB Location", 100, -50, 50, 64, 0, 64); hTauEtaPhi->SetXTitle("#eta"); @@ -126,9 +126,10 @@ EMTauInputProviderFEX::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const int ieta = ConvertEta((int)eFexRoI->iEta()); int iphi = eFexRoI->iPhi(); + unsigned int iet = static_cast<unsigned int>(eFexRoI->et()/Gaudi::Units::GeV); //EM TOB - TCS::ClusterTOB cluster( static_cast<unsigned int>(eFexRoI->tobEt()/Gaudi::Units::GeV), static_cast<unsigned int>(0), ieta, iphi, TCS::CLUSTER , static_cast<long int>(eFexRoI->Word0()) ); + TCS::ClusterTOB cluster( iet, static_cast<unsigned int>(0), ieta, iphi, TCS::CLUSTER , static_cast<long int>(eFexRoI->Word0()) ); cluster.setEtaDouble( eFexRoI->eta() ); cluster.setPhiDouble( eFexRoI->phi() ); diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h index ab37fe682d056945eefae7426beca909b0e5f682..39d99a165fc7fdcd5402d95a30baa29b0f12a140 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/L1TopoSimulationUtils/Kinematics.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // Kinematics.h @@ -16,10 +16,17 @@ namespace TSU { struct Kinematics { + static unsigned int calcDeltaPhiBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + static unsigned int calcDeltaEtaBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + + static unsigned int calcInvMassBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + static unsigned int calcTMassBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + static unsigned int calcDeltaR2BWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + static unsigned int calcTMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); /** @brief compute the sum in quadrature of two ints @@ -38,6 +45,7 @@ namespace TSU { static unsigned int calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); + static unsigned int calcTMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); static unsigned int calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2); }; diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx index dc34eca3708dbf7149fe403174fe0e46f27ddf06..e9cf4ed6292ccb8bc26f2eeec61a5a3a4ea4cdf6 100644 --- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx +++ b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/Root/Kinematics.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include <cmath> @@ -14,118 +14,188 @@ #include "L1TopoSimulationUtils/Trigo.h" #include "L1TopoEvent/GenericTOB.h" -// -using namespace std; +unsigned int TSU::Kinematics::calcDeltaPhiBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2){ + int dphiB = std::abs( tob1->phi() - tob2->phi() ); + if(dphiB>64) + dphiB = dphiB - 64; + if(dphiB>32) + dphiB = 64 - dphiB; + + return dphiB ; +} + +unsigned int TSU::Kinematics::calcDeltaEtaBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + double deta = std::abs( tob1->eta() - tob2->eta() ); + return deta; +} + +unsigned int TSU::Kinematics::calcInvMassBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2){ + + auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(std::abs(tob1->eta() - tob2->eta()))); + //In case of EM objects / jets / taus the phi angle goes between 0 and 64 while muons are between -32 and 32, applying a shift to keep delta-phi in the allowed range. + int phi_tob1 = tob1->phi(); + int phi_tob2 = tob2->phi(); + //those cases should happen only in mixed EM/jets/tau plus mu triggers, if both phi's are in [0,2pi] will not get in + if ( std::abs(phi_tob1-phi_tob2)>=64 ) + { + if(phi_tob1 >= 32) phi_tob1 = phi_tob1-64; + if(phi_tob2 >= 32) phi_tob2 = phi_tob2-64; + } + auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(std::abs( phi_tob1 - phi_tob2 ))); + TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); + TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); + auto bit_invmass2 = bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi)*2; + return int(bit_invmass2) ; +} + +unsigned int TSU::Kinematics::calcTMassBWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(std::abs(tob1->phi() - tob2->phi()))); + TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); + TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); + TSU::L1TopoDataTypes<22,0> bit_tmass2 = 2*bit_Et1*bit_Et2*(1. - bit_cosphi); + return int(bit_tmass2) ; + // end bitwise implementation +} + +unsigned int TSU::Kinematics::calcDeltaR2BWLegacy(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + int detaB = std::abs( tob1->eta() - tob2->eta() ); + int dphiB = std::abs( tob1->phi() - tob2->phi() ); + if(dphiB>64) //Probably same error here as in DeltaPhiBW. Check + dphiB = dphiB - 64; + if(dphiB>32) + dphiB = 64 - dphiB; + + unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB; + return bit_dr2; +} unsigned int TSU::Kinematics::calcDeltaPhiBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2){ - int dphiB = abs( tob1->phi() - tob2->phi() ); - if(dphiB>64) - dphiB = dphiB - 64; - if(dphiB>32) - dphiB = 64 - dphiB; + int dphiB = std::abs( tob1->phi() - tob2->phi() ); + if(dphiB>64) + dphiB = dphiB - 64; + if(dphiB>32) + dphiB = 64 - dphiB; - return dphiB ; + return dphiB ; } unsigned int TSU::Kinematics::calcDeltaEtaBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = abs( tob1->eta() - tob2->eta() ); - return deta; + double deta = std::abs( tob1->eta() - tob2->eta() ); + return deta; } unsigned int TSU::Kinematics::calcInvMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2){ - auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(abs(tob1->eta() - tob2->eta()))); + auto bit_cosheta = TSU::L1TopoDataTypes<19,7>(TSU::Hyperbolic::Cosh.at(std::abs(tob1->eta() - tob2->eta()))); //In case of EM objects / jets / taus the phi angle goes between 0 and 64 while muons are between -32 and 32, applying a shift to keep delta-phi in the allowed range. int phi_tob1 = tob1->phi(); int phi_tob2 = tob2->phi(); //those cases should happen only in mixed EM/jets/tau plus mu triggers, if both phi's are in [0,2pi] will not get in - if ( abs(phi_tob1-phi_tob2)>=64 ) + if ( std::abs(phi_tob1-phi_tob2)>=64 ) { if(phi_tob1 >= 32) phi_tob1 = phi_tob1-64; if(phi_tob2 >= 32) phi_tob2 = phi_tob2-64; } - auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(abs( phi_tob1 - phi_tob2 ))); + auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(std::abs( phi_tob1 - phi_tob2 ))); TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); auto bit_invmass2 = bit_Et1*bit_Et2*(bit_cosheta - bit_cosphi)*2; return int(bit_invmass2) ; } -unsigned int TSU::Kinematics::calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - int detaB = abs( tob1->eta() - tob2->eta() ); - int dphiB = abs( tob1->phi() - tob2->phi() ); - if(dphiB>64) //Probably same error here as in DeltaPhiBW. Check - dphiB = dphiB - 64; - if(dphiB>32) - dphiB = 64 - dphiB; +unsigned int TSU::Kinematics::calcTMassBW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + auto bit_cosphi = TSU::L1TopoDataTypes<9,7>(TSU::Trigo::Cos.at(std::abs(tob1->phi() - tob2->phi()))); + TSU::L1TopoDataTypes<11,0> bit_Et1(tob1->Et()); + TSU::L1TopoDataTypes<11,0> bit_Et2(tob2->Et()); + TSU::L1TopoDataTypes<22,0> bit_tmass2 = 2*bit_Et1*bit_Et2*(1. - bit_cosphi); + return int(bit_tmass2) ; + // end bitwise implementation +} - unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB; - return bit_dr2; +unsigned int TSU::Kinematics::calcDeltaR2BW(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + int detaB = std::abs( tob1->eta() - tob2->eta() ); + int dphiB = std::abs( tob1->phi() - tob2->phi() ); + if(dphiB>64) //Probably same error here as in DeltaPhiBW. Check + dphiB = dphiB - 64; + if(dphiB>32) + dphiB = 64 - dphiB; + + unsigned int bit_dr2 = dphiB*dphiB + detaB*detaB; + return bit_dr2; } unsigned long TSU::Kinematics::quadraticSumBW(int i1, int i2){ - unsigned int ui1 = i1, ui2=i2; - unsigned int a = ui1*ui1 + ui2*ui2; + unsigned int ui1 = i1, ui2=i2; + unsigned int a = ui1*ui1 + ui2*ui2; - unsigned int result=0; - int left=0, right=0; - unsigned int r=0; - int sign=0; + unsigned int result=0; + int left=0, right=0; + unsigned int r=0; + int sign=0; - //The values for halflength and bitmask enforce the - //bitwise overflow limit, not the precision of the chosen C++ parameters - int halflength = 16; //max 16 - unsigned int bitmask = 0b11111111111111111111111111111111; //32 bits - bitmask >>= (32 - halflength*2); //does nothing unless halflength changes + //The values for halflength and bitmask enforce the + //bitwise overflow limit, not the precision of the chosen C++ parameters + int halflength = 16; //max 16 + unsigned int bitmask = 0b11111111111111111111111111111111; //32 bits + bitmask >>= (32 - halflength*2); //does nothing unless halflength changes - for(int i = 0; i < halflength; i++){ //16-->4 - right = 1 + (sign<<1) + (result<<2); - left = (r<<2) + (a >> (2*halflength-2)); - a <<= 2; - a = a & bitmask; - r = sign ? (left + right) : (left - right); - sign = ((r & (1 << (halflength+1) )) > 0) ? 1 : 0; - result <<= 1; - if(sign==0) result += 1; - } - return result; + for(int i = 0; i < halflength; i++){ //16-->4 + right = 1 + (sign<<1) + (result<<2); + left = (r<<2) + (a >> (2*halflength-2)); + a <<= 2; + a = a & bitmask; + r = sign ? (left + right) : (left - right); + sign = ((r & (1 << (halflength+1) )) > 0) ? 1 : 0; + result <<= 1; + if(sign==0) result += 1; + } + return result; } /*------------------------------------------ NON-BITWISE --------------------------------------------------*/ unsigned int TSU::Kinematics::calcDeltaPhi(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; + double dphi = std::fabs( tob1->phiDouble() - tob2->phiDouble() ); + if(dphi>M_PI) + dphi = 2*M_PI - dphi; - return round( 10 * dphi ); + return round( 10 * dphi ); } unsigned int TSU::Kinematics::calcDeltaEta(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = fabs( tob1->eta() - tob2->eta() ); - return deta; + double deta = std::fabs( tob1->eta() - tob2->eta() ); + return deta; } unsigned int TSU::Kinematics::calcInvMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = fabs( tob1->etaDouble() - tob2->etaDouble() ); - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; + double deta = std::fabs( tob1->etaDouble() - tob2->etaDouble() ); + double dphi = std::fabs( tob1->phiDouble() - tob2->phiDouble() ); + if(dphi>M_PI) + dphi = 2*M_PI - dphi; + + double cosheta = cosh ( deta); + double cosphi = cos ( dphi); + double invmass2 = 2*tob1->Et()*tob2->Et()*(cosheta - cosphi); + return round( invmass2 ); +} - double cosheta = cosh ( deta); - double cosphi = cos ( dphi); - double invmass2 = 2*tob1->Et()*tob2->Et()*(cosheta - cosphi); - return round( invmass2 ); +unsigned int TSU::Kinematics::calcTMass(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { + double dphi = std::fabs( tob1->phiDouble() - tob2->phiDouble() ); + if(dphi>M_PI) + dphi = 2*M_PI - dphi; + + double cosphi = cos ( dphi); + double tmass2 = 2*tob1->Et()*tob2->Et()*(1 - cosphi); + return round( tmass2 ); } unsigned int TSU::Kinematics::calcDeltaR2(const TCS::GenericTOB* tob1, const TCS::GenericTOB* tob2) { - double deta = ( tob1->etaDouble() - tob2->etaDouble() ); - double dphi = fabs( tob1->phiDouble() - tob2->phiDouble() ); - if(dphi>M_PI) - dphi = 2*M_PI - dphi; + double deta = ( tob1->etaDouble() - tob2->etaDouble() ); + double dphi = std::fabs( tob1->phiDouble() - tob2->phiDouble() ); + if(dphi>M_PI) + dphi = 2*M_PI - dphi; - return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ; + return round ( 100 * ((dphi)*(dphi) + (deta)*(deta) )) ; } -