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"
42 #include "TMVA/Reader.h"
43 #include "TStopwatch.h"
46 #include <unordered_map>
86 std::vector<decoratorFloatH_t>& floatDecors,
87 std::vector<decoratorShortH_t>& shortDecors
94 std::vector<decoratorFloatH_t>& floatDecors,
95 std::vector<decoratorShortH_t>& shortDecors
128 std::vector<decoratorFloatH_t>& floatDecors,
129 std::vector<decoratorShortH_t>& shortDecors
149 this,
"LeptonContainerName",
"",
150 "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
153 Gaudi::Property<std::string>
m_configFileVersion {
this,
"ConfigFileVersion",
"",
"BDT weight file version"};
154 Gaudi::Property<std::string>
m_configPathOverride {
this,
"ConfigPathOverride",
"",
"Path of the local BDT weight file you want to study/test"};
155 Gaudi::Property<std::string>
m_inputVarDecoratePrefix {
this,
"InputVarDecoratePrefix",
"",
"Prefix of the variables that will be decorated into the lepton"};
156 Gaudi::Property<std::string>
m_BDTName {
this,
"BDTName",
"",
"BDT name"};
157 Gaudi::Property<std::string>
m_methodTitleMVA {
this,
"MethodTitleMVA",
"BDT",
"Help to config the path of the BDT xml file"};
159 Gaudi::Property<std::vector<std::string>>
m_accessorRNNVars {
this,
"accessorRNNVars", {},
"Name of the RNN accessor of the lepton"};
160 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"};
161 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"};
162 Gaudi::Property<std::vector<std::string>>
m_extraDecoratorFloatVars {
this,
"extraDecoratorFloatVars", {},
"Extra float variables' names you want to compute and decorate into the lepton"};
163 Gaudi::Property<std::vector<std::string>>
m_extraDecoratorShortVars {
this,
"extraDecoratorShortVars", {},
"Extra short variables' names you want to compute and decorate into the lepton"};
164 Gaudi::Property<std::vector<std::string>>
m_vetoDecoratorFloatVars {
this,
"vetoDecoratorFloatVars", {},
"Vector of the float variables' names you do not want to save"};
165 Gaudi::Property<std::vector<std::string>>
m_vetoDecoratorShortVars {
this,
"vetoDecoratorShortVars", {},
"Vector of the short variables' names you do not want to save"};
166 Gaudi::Property<std::vector<double>>
m_leptonPtBinsVector {
this,
"leptonPtBinsVector", {},
"pT bin edges that are used for MVABin calculation"};
168 Gaudi::Property<bool>
m_printTime {
this,
"PrintTime",
false,
"Whether to print current time"};
170 Gaudi::Property<std::string>
m_vertexLinkName {
this,
"VertexLinkName",
"",
"ElementLink name of the secondary vertices"};
172 Gaudi::Property<double>
m_vertexMinThetaBarrElec {
this,
"VertexMinThetaBarrElec", 0.002,
"Vertex theta between lepton and the direction of sv-pv cut for barrel electrons"};
173 Gaudi::Property<double>
m_vertexMinThetaEcapElec {
this,
"VertexMinThetaEcapElec", 0.001,
"Vertex theta between lepton and the direction of sv-pv cut for central electrons"};
174 Gaudi::Property<double>
m_vertexBarrEcapAbsEtaAt {
this,
"VertexBarrEcapAbsEtaAt", 1.37,
"Relate to the vertex cut above, define the barrel and central electrons by abs(eta)"};
175 Gaudi::Property<double>
m_elecMinCalErelConeSize {
this,
"ElecMinCalErelConeSize", 0.15,
"Cut of the cluster for calculating the core energy of the lepton"};
176 Gaudi::Property<double>
m_maxLepTrackJetDR {
this,
"maxLepTrackJetDR", 0.4,
"Maximum distance between lepton and track jet for track jet matching"};
180 this,
"TrackJetContainerName",
"",
"Track Jet container name"
183 this,
"PrimaryVertexContainerName",
"",
"Primary vertex container name"
186 this,
"ClusterContainerName",
"",
187 "Container name of the Clusters which are used to calculate the input variables for the PromptLeptonImproved"
191 this,
"ElectronContainerKey",
"Electrons",
192 "Container's name of the electrons that you want to decorate"
195 this,
"MuonContainerKey",
"Muons",
196 "Container's name of the muons that you want to decorate"
205 std::unique_ptr<Prompt::VarHolder>
m_vars;
224 {
this,
"FloatDecorHandleKeys", {} };
226 {
this,
"ShortDecorHandleKeys", {} };
228 using DecorMap_t = std::unordered_map<Def::Var, size_t>;
235 #endif // PROMPT_DECORATEPROMPTLEPTON_H
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
double getVertexLongitudinalNormDist(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
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()
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
std::pair< double, const xAOD::Jet * > findTrackJet(const T &part, const xAOD::JetContainer &jets)
Gaudi::Property< double > m_vertexMinThetaEcapElec
Gaudi::Property< std::vector< std::string > > m_stringFloatVars
void getMuonAnpVariables(const xAOD::Muon &muon, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex) const
Gaudi::Property< double > m_vertexBarrEcapAbsEtaAt
Class providing the definition of the 4-vector interface.
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_shortDecorHandleKeys
std::unordered_map< Def::Var, size_t > DecorMap_t
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
Gaudi::Property< std::vector< std::string > > m_extraDecoratorFloatVars
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
Prompt::Def::Var m_BDTVarKey
std::map< Prompt::Def::Var, AccessFloat > floatAccessorMap
Gaudi::Property< std::string > m_inputVarDecoratePrefix
Gaudi::Property< bool > m_printTime
std::vector< Prompt::Def::Var > m_floatVars
DecorMap_t m_floatDecorMap
DecorMap_t m_shortDecorMap
Gaudi::Property< double > m_maxLepTrackJetDR
float accessIsolation(const SG::ConstAccessor< float > &isoAccessor, const xAOD::IParticle &particle) const
void decorateElec(const xAOD::Electron &electron, const xAOD::JetContainer &trackJets, const xAOD::CaloClusterContainer &clusters, const xAOD::Vertex *primaryVertex, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors)
void addVarsToTMVA(Prompt::VarHolder &vars)
std::unique_ptr< TH1D > m_leptonPtBinHist
Gaudi::Property< std::vector< std::string > > m_accessorRNNVars
Gaudi::Property< std::vector< std::string > > m_stringIntVars
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
void fillVarDefault(Prompt::VarHolder &vars) const
Gaudi::Property< std::string > m_configPathOverride
std::vector< Float_t > m_varTMVA
Class describing a Vertex.
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_floatDecorHandleKeys
Gaudi::Property< std::string > m_vertexLinkName
virtual StatusCode initialize() override
void getMutualVariables(const xAOD::IParticle &particle, const xAOD::Jet &track_jet, const xAOD::TrackParticle *track, Prompt::VarHolder &vars) const
Gaudi::Property< std::string > m_configFileVersion
Class describing a TrackParticle.
std::optional< AccessVertex > m_accessDeepSecondaryVertex
Helper class to provide constant type-safe access to aux data.
Gaudi::Property< double > m_vertexMinThetaBarrElec
Gaudi::Property< double > m_vertexMinChiSquaredProb
DecoratePromptLeptonImproved(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initializeDecorators()
void decorateMuon(const xAOD::Muon &muon, const xAOD::JetContainer &trackJets, const xAOD::Vertex *primaryVertex, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors)
double getVertexCosThetaWithLepDir(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
std::unique_ptr< Prompt::VarHolder > m_vars
void decorateAuxLepton(const xAOD::IParticle &particle, Prompt::VarHolder &vars, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors) const
SG::ReadHandleKey< xAOD::JetContainer > m_trackJetsKey
Gaudi::Property< std::string > m_leptonsName