ATLAS Offline Software
Reconstruction/tauRecTools/tauRecTools/HelperFunctions.h
Go to the documentation of this file.
1 #/*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TAURECTOOLS_HELPERFUNCTIONS_H
6 #define TAURECTOOLS_HELPERFUNCTIONS_H
7 
9 #include "xAODJet/Jet.h"
10 #include "xAODTau/TauJet.h"
12 #include "xAODPFlow/PFO.h"
13 #include "xAODPFlow/FlowElement.h"
15 
16 #include "MVAUtils/BDT.h"
17 #include "TLorentzVector.h"
18 #include "TString.h"
19 
20 #include <vector>
21 #include <map>
22 
23 
24 namespace tauRecTools
25 {
26  ANA_MSG_HEADER(msgHelperFunction)
27 
28 
33  const xAOD::Vertex* getJetVertex(const xAOD::Jet& jet);
34 
41  TLorentzVector getTauAxis(const xAOD::TauJet& tau, bool doVertexCorrection = true);
42 
43  TLorentzVector GetConstituentP4(const xAOD::JetConstituent& constituent);
44 
48  bool doPi0andShots(const xAOD::TauJet& tau);
49 
52 
53  std::unique_ptr<MVAUtils::BDT> configureMVABDT( std::map<TString, float*> &availableVars, const TString& weightFile);
54  // initialise the BDT and return the list of input variable names
55  std::unique_ptr<MVAUtils::BDT> configureMVABDT(std::vector<TString>& variableNames, const TString& weightFile);
56 
57  std::vector<TString> parseString(const TString& str, const TString& delim=",");
58  std::vector<TString> parseStringMVAUtilsBDT(const TString& str, const TString& delim=",");
59 }
60 
61 #endif // TAURECTOOLS_HELPERFUNCTIONS_H
tauRecTools::getJetVertex
const xAOD::Vertex * getJetVertex(const xAOD::Jet &jet)
Return the vertex of jet candidate.
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:20
Jet.h
tauRecTools::getTauAxis
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 ...
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:33
tauRecTools::configureMVABDT
std::unique_ptr< MVAUtils::BDT > configureMVABDT(std::map< TString, float * > &availableVars, const TString &weightFile)
tauRecTools::GetConstituentP4
TLorentzVector GetConstituentP4(const xAOD::JetConstituent &constituent)
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:70
tauRecTools::parseStringMVAUtilsBDT
std::vector< TString > parseStringMVAUtilsBDT(const TString &str, const TString &delim=",")
tauRecTools::parseString
std::vector< TString > parseString(const TString &str, const TString &delim=",")
ANA_MSG_HEADER
#define ANA_MSG_HEADER(NAME)
for standalone code this creates a new message category
Definition: Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:113
PFO.h
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
FlowElement.h
CaloCluster.h
tauRecTools::doPi0andShots
bool doPi0andShots(const xAOD::TauJet &tau)
Determines whether pi0s and shots should be built for a tau candidate.
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:93
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
master.flag
bool flag
Definition: master.py:29
MessageCheck.h
macros for messaging and checking status codes
BDT.h
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
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
TauJet.h
xAOD::JetConstituent
4-vector of jet constituent at the scale used during jet finding.
Definition: JetConstituentVector.h:61
str
Definition: BTagTrackIpAccessor.cxx:11
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
tauRecTools
Implementation of a TrackClassifier based on an RNN.
Definition: BDTHelper.cxx:12
tauRecTools::sortTracks
bool sortTracks(const ElementLink< xAOD::TauTrackContainer > &l1, const ElementLink< xAOD::TauTrackContainer > &l2)
Definition: Reconstruction/tauRecTools/Root/HelperFunctions.cxx:54