ATLAS Offline Software
Loading...
Searching...
No Matches
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"
15
16#include "MVAUtils/BDT.h"
17#include "TLorentzVector.h"
18#include "TString.h"
19
20#include <vector>
21#include <map>
22
23
24namespace 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
51 bool sortTracks(const ElementLink<xAOD::TauTrackContainer> &l1, const ElementLink<xAOD::TauTrackContainer> &l2);
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
macros for messaging and checking status codes
#define ANA_MSG_HEADER(NAME)
for standalone code this creates a new message category
uint16_t TrackFlagType
Definition TauTrack_v1.h:61
Implementation of a TrackClassifier based on an RNN.
Definition BDTHelper.cxx:12
std::unique_ptr< MVAUtils::BDT > configureMVABDT(std::map< TString, float * > &availableVars, const TString &weightFile)
bool doPi0andShots(const xAOD::TauJet &tau)
Determines whether pi0s and shots should be built for a tau candidate.
std::vector< TString > parseString(const TString &str, const TString &delim=",")
bool sortTracks(const ElementLink< xAOD::TauTrackContainer > &l1, const ElementLink< xAOD::TauTrackContainer > &l2)
std::vector< TString > parseStringMVAUtilsBDT(const TString &str, const TString &delim=",")
const xAOD::Vertex * getJetVertex(const xAOD::Jet &jet)
Return the vertex of jet candidate.
xAOD::TauTrack::TrackFlagType isolateClassifiedBits(xAOD::TauTrack::TrackFlagType flag)
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 ...
TLorentzVector GetConstituentP4(const xAOD::JetConstituent &constituent)
Jet_v1 Jet
Definition of the current "jet version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauJet_v3 TauJet
Definition of the current "tau version".