ATLAS Offline Software
PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/HelperFunctions.h
Go to the documentation of this file.
1 
12 #ifndef TAUANALYSISTOOLS_HELPERFUNCTIONS_H
13 #define TAUANALYSISTOOLS_HELPERFUNCTIONS_H
14 
15 // stl include(s)
16 #include <vector>
17 #include <string>
18 #include <sstream>
19 
20 // ROOT include(s)
21 #include "TEnv.h"
22 
23 // EDM include(s):
24 #include "xAODTau/TauJet.h"
26 #include "xAODTau/TauxAODHelpers.h"
27 #include "xAODTau/DiTauJet.h"
29 #include "xAODTruth/TruthVertex.h"
30 
31 // Local include(s):
32 #include "TauAnalysisTools/Enums.h"
33 
34 namespace TauAnalysisTools
35 {
36 void split(const std::string& sInput, const char cDelim, std::vector<std::string>& vOut);
37 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<std::string>& vOut);
38 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<size_t>& vOut);
39 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<int>& vOut);
40 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<unsigned>& vOut);
41 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<float>& vOut);
42 void split(TEnv& rEnv, const std::string& sIn, const char cDelim, std::vector<double>& vOut);
44 double tauPt(const xAOD::TauJet& xTau);
46 double tauP(const xAOD::TauJet& xTau);
48 double tauEta(const xAOD::TauJet& xTau);
50 double tauAbsEta(const xAOD::TauJet& xTau);
52 double finalTauPt(const xAOD::TauJet& xTau);
54 double finalTauEta(const xAOD::TauJet& xTau);
56 double finalTauAbsEta(const xAOD::TauJet& xTau);
58 double finalTauP(const xAOD::TauJet& xTau);
60 double tauLeadTrackEta(const xAOD::TauJet& xTau);
62 double truthTauPt(const xAOD::TauJet& xTau);
64 double truthTauAbsEta(const xAOD::TauJet& xTau);
66 double truthDecayMode(const xAOD::TauJet& xTau);
67 const xAOD::TruthParticle* getTruth(const xAOD::TauJet& xTau);
89 int getNTauDecayParticles(const xAOD::TruthParticle& xTruthTau, int iPdgId, bool bCompareAbsoluteValues);
91 bool testFileForEOFContainsCharacters(const std::string& sFileName);
92 void createPi0Vectors(const xAOD::TauJet* xTau, std::vector<TLorentzVector>& vPi0s);
93 void correctedPi0Vectors(const xAOD::TauJet* xTau, std::vector<TLorentzVector>& correctedPi0s, TLorentzVector& TauP4);
95 void truthHadrons(const xAOD::TruthParticle* xTruthTau, std::vector<const xAOD::TruthParticle*>& vChargedHadrons, std::vector<const xAOD::TruthParticle*>& vNeutralHadrons);
97 void truthHadrons(const xAOD::TauJet* xTau, std::vector<const xAOD::TruthParticle*>& vChargedHadrons, std::vector<const xAOD::TruthParticle*>& vNeutralHadrons);
103 std::vector<const xAOD::TauJet*> combineTauJetsWithMuonRM(const xAOD::TauJetContainer* taus_std, const xAOD::TauJetContainer* taus_muonRM);
104 }
105 
106 #endif // not TAUANALYSISTOOLS_HELPERFUNCTIONS_H
TauAnalysisTools
Definition: TruthCollectionMakerTau.h:16
Enums.h
TauAnalysisTools::getTruthDecayMode
xAOD::TauJetParameters::DecayMode getTruthDecayMode(const xAOD::TruthParticle &xTruthTau)
Get the Truth Decay Mode from TruthTau particle.
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:223
TauAnalysisTools::getTruth
const xAOD::TruthParticle * getTruth(const xAOD::TauJet &xTau)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:194
TauAnalysisTools::createPi0Vectors
void createPi0Vectors(const xAOD::TauJet *xTau, std::vector< TLorentzVector > &vPi0s)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:316
TauAnalysisTools::truthTauAbsEta
double truthTauAbsEta(const xAOD::TauJet &xTau)
return truth match tau eta (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:172
TauAnalysisTools::tauEta
double tauEta(const xAOD::TauJet &xTau)
return tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:99
TauAnalysisTools::tauPt
double tauPt(const xAOD::TauJet &xTau)
return tau pt in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:85
TauAnalysisTools::truthTauPt
double truthTauPt(const xAOD::TauJet &xTau)
return truth match tau pt in GeV (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:158
TauAnalysisTools::getNTauDecayParticles
int getNTauDecayParticles(const xAOD::TruthParticle &xTruthTau, int iPdgId, bool bCompareAbsoluteValues)
Count truth matched decay particles of a particular PDGID.
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:256
TauAnalysisTools::tauAbsEta
double tauAbsEta(const xAOD::TauJet &xTau)
return absolute tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:106
TauAnalysisTools::finalTauPt
double finalTauPt(const xAOD::TauJet &xTau)
return MVA based tau pt in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:113
TauAnalysisTools::testFileForEOFContainsCharacters
bool testFileForEOFContainsCharacters(const std::string &sFileName)
returns true if last line in file is empty or the line starts with the number sign
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:279
TauAnalysisTools::tauP
double tauP(const xAOD::TauJet &xTau)
return tau P in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:92
xAOD::TauJetParameters::DecayMode
DecayMode
Definition: TauDefs.h:385
TauAnalysisTools::finalTauP
double finalTauP(const xAOD::TauJet &xTau)
return MVA based tau P in GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:134
TauAnalysisTools::truthDecayMode
double truthDecayMode(const xAOD::TauJet &xTau)
return truth decay mode (if hadronic truth tau match)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:186
MooRTT_summarizeCPU.sIn
string sIn
Definition: MooRTT_summarizeCPU.py:8
TauxAODHelpers.h
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauAnalysisTools::truthHadrons
void truthHadrons(const xAOD::TruthParticle *xTruthTau, std::vector< const xAOD::TruthParticle * > &vChargedHadrons, std::vector< const xAOD::TruthParticle * > &vNeutralHadrons)
return charged and neutral daughters of truth tau
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:494
TauJetContainer.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DiTauJet.h
TruthVertex.h
TauAnalysisTools::TruthMatchedParticleType
TruthMatchedParticleType
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h:95
TauAnalysisTools::correctedPi0Vectors
void correctedPi0Vectors(const xAOD::TauJet *xTau, std::vector< TLorentzVector > &correctedPi0s, TLorentzVector &TauP4)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:379
TauAnalysisTools::finalTauAbsEta
double finalTauAbsEta(const xAOD::TauJet &xTau)
return MVA based absolute tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:127
TauAnalysisTools::tauLeadTrackEta
double tauLeadTrackEta(const xAOD::TauJet &xTau)
return leading charge tau track eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:141
TauJet.h
TauAnalysisTools::getTruthParticleType
TruthMatchedParticleType getTruthParticleType(const xAOD::TauJet &xTau)
return TauJet match type
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:572
xAOD::DiTauJet_v1
Definition: DiTauJet_v1.h:31
TruthParticle.h
TauAnalysisTools::combineTauJetsWithMuonRM
std::vector< const xAOD::TauJet * > combineTauJetsWithMuonRM(const xAOD::TauJetContainer *taus_std, const xAOD::TauJetContainer *taus_muonRM)
combine the standard taujets container with the muon removal container
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:620
TauAnalysisTools::finalTauEta
double finalTauEta(const xAOD::TauJet &xTau)
return MVA based tau eta
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:120
TauAnalysisTools::split
void split(const std::string &sInput, const char cDelim, std::vector< std::string > &vOut)
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:23