Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Typedefs | Functions
tauRecTools Namespace Reference

Implementation of a TrackClassifier based on an RNN. More...

Classes

class  BDTHelper
 
class  TauDecayModeNNHelper
 A closely related class that provides helper functions. More...
 
class  TauDecayModeNNVariable
 A closely related class that calculates the input variables. More...
 
class  TauTrackRNNClassifier
 
class  TrackRNN
 

Typedefs

typedef std::map< std::string, double > ValueMap
 
typedef std::map< std::string, std::vector< double > > VectorMap
 
typedef std::map< std::string, ValueMapNodeMap
 
typedef std::map< std::string, VectorMapSeqNodeMap
 

Functions

const xAOD::VertexgetJetVertex (const xAOD::Jet &jet)
 Return the vertex of jet candidate. More...
 
TLorentzVector getTauAxis (const xAOD::TauJet &tau, bool doVertexCorrection=true)
 Return the four momentum of the tau axis The tau axis is widely used to select clusters and cells in tau reconstruction. More...
 
TLorentzVector GetConstituentP4 (const xAOD::JetConstituent &constituent)
 
bool doPi0andShots (const xAOD::TauJet &tau)
 Determines whether pi0s and shots should be built for a tau candidate. More...
 
xAOD::TauTrack::TrackFlagType isolateClassifiedBits (xAOD::TauTrack::TrackFlagType flag)
 
bool sortTracks (const ElementLink< xAOD::TauTrackContainer > &l1, const ElementLink< xAOD::TauTrackContainer > &l2)
 
std::unique_ptr< MVAUtils::BDTconfigureMVABDT (std::map< TString, float * > &availableVars, const TString &weightFile)
 
std::unique_ptr< MVAUtils::BDTconfigureMVABDT (std::vector< TString > &variableNames, const TString &weightFile)
 
std::vector< TString > parseString (const TString &str, const TString &delim=",")
 
std::vector< TString > parseStringMVAUtilsBDT (const TString &str, const TString &delim=",")
 

Detailed Description

Implementation of a TrackClassifier based on an RNN.

Author
Max Maerker

Typedef Documentation

◆ NodeMap

typedef std::map<std::string, ValueMap> tauRecTools::NodeMap

Definition at line 43 of file TauTrackRNNClassifier.h.

◆ SeqNodeMap

typedef std::map<std::string, VectorMap> tauRecTools::SeqNodeMap

Definition at line 44 of file TauTrackRNNClassifier.h.

◆ ValueMap

typedef std::map<std::string, double> tauRecTools::ValueMap

Definition at line 39 of file TauTrackRNNClassifier.h.

◆ VectorMap

typedef std::map<std::string, std::vector<double> > tauRecTools::VectorMap

Definition at line 41 of file TauTrackRNNClassifier.h.

Function Documentation

◆ configureMVABDT() [1/2]

std::unique_ptr<MVAUtils::BDT> tauRecTools::configureMVABDT ( std::map< TString, float * > &  availableVars,
const TString &  weightFile 
)

◆ configureMVABDT() [2/2]

std::unique_ptr<MVAUtils::BDT> tauRecTools::configureMVABDT ( std::vector< TString > &  variableNames,
const TString &  weightFile 
)

◆ doPi0andShots()

bool tauRecTools::doPi0andShots ( const xAOD::TauJet tau)

Determines whether pi0s and shots should be built for a tau candidate.

Definition at line 93 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

93  {
94  // build pi0s and shots for 0-5p taus
95  return ( tau.nTracks() <= 5 );
96 }

◆ GetConstituentP4()

TLorentzVector tauRecTools::GetConstituentP4 ( const xAOD::JetConstituent constituent)

Definition at line 70 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

70  {
71  using namespace tauRecTools::msgHelperFunction;
72 
73  TLorentzVector constituentP4;
74 
75  if( constituent->type() == xAOD::Type::CaloCluster ) {
76  const xAOD::CaloCluster* cluster = static_cast<const xAOD::CaloCluster*>( constituent->rawConstituent() );
77  constituentP4 = cluster->p4();
78  }
79  else if ( constituent->type() == xAOD::Type::FlowElement ) {
80  const xAOD::FlowElement* fe = static_cast<const xAOD::FlowElement*>( constituent->rawConstituent() );
81  constituentP4 = fe->p4();
82  }
83  else {
84  ANA_MSG_ERROR("GetConstituentP4: Seed jet constituent type not supported!");
85  constituentP4.SetPtEtaPhiE(constituent.pt(), constituent.eta(), constituent.phi(), constituent.e());
86  }
87 
88  return constituentP4;
89 }

◆ getJetVertex()

const xAOD::Vertex * tauRecTools::getJetVertex ( const xAOD::Jet jet)

Return the vertex of jet candidate.

Warning
In trigger, jet candidate does not have a candidate, and an ERROR message will be print out !

Definition at line 20 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

20  {
21  const xAOD::Vertex* jetVertex = nullptr;
22 
23  bool isAvailable = jet.getAssociatedObject("OriginVertex", jetVertex);
24  if (! isAvailable) {
25  return nullptr;
26  }
27 
28  return jetVertex;
29 }

◆ getTauAxis()

TLorentzVector tauRecTools::getTauAxis ( const xAOD::TauJet tau,
bool  doVertexCorrection = true 
)

Return the four momentum of the tau axis The tau axis is widely used to select clusters and cells in tau reconstruction.

If doVertexCorrection is true, then IntermediateAxis is returned. Otherwise, DetectorAxis is returned.

Definition at line 33 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

33  {
34  TLorentzVector tauAxis;
35  if (doVertexCorrection) {
37  }
38  else {
40  }
41 
42  return tauAxis;
43 }

◆ isolateClassifiedBits()

xAOD::TauTrack::TrackFlagType tauRecTools::isolateClassifiedBits ( xAOD::TauTrack::TrackFlagType  flag)

Definition at line 46 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

46  {
47  const int flagsize=sizeof(flag)*8;
50  return flag;
51 }

◆ parseString()

std::vector<TString> tauRecTools::parseString ( const TString &  str,
const TString &  delim = "," 
)

◆ parseStringMVAUtilsBDT()

std::vector<TString> tauRecTools::parseStringMVAUtilsBDT ( const TString &  str,
const TString &  delim = "," 
)

◆ sortTracks()

bool tauRecTools::sortTracks ( const ElementLink< xAOD::TauTrackContainer > &  l1,
const ElementLink< xAOD::TauTrackContainer > &  l2 
)

Definition at line 54 of file Reconstruction/tauRecTools/Root/HelperFunctions.cxx.

55 {
56  //should we be safe and ask if the links are available?
57  const xAOD::TauTrack* xTrack1 = *l1;
58  const xAOD::TauTrack* xTrack2 = *l2;
59 
60  //return classified charged, then isolation (wide tracks), else by pt
63 
64  if(f1==f2)
65  return xTrack1->pt()>xTrack2->pt();
66  return f1<f2;
67 }
xAOD::TauJetParameters::IntermediateAxis
@ IntermediateAxis
Definition: TauDefs.h:338
xAOD::TauJetParameters::classifiedFake
@ classifiedFake
Definition: TauDefs.h:409
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
xAOD::TauJetParameters::classifiedCharged
@ classifiedCharged
Definition: TauDefs.h:406
ANA_MSG_ERROR
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:294
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition: Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::JetConstituent::phi
double phi() const
The azimuthal angle ( ) of the particle.
Definition: JetConstituentVector.h:72
read_hist_ntuple.f2
f2
Definition: read_hist_ntuple.py:20
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
skel.l2
l2
Definition: skel.GENtoEVGEN.py:410
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
columnar::ContainerId::cluster
@ cluster
xAOD::TauTrack_v1::flagSet
TrackFlagType flagSet() const
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
master.flag
bool flag
Definition: master.py:29
xAOD::JetConstituent::pt
double pt() const
Definition: JetConstituentVector.h:68
xAOD::JetConstituent::rawConstituent
const IParticle * rawConstituent() const
Access the real underlying IParticle.
Definition: JetConstituentVector.h:102
xAOD::TauTrack_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::JetConstituent::type
Type::ObjectType type() const
The full 4-momentum of the particle.
Definition: JetConstituentVector.h:91
xAOD::TauTrack_v1::TrackFlagType
uint16_t TrackFlagType
Definition: TauTrack_v1.h:61
tauRecTools::isolateClassifiedBits
xAOD::TauTrack::TrackFlagType isolateClassifiedBits(xAOD::TauTrack::TrackFlagType flag)
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:46
columnar::isAvailable
bool isAvailable(ObjectId< OT, CM > id) const noexcept
Definition: ColumnAccessor.h:183
xAOD::FlowElement_v1::p4
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
Definition: FlowElement_v1.cxx:33
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::TauTrack_v1
Definition: TauTrack_v1.h:27
xAOD::TauJet_v3::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: TauJet_v3.cxx:97
xAOD::JetConstituent::e
double e() const
The total energy of the particle.
Definition: JetConstituentVector.h:76
xAOD::JetConstituent::eta
double eta() const
The pseudorapidity ( ) of the particle.
Definition: JetConstituentVector.h:70
skel.l1
l1
Definition: skel.GENtoEVGEN.py:409
xAOD::TauJetParameters::DetectorAxis
@ DetectorAxis
Definition: TauDefs.h:337
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25