ATLAS Offline Software
Loading...
Searching...
No Matches
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.
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.
TLorentzVector GetConstituentP4 (const xAOD::JetConstituent &constituent)
bool doPi0andShots (const xAOD::TauJet &tau)
 Determines whether pi0s and shots should be built for a tau candidate.
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 44 of file TauTrackRNNClassifier.h.

◆ SeqNodeMap

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

Definition at line 45 of file TauTrackRNNClassifier.h.

◆ ValueMap

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

Definition at line 40 of file TauTrackRNNClassifier.h.

◆ VectorMap

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

Definition at line 42 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}
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const

◆ 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}
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
double eta() const
The pseudorapidity ( ) of the particle.
double phi() const
The azimuthal angle ( ) of the particle.
Type::ObjectType type() const
The full 4-momentum of the particle.
const IParticle * rawConstituent() const
Access the real underlying IParticle.
double e() const
The total energy of the particle.
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
@ CaloCluster
The object is a calorimeter cluster.
Definition ObjectType.h:39
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16

◆ 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}
Vertex_v1 Vertex
Define the latest version of the vertex class.

◆ 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}
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition TauJet_v3.cxx:96

◆ 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;
48 flag=flag<<(flagsize-xAOD::TauJetParameters::classifiedFake-1);
49 flag=flag>>(flagsize-xAOD::TauJetParameters::classifiedCharged+1);
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}
uint16_t TrackFlagType
Definition TauTrack_v1.h:61
TrackFlagType flagSet() const
virtual double pt() const
The transverse momentum ( ) of the particle.
xAOD::TauTrack::TrackFlagType isolateClassifiedBits(xAOD::TauTrack::TrackFlagType flag)
TauTrack_v1 TauTrack
Definition of the current version.
Definition TauTrack.h:16