Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef PROMPT_DECORATEPROMPTLEPTONRNN_H
8 #define PROMPT_DECORATEPROMPTLEPTONRNN_H
30 #include "GaudiKernel/ToolHandle.h"
40 #include "TMVA/Reader.h"
41 #include "TStopwatch.h"
129 typedef std::map<Prompt::Def::Var, SG::AuxElement::Decorator<short> >
shortDecoratorMap;
130 typedef std::map<Prompt::Def::Var, SG::AuxElement::Decorator<float> >
floatDecoratorMap;
139 this,
"LeptonContainerName",
"",
140 "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
143 Gaudi::Property<std::string>
m_configFileVersion {
this,
"ConfigFileVersion",
"",
"BDT weight file version"};
144 Gaudi::Property<std::string>
m_configPathOverride {
this,
"ConfigPathOverride",
"",
"Path of the local BDT weight file you want to study/test"};
145 Gaudi::Property<std::string>
m_inputVarDecoratePrefix {
this,
"InputVarDecoratePrefix",
"",
"Prefix of the variables that will be decorated into the lepton"};
146 Gaudi::Property<std::string>
m_BDTName {
this,
"BDTName",
"",
"BDT name"};
147 Gaudi::Property<std::string>
m_methodTitleMVA {
this,
"MethodTitleMVA",
"BDT",
"Help to config the path of the BDT xml file"};
149 Gaudi::Property<std::vector<std::string>>
m_accessorRNNVars {
this,
"accessorRNNVars", {},
"Name of the RNN accessor of the lepton"};
150 Gaudi::Property<std::vector<std::string>>
m_stringIntVars {
this,
"stringIntVars", {},
"Vector of the BDT int variables' names and they will be decorated into lepton if not in the veto list"};
151 Gaudi::Property<std::vector<std::string>>
m_stringFloatVars {
this,
"stringFloatVars", {},
"Vector of the BDT float variables' names and they will be decorated into lepton if not in the veto list"};
152 Gaudi::Property<std::vector<std::string>>
m_extraDecoratorFloatVars {
this,
"extraDecoratorFloatVars", {},
"Extra float variables' names you want to compute and decorate into the lepton"};
153 Gaudi::Property<std::vector<std::string>>
m_extraDecoratorShortVars {
this,
"extraDecoratorShortVars", {},
"Extra short variables' names you want to compute and decorate into the lepton"};
154 Gaudi::Property<std::vector<std::string>>
m_vetoDecoratorFloatVars {
this,
"vetoDecoratorFloatVars", {},
"Vector of the float variables' names you do not want to save"};
155 Gaudi::Property<std::vector<std::string>>
m_vetoDecoratorShortVars {
this,
"vetoDecoratorShortVars", {},
"Vector of the short variables' names you do not want to save"};
156 Gaudi::Property<std::vector<double>>
m_leptonPtBinsVector {
this,
"leptonPtBinsVector", {},
"pT bin edges that are used for MVABin calculation"};
158 Gaudi::Property<bool>
m_printTime {
this,
"PrintTime",
false,
"Whether to print current time"};
160 Gaudi::Property<std::string>
m_vertexLinkName {
this,
"VertexLinkName",
"",
"ElementLink name of the secondary vertices"};
162 Gaudi::Property<double>
m_vertexMinThetaBarrElec {
this,
"VertexMinThetaBarrElec", 0.002,
"Vertex theta between lepton and the direction of sv-pv cut for barrel electrons"};
163 Gaudi::Property<double>
m_vertexMinThetaEcapElec {
this,
"VertexMinThetaEcapElec", 0.001,
"Vertex theta between lepton and the direction of sv-pv cut for central electrons"};
164 Gaudi::Property<double>
m_vertexBarrEcapAbsEtaAt {
this,
"VertexBarrEcapAbsEtaAt", 1.37,
"Relate to the vertex cut above, define the barrel and central electrons by abs(eta)"};
165 Gaudi::Property<double>
m_elecMinCalErelConeSize {
this,
"ElecMinCalErelConeSize", 0.15,
"Cut of the cluster for calculating the core energy of the lepton"};
166 Gaudi::Property<double>
m_maxLepTrackJetDR {
this,
"maxLepTrackJetDR", 0.4,
"Maximum distance between lepton and track jet for track jet matching"};
170 this,
"TrackJetContainerName",
"",
"Track Jet container name"
173 this,
"PrimaryVertexContainerName",
"",
"Primary vertex container name"
176 this,
"ClusterContainerName",
"",
177 "Container name of the Clusters which are used to calculate the input variables for the PromptLeptonImproved"
181 this,
"ElectronContainerKey",
"Electrons",
182 "Container's name of the electrons that you want to decorate"
185 this,
"MuonContainerKey",
"Muons",
186 "Container's name of the muons that you want to decorate"
195 std::unique_ptr<Prompt::VarHolder>
m_vars;
223 #endif // PROMPT_DECORATEPROMPTLEPTON_H
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorShortVars
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorFloatVars
Gaudi::Property< double > m_elecMinCalErelConeSize
Gaudi::Property< std::vector< double > > m_leptonPtBinsVector
bool initializeTMVAReader()
std::vector< Prompt::Def::Var > m_intVars
std::vector< Prompt::Def::Var > m_allVars
floatAccessorMap m_accessRNNMap
Gaudi::Property< std::string > m_BDTName
void initializeConstAccessors()
void decorateMuon(const xAOD::Muon &muon, const xAOD::JetContainer &trackJets, const xAOD::Vertex *primaryVertex)
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
std::pair< double, const xAOD::Jet * > findTrackJet(const T &part, const xAOD::JetContainer &jets)
SG::AuxElement::ConstAccessor< float > AccessFloat
Helper class to provide constant type-safe access to aux data.
Gaudi::Property< double > m_vertexMinThetaEcapElec
Gaudi::Property< std::vector< std::string > > m_stringFloatVars
Gaudi::Property< double > m_vertexBarrEcapAbsEtaAt
Class providing the definition of the 4-vector interface.
std::unique_ptr< AccessFloat > m_accessCalIsolation30
void getElectronAnpVariables(const xAOD::Electron &elec, const xAOD::CaloClusterContainer &clusters, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex)
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
virtual StatusCode finalize() override
std::unique_ptr< TMVA::Reader > m_TMVAReader
virtual StatusCode execute() override
Gaudi::Property< std::vector< std::string > > m_extraDecoratorShortVars
Gaudi::Property< std::string > m_methodTitleMVA
void decorateAuxLepton(const xAOD::IParticle &particle, Prompt::VarHolder &vars)
Gaudi::Property< std::vector< std::string > > m_extraDecoratorFloatVars
::StatusCode StatusCode
StatusCode definition for legacy code.
void getMuonAnpVariables(const xAOD::Muon &muon, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex)
Prompt::Def::Var m_BDTVarKey
std::unique_ptr< AccessFloat > m_accessTrackIsolation30TTVA
std::unique_ptr< AccessFloat > m_accessMuonParamEnergyLoss
Gaudi::Property< std::string > m_inputVarDecoratePrefix
floatDecoratorMap m_floatMap
Gaudi::Property< bool > m_printTime
std::unique_ptr< AccessVertex > m_accessDeepSecondaryVertex
std::vector< Prompt::Def::Var > m_floatVars
std::unique_ptr< AccessFloat > m_accessMuonCalE
void getMutualVariables(const xAOD::IParticle &particle, const xAOD::Jet &track_jet, const xAOD::TrackParticle *track, Prompt::VarHolder &vars)
Gaudi::Property< double > m_maxLepTrackJetDR
std::map< Prompt::Def::Var, SG::AuxElement::Decorator< short > > shortDecoratorMap
void addVarsToTMVA(Prompt::VarHolder &vars)
std::unique_ptr< TH1D > m_leptonPtBinHist
Gaudi::Property< std::vector< std::string > > m_accessorRNNVars
std::unique_ptr< AccessFloat > m_accessTrackIsolation30
Gaudi::Property< std::vector< std::string > > m_stringIntVars
std::map< Prompt::Def::Var, SG::AuxElement::Decorator< float > > floatDecoratorMap
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
void fillVarDefault(Prompt::VarHolder &vars) const
Gaudi::Property< std::string > m_configPathOverride
std::vector< Float_t > m_varTMVA
shortDecoratorMap m_shortMap
Class describing a Vertex.
SG::AuxElement::ConstAccessor< std::vector< ElementLink< xAOD::VertexContainer > > > AccessVertex
float accessIsolation(SG::AuxElement::ConstAccessor< float > &isoAccessor, const xAOD::IParticle &particle)
std::map< Prompt::Def::Var, AccessFloat > floatAccessorMap
Gaudi::Property< std::string > m_vertexLinkName
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_configFileVersion
Class describing a TrackParticle.
Gaudi::Property< double > m_vertexMinThetaBarrElec
double getVertexCosThetaWithLepDir(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex)
Gaudi::Property< double > m_vertexMinChiSquaredProb
DecoratePromptLeptonImproved(const std::string &name, ISvcLocator *pSvcLocator)
double getVertexLongitudinalNormDist(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex)
StatusCode initializeDecorators()
std::unique_ptr< Prompt::VarHolder > m_vars
void decorateElec(const xAOD::Electron &electron, const xAOD::JetContainer &trackJets, const xAOD::CaloClusterContainer &clusters, const xAOD::Vertex *primaryVertex)
SG::ReadHandleKey< xAOD::JetContainer > m_trackJetsKey
Gaudi::Property< std::string > m_leptonsName