ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
tauRecTools::TauDecayModeNNVariable Class Reference

A closely related class that calculates the input variables. More...

#include <TauDecayModeNNClassifier.h>

Collaboration diagram for tauRecTools::TauDecayModeNNVariable:

Public Member Functions

 TauDecayModeNNVariable ()=delete
 
template<typename T >
pfoAttr (const PFOPtr pfo, const PFOAttributes &attr)
 

Static Public Member Functions

static float deltaPhi (const TLorentzVector &p4, const TLorentzVector &p4_tau)
 
static float deltaEta (const TLorentzVector &p4, const TLorentzVector &p4_tau)
 
static float deltaPhiECal (const TLorentzVector &p4, const std::pair< float, bool > &tau_phiTrkECal)
 
static float deltaEtaECal (const TLorentzVector &p4, const std::pair< float, bool > &tau_etaTrkECal)
 
template<typename T >
static T pfoAttr (const xAOD::PFO *pfo, const xAOD::PFODetails::PFOAttributes &attr)
 retrieve the PFO attributes More...
 
static float ptSubRatio (const xAOD::PFO *pfo)
 
static float energyFracEM2 (const xAOD::PFO *pfo, float energy_em2)
 

Static Public Attributes

static const std::size_t nClasses = 5
 
static const std::set< std::string > sCommonP4Vars
 
static const std::set< std::string > sTrackIPVars
 
static const std::set< std::string > sNeutralPFOVars
 
static const std::array< std::string, nClassessModeNames
 

Detailed Description

A closely related class that calculates the input variables.

Definition at line 74 of file TauDecayModeNNClassifier.h.

Constructor & Destructor Documentation

◆ TauDecayModeNNVariable()

tauRecTools::TauDecayModeNNVariable::TauDecayModeNNVariable ( )
delete

Member Function Documentation

◆ deltaEta()

float tauRecTools::TauDecayModeNNVariable::deltaEta ( const TLorentzVector &  p4,
const TLorentzVector &  p4_tau 
)
static

Definition at line 361 of file TauDecayModeNNClassifier.cxx.

362  {
363  return p4.Eta() - p4_tau.Eta();
364  }

◆ deltaEtaECal()

float tauRecTools::TauDecayModeNNVariable::deltaEtaECal ( const TLorentzVector &  p4,
const std::pair< float, bool > &  tau_etaTrkECal 
)
static

Definition at line 372 of file TauDecayModeNNClassifier.cxx.

373  {
374  // if not retrieved, then set to 0. (mean value)
375  return tau_etaTrkECal.second ? p4.Eta() - tau_etaTrkECal.first : 0.0f;
376  }

◆ deltaPhi()

float tauRecTools::TauDecayModeNNVariable::deltaPhi ( const TLorentzVector &  p4,
const TLorentzVector &  p4_tau 
)
static

Definition at line 356 of file TauDecayModeNNClassifier.cxx.

357  {
358  return p4_tau.DeltaPhi(p4);
359  }

◆ deltaPhiECal()

float tauRecTools::TauDecayModeNNVariable::deltaPhiECal ( const TLorentzVector &  p4,
const std::pair< float, bool > &  tau_phiTrkECal 
)
static

Definition at line 366 of file TauDecayModeNNClassifier.cxx.

367  {
368  // if not retrieved, then set to 0. (mean value)
369  return tau_phiTrkECal.second ? TVector2::Phi_mpi_pi(p4.Phi() - tau_phiTrkECal.first) : 0.0f;
370  }

◆ energyFracEM2()

float tauRecTools::TauDecayModeNNVariable::energyFracEM2 ( const xAOD::PFO pfo,
float  energy_em2 
)
static

Definition at line 395 of file TauDecayModeNNClassifier.cxx.

396  {
397  float clus0e = pfo->cluster(0)->e();
398  return clus0e > 0.0f ? energy_em2 / clus0e : 0.0f;
399  }

◆ pfoAttr() [1/2]

template<typename T >
T tauRecTools::TauDecayModeNNVariable::pfoAttr ( const PFOPtr  pfo,
const PFOAttributes attr 
)

Definition at line 379 of file TauDecayModeNNClassifier.cxx.

380  {
381  T val{static_cast<T>(0)};
382  if (!pfo->attribute(attr, val))
383  {
384  throw std::runtime_error("Can not retrieve PFO attribute! enum = " + std::to_string(static_cast<unsigned>(attr)));
385  }
386  return val;
387  }

◆ pfoAttr() [2/2]

template<typename T >
static T tauRecTools::TauDecayModeNNVariable::pfoAttr ( const xAOD::PFO pfo,
const xAOD::PFODetails::PFOAttributes attr 
)
static

retrieve the PFO attributes

Parameters
pfoa pointer to PFO object
attran attribute object
Exceptions
std::runtime_errorif the attribute cannot be retrieved

the template type must match the type of the attribute

◆ ptSubRatio()

float tauRecTools::TauDecayModeNNVariable::ptSubRatio ( const xAOD::PFO pfo)
static

Definition at line 389 of file TauDecayModeNNClassifier.cxx.

390  {
391  float clus0pt = pfo->cluster(0)->pt();
392  return clus0pt > 0.0f ? (clus0pt - pfo->pt()) / clus0pt : 0.0f;
393  }

Member Data Documentation

◆ nClasses

const std::size_t tauRecTools::TauDecayModeNNVariable::nClasses = 5
static

Definition at line 78 of file TauDecayModeNNClassifier.h.

◆ sCommonP4Vars

const std::set< std::string > tauRecTools::TauDecayModeNNVariable::sCommonP4Vars
static
Initial value:
= {
"dphiECal", "detaECal", "dphi", "deta", "pt_log", "jetpt_log"}

Definition at line 79 of file TauDecayModeNNClassifier.h.

◆ sModeNames

const std::array< std::string, TauDecayModeNNVariable::nClasses > tauRecTools::TauDecayModeNNVariable::sModeNames
static
Initial value:
= {
"1p0n", "1p1n", "1pXn", "3p0n", "3pXn"}

Definition at line 82 of file TauDecayModeNNClassifier.h.

◆ sNeutralPFOVars

const std::set< std::string > tauRecTools::TauDecayModeNNVariable::sNeutralPFOVars
static
Initial value:
= {
"FIRST_ETA", "SECOND_R_log", "DELTA_THETA", "CENTER_LAMBDA_log", "LONGITUDINAL", "ENG_FRAC_CORE",
"SECOND_ENG_DENS_log", "NPosECells_EM1", "NPosECells_EM2", "energy_EM1", "energy_EM2", "EM1CoreFrac",
"firstEtaWRTClusterPosition_EM1", "firstEtaWRTClusterPosition_EM2",
"secondEtaWRTClusterPosition_EM1_log", "secondEtaWRTClusterPosition_EM2_log"}

Definition at line 81 of file TauDecayModeNNClassifier.h.

◆ sTrackIPVars

const std::set< std::string > tauRecTools::TauDecayModeNNVariable::sTrackIPVars
static
Initial value:
= {
"d0TJVA", "d0SigTJVA", "z0sinthetaTJVA", "z0sinthetaSigTJVA"}

Definition at line 80 of file TauDecayModeNNClassifier.h.


The documentation for this class was generated from the following files:
xAOD::PFO_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: PFO_v1.cxx:52
xAOD::PFO_v1::attribute
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:7
hist_file_dump.f
f
Definition: hist_file_dump.py:135
xAOD::CaloCluster_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle (negative for negative-energy clusters)
Definition: CaloCluster_v1.cxx:247
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
xAOD::PFO_v1::cluster
const CaloCluster * cluster(unsigned int index) const
Retrieve a const pointer to a CaloCluster.
Definition: PFO_v1.cxx:669
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35