Skip to content
Snippets Groups Projects
Commit e8cefb5a authored by Antonio De Maria's avatar Antonio De Maria Committed by Vakhtang Tsulaia
Browse files

Remove KineUtils set of functions in tauRecTools

Remove KineUtils set of functions in tauRecTools
parent 93eb3e2f
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
......@@ -14,9 +14,6 @@
#include "fastjet/PseudoJet.hh"
#include "tauRecTools/KineUtils.h"
CellFinder::CellFinder(const std::string& type,
const std::string& name,
const IInterface * parent) :
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "DiTauRec/DiTauTrackFinder.h"
......@@ -13,7 +13,6 @@
#include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
#include "tauRecTools/TrackSort.h"
#include "tauRecTools/KineUtils.h"
#include "StoreGate/ReadHandle.h"
#include "fastjet/PseudoJet.hh"
......
......@@ -10,8 +10,6 @@
#include "xAODEgamma/ElectronContainer.h"
#include "xAODMuon/MuonContainer.h"
#include "tauRecTools/KineUtils.h"
#include "StoreGate/ReadHandle.h"
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "DiTauRec/IDVarCalculator.h"
......@@ -7,8 +7,6 @@
#include "DiTauRec/DiTauCandidateData.h"
#include "fastjet/PseudoJet.hh"
#include "tauRecTools/KineUtils.h"
IDVarCalculator::IDVarCalculator(const std::string& type,
const std::string& name,
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
//-----------------------------------------------------------------------------
......@@ -11,7 +11,6 @@
// This class calculates tau variables after core seed reconstruction
//-----------------------------------------------------------------------------
#include "tauRecTools/TauCommonCalcVars.h"
#include "tauRecTools/KineUtils.h"
#include <vector>
//-----------------------------------------------------------------------------
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef XAOD_ANALYSIS
#include "TauCellVariables.h"
#include "tauRecTools/KineUtils.h"
#include "tauRecTools/HelperFunctions.h"
#include "xAODTau/TauJet.h"
......@@ -45,8 +44,7 @@ StatusCode TauCellVariables::execute(xAOD::TauJet& pTau) const {
TLorentzVector tauAxis = tauRecTools::getTauAxis(pTau, m_doVertexCorrection);
// loop over cells in all the clusters and calculate the variables
std::vector<xAOD::CaloVertexedTopoCluster> vertexedClusterList = pTau.vertexedClusters();
for (const xAOD::CaloVertexedTopoCluster& vertexedCluster : vertexedClusterList){
for (const xAOD::CaloVertexedTopoCluster& vertexedCluster : pTau.vertexedClusters()){
const xAOD::CaloCluster& cluster = vertexedCluster.clust();
const CaloClusterCellLink* cellLinks = cluster.getCellLinks();
if (cellLinks == nullptr) {
......@@ -79,15 +77,18 @@ StatusCode TauCellVariables::execute(xAOD::TauJet& pTau) const {
cellEnergy = vxCell.energy();
}
double dR = Tau1P3PKineUtils::deltaR(tauAxis.Eta(), tauAxis.Phi(), cellEta, cellPhi);
CaloSampling::CaloSample calo = cell->caloDDE()->getSampling();
TLorentzVector temp_cc_p4;
temp_cc_p4.SetPtEtaPhiE(cellET, cellEta, cellPhi, cellEnergy);
double dR = tauAxis.DeltaR(temp_cc_p4);
if (dR < m_cellCone) {
sumCellET += cellET;
if (dR < 0.1) sumCellET01 += cellET;
if (dR > 0.1 && dR < 0.2) sumCellET12 += cellET;
CaloSampling::CaloSample calo = cell->caloDDE()->getSampling();
// EM layer: PreSamplerB, PreSamplerE, EMB1, EME1, EMB2, EME2
// Most energy of neutral particles are deposited in the first two EM laywers
// The third layer is regarded as HAD layber
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef XAOD_ANALYSIS
#include "TauElectronVetoVariables.h"
#include "tauRecTools/KineUtils.h"
#include "xAODTau/TauJet.h"
#include "CaloUtils/CaloVertexedCell.h"
......@@ -19,6 +18,8 @@
#include <unordered_map>
#include <array>
#include "TVector2.h"
using Gaudi::Units::GeV;
......@@ -187,7 +188,7 @@ StatusCode TauElectronVetoVariables::execute(xAOD::TauJet& pTau) const {
int i = 2;
if (sampling < 4) i = sampling;
if (sampling == 12 || sampling == 13 || sampling == 14) i = 3;
detPhiTrk = Tau1P3PKineUtils::deltaPhi( cellPhi, extrapolatedPhi[i] );
detPhiTrk = TVector2::Phi_mpi_pi(cellPhi-extrapolatedPhi[i]);
detEtaTrk = std::abs( cellEta - extrapolatedEta[i] );
clEtaTrk = extrapolatedEta[i];
distEtaTrk = cellEta - extrapolatedEta[i];
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TAURECTOOLS_KINEUTILS_H
#define TAURECTOOLS_KINEUTILS_H
#include <string>
#include "TVector2.h"
//!
//! @class Tau1P3PKineUtils
//! @brief Provides methods for simple kinematical calculations
//!
//! Provides methods for simple kinematical calculations: absolute value
//! of difference in pseudorapidity, in phi position, half-opening angle
//! in ( eta, phi ) space
//!
class Tau1P3PKineUtils
{
public:
//!
//! Calculates absolute value for difference in eta position
//!
//! @param x eta position of object 1
//! @param y eta position of object 2
//!
static double deltaEta(double eta1, double eta2) { return std::abs(eta1 - eta2); }
//!
//! Calculates absolute value for difference in phi position,
//! corrected for 2pi symmetry
//!
//! @param x phi position of object 1
//! @param y phi position of object 2
//!
static double deltaPhi(double phi1, double phi2)
{
return TVector2::Phi_mpi_pi(phi1-phi2);
}
//!
//! Calculates half-opening angle in (eta,phi) space
//!
//! @param x detphi of two objects
//! @param y deteta of two objects
//!
static double deltaR(double de,double dp) { return std::sqrt(de*de+dp*dp); }
static double deltaR(double eta1, double phi1, double eta2, double phi2) {
return std::sqrt(deltaEta(eta1,eta2)*deltaEta(eta1,eta2)+deltaPhi(phi1,phi2)*deltaPhi(phi1,phi2));
}
};
#endif // TAURECTOOLS_KINEUTILS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment