ATLAS Offline Software
Loading...
Searching...
No Matches
Prompt::DecoratePromptLeptonImproved Class Reference

#include <DecoratePromptLeptonImproved.h>

Inheritance diagram for Prompt::DecoratePromptLeptonImproved:

Public Member Functions

 DecoratePromptLeptonImproved (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

using decoratorFloatH_t = SG::WriteDecorHandle<xAOD::IParticleContainer, float>
using decoratorShortH_t = SG::WriteDecorHandle<xAOD::IParticleContainer, short>
using AccessFloat = SG::ConstAccessor<float>
using AccessVertex = SG::ConstAccessor<std::vector<ElementLink<xAOD::VertexContainer> > >
using floatAccessorMap = std::map<Prompt::Def::Var, AccessFloat>
using DecorMap_t = std::unordered_map<Def::Var, size_t>
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool initializeTMVAReader ()
StatusCode initializeDecorators ()
void initializeConstAccessors ()
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 decorateMuon (const xAOD::Muon &muon, const xAOD::JetContainer &trackJets, const xAOD::Vertex *primaryVertex, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors)
void getMutualVariables (const xAOD::IParticle &particle, const xAOD::Jet &track_jet, const xAOD::TrackParticle *track, Prompt::VarHolder &vars) const
void getMuonAnpVariables (const xAOD::Muon &muon, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex) const
void getElectronAnpVariables (const xAOD::Electron &elec, const xAOD::CaloClusterContainer &clusters, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex)
float accessIsolation (const SG::ConstAccessor< float > &isoAccessor, const xAOD::IParticle &particle) const
void addVarsToTMVA (Prompt::VarHolder &vars)
void fillVarDefault (Prompt::VarHolder &vars) const
void decorateAuxLepton (const xAOD::IParticle &particle, Prompt::VarHolder &vars, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors) const
template<class T>
std::pair< double, const xAOD::Jet * > findTrackJet (const T &part, const xAOD::JetContainer &jets)
double getVertexLongitudinalNormDist (const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
double getVertexCosThetaWithLepDir (const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< std::string > m_leptonsName
Gaudi::Property< std::string > m_configFileVersion {this, "ConfigFileVersion", "", "BDT weight file version"}
Gaudi::Property< std::string > m_configPathOverride {this, "ConfigPathOverride", "", "Path of the local BDT weight file you want to study/test"}
Gaudi::Property< std::string > m_inputVarDecoratePrefix {this, "InputVarDecoratePrefix", "", "Prefix of the variables that will be decorated into the lepton"}
Gaudi::Property< std::string > m_BDTName {this, "BDTName", "", "BDT name"}
Gaudi::Property< std::string > m_methodTitleMVA {this, "MethodTitleMVA", "BDT", "Help to config the path of the BDT xml file"}
Gaudi::Property< std::vector< std::string > > m_accessorRNNVars {this, "accessorRNNVars", {}, "Name of the RNN accessor of the lepton"}
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"}
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"}
Gaudi::Property< std::vector< std::string > > m_extraDecoratorFloatVars {this, "extraDecoratorFloatVars", {}, "Extra float variables' names you want to compute and decorate into the lepton"}
Gaudi::Property< std::vector< std::string > > m_extraDecoratorShortVars {this, "extraDecoratorShortVars", {}, "Extra short variables' names you want to compute and decorate into the lepton"}
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorFloatVars {this, "vetoDecoratorFloatVars", {}, "Vector of the float variables' names you do not want to save"}
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorShortVars {this, "vetoDecoratorShortVars", {}, "Vector of the short variables' names you do not want to save"}
Gaudi::Property< std::vector< double > > m_leptonPtBinsVector {this, "leptonPtBinsVector", {}, "pT bin edges that are used for MVABin calculation"}
Gaudi::Property< bool > m_printTime {this, "PrintTime", false, "Whether to print current time"}
Gaudi::Property< std::string > m_vertexLinkName {this, "VertexLinkName", "", "ElementLink name of the secondary vertices"}
Gaudi::Property< double > m_vertexMinChiSquaredProb {this, "VertexMinChiSquaredProb", 0.03, "Vertex chi2 cut"}
Gaudi::Property< double > m_vertexMinThetaBarrElec {this, "VertexMinThetaBarrElec", 0.002, "Vertex theta between lepton and the direction of sv-pv cut for barrel electrons"}
Gaudi::Property< double > m_vertexMinThetaEcapElec {this, "VertexMinThetaEcapElec", 0.001, "Vertex theta between lepton and the direction of sv-pv cut for central electrons"}
Gaudi::Property< double > m_vertexBarrEcapAbsEtaAt {this, "VertexBarrEcapAbsEtaAt", 1.37, "Relate to the vertex cut above, define the barrel and central electrons by abs(eta)"}
Gaudi::Property< double > m_elecMinCalErelConeSize {this, "ElecMinCalErelConeSize", 0.15, "Cut of the cluster for calculating the core energy of the lepton"}
Gaudi::Property< double > m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"}
SG::ReadHandleKey< xAOD::JetContainerm_trackJetsKey
SG::ReadHandleKey< xAOD::VertexContainerm_primaryVertexKey
SG::ReadHandleKey< xAOD::CaloClusterContainerm_clusterContainerKey
SG::ReadHandleKey< xAOD::ElectronContainerm_electronsKey
SG::ReadHandleKey< xAOD::MuonContainerm_muonsKey
std::vector< Prompt::Def::Varm_intVars
std::vector< Prompt::Def::Varm_floatVars
std::vector< Prompt::Def::Varm_allVars
std::unique_ptr< Prompt::VarHolderm_vars
Prompt::Def::Var m_BDTVarKey
std::unique_ptr< TMVA::Reader > m_TMVAReader
std::vector< Float_t > m_varTMVA
std::optional< AccessVertexm_accessDeepSecondaryVertex
floatAccessorMap m_accessRNNMap
std::unique_ptr< TH1D > m_leptonPtBinHist
TStopwatch m_timerAll
TStopwatch m_timerExec
TStopwatch m_timerMuon
TStopwatch m_timerElec
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainerm_floatDecorHandleKeys { this, "FloatDecorHandleKeys", {} }
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainerm_shortDecorHandleKeys { this, "ShortDecorHandleKeys", {} }
DecorMap_t m_floatDecorMap
DecorMap_t m_shortDecorMap
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 51 of file DecoratePromptLeptonImproved.h.

Member Typedef Documentation

◆ AccessFloat

◆ AccessVertex

◆ decoratorFloatH_t

◆ decoratorShortH_t

◆ DecorMap_t

using Prompt::DecoratePromptLeptonImproved::DecorMap_t = std::unordered_map<Def::Var, size_t>
private

Definition at line 228 of file DecoratePromptLeptonImproved.h.

◆ floatAccessorMap

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DecoratePromptLeptonImproved()

Prompt::DecoratePromptLeptonImproved::DecoratePromptLeptonImproved ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 35 of file DecoratePromptLeptonImproved.cxx.

35 :
36 AthAlgorithm(name, pSvcLocator),
38{}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

Member Function Documentation

◆ accessIsolation()

float Prompt::DecoratePromptLeptonImproved::accessIsolation ( const SG::ConstAccessor< float > & isoAccessor,
const xAOD::IParticle & particle ) const
private

Definition at line 735 of file DecoratePromptLeptonImproved.cxx.

738 {
739 double isolation = -99., isolationrel = -99.;
740
741 if(isoAccessor.isAvailable(particle)) {
742 isolation = isoAccessor(particle);
743 }
744 else {
745 ATH_MSG_WARNING("Lepton isolation not found in auxiliary store");
746 }
747
748 if(particle.pt() > 0.0) {
749 isolationrel = isolation / particle.pt();
750 }
751
752 return isolationrel;
753}
#define ATH_MSG_WARNING(x)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ addVarsToTMVA()

void Prompt::DecoratePromptLeptonImproved::addVarsToTMVA ( Prompt::VarHolder & vars)
private

Definition at line 756 of file DecoratePromptLeptonImproved.cxx.

757{
758 //
759 // Add variables to TMVA reader
760 //
761 for(unsigned i = 0; i < m_allVars.size(); ++i) {
762 m_varTMVA[i] = 0.0;
763
764 if(!vars.getVar(m_allVars.at(i), m_varTMVA[i])) {
765 ATH_MSG_WARNING("Missing input variable: " << m_vars->asStr(m_allVars.at(i)));
766 }
767 }
768
769 //
770 // Decorate lepton with classifier response, if goodJet
771 //
772 float bdt_weight = m_TMVAReader->EvaluateMVA(m_methodTitleMVA.toString());
773
774 if(m_BDTVarKey != Def::NONE) {
775 vars.addVar(m_BDTVarKey, bdt_weight);
776 }
777 else {
778 ATH_MSG_WARNING("addVarsToTMVA - invalid Def::Var key for " << m_BDTName);
779 }
780}
std::unique_ptr< Prompt::VarHolder > m_vars
double getVar(const unsigned key) const
Definition VarHolder.h:265
bool addVar(unsigned key, double value)
Adds a variable to the VarHolder.
Definition VarHolder.h:200

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorateAuxLepton()

void Prompt::DecoratePromptLeptonImproved::decorateAuxLepton ( const xAOD::IParticle & particle,
Prompt::VarHolder & vars,
std::vector< decoratorFloatH_t > & floatDecors,
std::vector< decoratorShortH_t > & shortDecors ) const
private

Definition at line 798 of file DecoratePromptLeptonImproved.cxx.

804{
805 //
806 // Decorate lepton with input short variables
807 //
808 for(const DecorMap_t::value_type &dec: m_shortDecorMap) {
809 double val = 0.0;
810
811 if(vars.getVar(dec.first, val)) {
812 shortDecors.at(dec.second)(particle) = static_cast<short>(val);
813
814 ATH_MSG_DEBUG("Short variable: " << vars.asStr(dec.first) << " = " << val);
815 }
816 else {
817 ATH_MSG_WARNING("Short variable " << vars.asStr(dec.first) << " not decorated to lepton");
818 }
819 }
820
821 //
822 // Decorate lepton with input float variables
823 //
824 for(const DecorMap_t::value_type &dec: m_floatDecorMap) {
825 double val = 0.0;
826
827 if(vars.getVar(dec.first, val)) {
828 floatDecors.at(dec.second)(particle) = val;
829
830 ATH_MSG_DEBUG("Float variable: " << vars.asStr(dec.first) << " = " << val);
831 }
832 else {
833 ATH_MSG_WARNING("Float variable " << vars.asStr(dec.first) << " not decorated to lepton");
834 }
835 }
836}
#define ATH_MSG_DEBUG(x)
std::string asStr(const uint32_t key, const double val)

◆ decorateElec()

void Prompt::DecoratePromptLeptonImproved::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 )
private

Definition at line 400 of file DecoratePromptLeptonImproved.cxx.

408{
409 //
410 // Find nearest track jet to electron
411 //
412 TimerScopeHelper timer(m_timerElec);
413
414 Prompt::VarHolder vars;
415
416 std::pair<double, const xAOD::Jet*> match = findTrackJet(electron, trackJets);
417
418 if(match.second) {
419 //
420 // Get muon calorimeter energy variable, RNN and secondary vertex variables
421 //
422 getElectronAnpVariables(electron, clusters, vars, primaryVertex);
423
424 //
425 // Get mutual variables, passing track as argument
426 //
427 getMutualVariables(electron, *match.second, electron.trackParticle(), vars);
428
429 //
430 // Pass variables to TMVA
431 //
432 addVarsToTMVA(vars);
433 }
434 else {
435 //
436 // Decorate electron with default values
437 //
438 fillVarDefault(vars);
439
440 ATH_MSG_DEBUG("No track jet found near to electron");
441 }
442
443 //
444 // Decorate electron with input vars and BDT weight
445 //
446 decorateAuxLepton(electron, vars, floatDecors, shortDecors);
447}
std::pair< double, const xAOD::Jet * > findTrackJet(const T &part, const xAOD::JetContainer &jets)
void getMutualVariables(const xAOD::IParticle &particle, const xAOD::Jet &track_jet, const xAOD::TrackParticle *track, Prompt::VarHolder &vars) const
void fillVarDefault(Prompt::VarHolder &vars) const
void getElectronAnpVariables(const xAOD::Electron &elec, const xAOD::CaloClusterContainer &clusters, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex)
void decorateAuxLepton(const xAOD::IParticle &particle, Prompt::VarHolder &vars, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors) const
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
timer(name, disabled=False)

◆ decorateMuon()

void Prompt::DecoratePromptLeptonImproved::decorateMuon ( const xAOD::Muon & muon,
const xAOD::JetContainer & trackJets,
const xAOD::Vertex * primaryVertex,
std::vector< decoratorFloatH_t > & floatDecors,
std::vector< decoratorShortH_t > & shortDecors )
private

Definition at line 451 of file DecoratePromptLeptonImproved.cxx.

458{
459 //
460 // Find nearest track jet to muon
461 //
462 TimerScopeHelper timer(m_timerMuon);
463
464 Prompt::VarHolder vars;
465
466 std::pair<double, const xAOD::Jet*> match = findTrackJet(muon, trackJets);
467
468 if(match.second) {
469 //
470 // Get muon calorimeter energy variable, RNN and secondary vertex variables
471 //
472 getMuonAnpVariables(muon, vars, primaryVertex);
473
474 //
475 // Get mutual variables, passing track as argument
476 //
477 getMutualVariables(muon, *match.second, muon.trackParticle(xAOD::Muon::TrackParticleType::Primary), vars);
478
479 //
480 // Add variables to TMVA Reader
481 //
482 addVarsToTMVA(vars);
483 }
484 else {
485 //
486 // Decorate muon with default values
487 //
488 fillVarDefault(vars);
489
490 ATH_MSG_DEBUG("No track jet found near to muon");
491 }
492
493 //
494 // Decorate muon with input vars and BDT weight
495 //
496 decorateAuxLepton(muon, vars, floatDecors, shortDecors);
497}
void getMuonAnpVariables(const xAOD::Muon &muon, Prompt::VarHolder &vars, const xAOD::Vertex *primaryVertex) const

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Prompt::DecoratePromptLeptonImproved::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 141 of file DecoratePromptLeptonImproved.cxx.

142{
143 //
144 // Start execute timer
145 //
146 TimerScopeHelper timer(m_timerExec);
147
148
149 //
150 // Retrieve containers from evtStore
151 //
152 SG::ReadHandle<xAOD::JetContainer> trackJets(m_trackJetsKey, ctx);
153 SG::ReadHandle<xAOD::VertexContainer> vertices(m_primaryVertexKey, ctx);
154 SG::ReadHandle<xAOD::CaloClusterContainer> clusters(m_clusterContainerKey, ctx);
155
156 ATH_MSG_DEBUG("======================================="
157 << "\n\t\t\t Size of vertex container: " << vertices ->size()
158 << "\n\t\t\t Size of track jet container: " << trackJets->size()
159 << "\n-----------------------------------------------------------------");
160
161 //
162 // Find default Primary Vertex
163 //
164 const xAOD::Vertex *primaryVertex = nullptr;
165
166 for(const xAOD::Vertex *vertex: *vertices) {
167 if(vertex->vertexType() == xAOD::VxType::PriVtx) {
168 primaryVertex = vertex;
169 break;
170 }
171 }
172
173 std::vector<decoratorFloatH_t> floatDecors;
174 floatDecors.reserve (m_floatDecorHandleKeys.size());
175 for (const SG::WriteDecorHandleKey<xAOD::IParticleContainer>& k : m_floatDecorHandleKeys) {
176 floatDecors.emplace_back (k, ctx);
177 }
178
179 std::vector<decoratorShortH_t> shortDecors;
180 shortDecors.reserve (m_shortDecorHandleKeys.size());
181 for (const SG::WriteDecorHandleKey<xAOD::IParticleContainer>& k : m_shortDecorHandleKeys) {
182 shortDecors.emplace_back (k, ctx);
183 }
184
185 if(m_leptonsName == "Electrons") {
186 //
187 // Process electrons
188 //
189 ATH_MSG_DEBUG("Reading " << m_electronsKey);
190 SG::ReadHandle<xAOD::ElectronContainer> electrons(m_electronsKey, ctx);
191
192 for(const xAOD::Electron *elec: *electrons) {
193 decorateElec(*elec, *trackJets, *clusters, primaryVertex, floatDecors, shortDecors);
194 }
195 } else if(m_leptonsName == "Muons") {
196 //
197 // Process muons
198 //
199 ATH_MSG_DEBUG("Reading " << m_muonsKey);
200 SG::ReadHandle<xAOD::MuonContainer> muons(m_muonsKey, ctx);
201
202 for(const xAOD::Muon *muon: *muons) {
203 decorateMuon(*muon, *trackJets, primaryVertex, floatDecors, shortDecors);
204 ATH_MSG_DEBUG("Muon decorated");
205 }
206 } else {
207 ATH_MSG_ERROR("Must specify Electrons or Muons");
208 return StatusCode::FAILURE;
209 }
210
211 return StatusCode::SUCCESS;
212}
#define ATH_MSG_ERROR(x)
size_t size() const
Number of registered mappings.
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexKey
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_shortDecorHandleKeys
SG::WriteDecorHandleKeyArray< xAOD::IParticleContainer > m_floatDecorHandleKeys
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsKey
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)
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsKey
SG::ReadHandleKey< xAOD::JetContainer > m_trackJetsKey
void decorateMuon(const xAOD::Muon &muon, const xAOD::JetContainer &trackJets, const xAOD::Vertex *primaryVertex, std::vector< decoratorFloatH_t > &floatDecors, std::vector< decoratorShortH_t > &shortDecors)
@ PriVtx
Primary vertex.
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillVarDefault()

void Prompt::DecoratePromptLeptonImproved::fillVarDefault ( Prompt::VarHolder & vars) const
private

Definition at line 783 of file DecoratePromptLeptonImproved.cxx.

784{
785 //
786 // Add default values to VarHolder
787 //
788 for(const DecorMap_t::value_type &dec: m_floatDecorMap) {
789 vars.addVar(dec.first, -99.0);
790 }
791
792 for(const DecorMap_t::value_type &dec: m_shortDecorMap) {
793 vars.addVar(dec.first, -99.0);
794 }
795}

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode Prompt::DecoratePromptLeptonImproved::finalize ( )
overridevirtual

Definition at line 121 of file DecoratePromptLeptonImproved.cxx.

122{
123 if(m_printTime) {
124 //
125 // Print full time stopwatch
126 //
127 m_timerAll.Stop();
128
129 ATH_MSG_INFO("Real time: " << m_timerAll.RealTime() << "\t CPU time: " << m_timerAll.CpuTime());
130
131 ATH_MSG_INFO("Execute time: " << PrintResetStopWatch(m_timerExec));
134 }
135
136 return StatusCode::SUCCESS;
137}
#define ATH_MSG_INFO(x)
std::string PrintResetStopWatch(TStopwatch &watch)

◆ findTrackJet()

template<class T>
std::pair< double, const xAOD::Jet * > Prompt::DecoratePromptLeptonImproved::findTrackJet ( const T & part,
const xAOD::JetContainer & jets )
private

Definition at line 839 of file DecoratePromptLeptonImproved.cxx.

841{
842 //
843 // Find nearest track jet and a return a pair of dR and xAOD::Jet*
844 //
845 const xAOD::Jet *minjet = 0;
846 double mindr = 10.0;
847 std::pair<double, const xAOD::Jet*> match(mindr, minjet);
848
849 for(const xAOD::Jet* jet: jets) {
850 const double dr = part.p4().DeltaR(jet->p4());
851
852 if(!minjet || dr < mindr) {
853 mindr = dr;
854 minjet = jet;
855 match = std::make_pair(mindr, minjet);
856 }
857 }
858
859
860 if(minjet && mindr < m_maxLepTrackJetDR) {
861 return match;
862 }
863
864 minjet = 0;
865 return std::make_pair(10., minjet);
866}
Jet_v1 Jet
Definition of the current "jet version".

◆ getElectronAnpVariables()

void Prompt::DecoratePromptLeptonImproved::getElectronAnpVariables ( const xAOD::Electron & elec,
const xAOD::CaloClusterContainer & clusters,
Prompt::VarHolder & vars,
const xAOD::Vertex * primaryVertex )
private

Definition at line 500 of file DecoratePromptLeptonImproved.cxx.

506{
507 //
508 // Get Muon variables - calorimeter
509 //
510 double sumCoreEt_large = 0.0, CaloClusterSumEtRel = 0.0;
511
512 if(elec.caloCluster()) {
513 const double elec_calEta = elec.caloCluster()->eta();
514 const double elec_calPhi = elec.caloCluster()->phi();
515
516 for(const xAOD::CaloCluster *cluster: clusters) {
517 const double deta = elec_calEta - cluster->eta();
518 const double dphi = TVector2::Phi_mpi_pi(elec_calPhi - cluster->phi());
519 const double dr = std::sqrt(deta*deta + dphi*dphi);
520
521 if(dr < m_elecMinCalErelConeSize) {
522 sumCoreEt_large += cluster->pt();
523 }
524 }
525 }
526
527 if(elec.pt() > 0.0) CaloClusterSumEtRel = sumCoreEt_large/elec.pt();
528
529 vars.addVar(Prompt::Def::CaloClusterSumEtRel, CaloClusterSumEtRel);
530
531 //
532 // Get lepton isolation variables
533 //
534 const double Topoetcone30rel = accessIsolation(accessCalIsolation30, elec);
535 const double Ptvarcone30rel = accessIsolation(accessTrackIsolation30, elec);
536
537 vars.addVar(Prompt::Def::Topoetcone30rel, Topoetcone30rel);
538 vars.addVar(Prompt::Def::Ptvarcone30rel, Ptvarcone30rel);
539
540 //
541 // Get secondary vertex variable
542 //
543 std::vector<double> goodVertexNdistLong;
544
545 if(m_accessDeepSecondaryVertex->isAvailable(elec)) {
546 std::vector<ElementLink<xAOD::VertexContainer> > vtxLinks = (*m_accessDeepSecondaryVertex)(elec);
547
548 for(ElementLink<xAOD::VertexContainer> &vtxLink: vtxLinks) {
549 if(!vtxLink.isValid()) {
550 ATH_MSG_WARNING("VertexContainer : invalid link");
551 continue;
552 }
553
554 const xAOD::Vertex *vtx = *vtxLink;
555
556 const double fitProb = Prompt::getVertexFitProb(vtx);
557
558 if(fitProb < m_vertexMinChiSquaredProb) {
559 continue;
560 }
561
562 const double theta = std::acos(getVertexCosThetaWithLepDir(elec, vtx, primaryVertex));
563
564 if (theta < m_vertexMinThetaBarrElec && std::fabs(elec.eta()) <= m_vertexBarrEcapAbsEtaAt) continue;
565 else if (theta < m_vertexMinThetaEcapElec && std::fabs(elec.eta()) > m_vertexBarrEcapAbsEtaAt) continue;
566
567 const double vertex_ndist_long = getVertexLongitudinalNormDist(elec, vtx, primaryVertex);
568
569 goodVertexNdistLong.push_back(vertex_ndist_long);
570 }
571 }
572 else {
573 ATH_MSG_WARNING("VertexContainer : " << m_vertexLinkName << " not found for the electron");
574 }
575
576 double best_vertex_ndist_long = 0.0;
577
578 if(goodVertexNdistLong.size() > 0) {
579 std::sort(goodVertexNdistLong.begin(), goodVertexNdistLong.end());
580 best_vertex_ndist_long = goodVertexNdistLong.back();
581 }
582
584 vars.addVar(Prompt::Def::CandVertex_NPassVtx, goodVertexNdistLong.size());
585}
Scalar theta() const
theta method
double getVertexCosThetaWithLepDir(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
double getVertexLongitudinalNormDist(const xAOD::IParticle &lepton, const xAOD::Vertex *secondaryVertex, const xAOD::Vertex *primaryVertex) const
std::optional< AccessVertex > m_accessDeepSecondaryVertex
float accessIsolation(const SG::ConstAccessor< float > &isoAccessor, const xAOD::IParticle &particle) const
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition Egamma_v1.cxx:66
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition Egamma_v1.cxx:71
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
@ Topoetcone30rel
Definition VarHolder.h:60
@ CandVertex_normDistToPriVtxLongitudinalBest_ThetaCutVtx
Definition VarHolder.h:69
@ CandVertex_NPassVtx
Definition VarHolder.h:70
@ CaloClusterSumEtRel
Definition VarHolder.h:66
double getVertexFitProb(const xAOD::Vertex *vtx)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ getMuonAnpVariables()

void Prompt::DecoratePromptLeptonImproved::getMuonAnpVariables ( const xAOD::Muon & muon,
Prompt::VarHolder & vars,
const xAOD::Vertex * primaryVertex ) const
private

Definition at line 588 of file DecoratePromptLeptonImproved.cxx.

593{
594 //
595 // Get Muon variables - calorimeter
596 //
597 double calE = -99.0, peloss = -99.0, caloClusterERel = -99.0;
598
599 if(const xAOD::CaloCluster* cluster = muon.cluster()) {
600 if(accessMuonCalE.isAvailable(*cluster) && accessMuonParamEnergyLoss.isAvailable(muon)) {
601 calE = accessMuonCalE(*cluster);
602 peloss = accessMuonParamEnergyLoss(muon);
603
604 caloClusterERel = calE/peloss;
605 }
606 else {
607 ATH_MSG_WARNING("Muon calE or ParamEnergyLoss not found in auxiliary store");
608 }
609 }
610
611 vars.addVar(Prompt::Def::CaloClusterERel, caloClusterERel);
612
613 //
614 // Get lepton isolation variables
615 //
616 const double Topoetcone30rel = accessIsolation(accessCalIsolation30, muon);
617 const double ptvarcone30TightTTVAPt500rel = accessIsolation(accessTrackIsolation30TTVA, muon);
618
619 vars.addVar(Prompt::Def::Topoetcone30rel, Topoetcone30rel);
620 vars.addVar(Prompt::Def::Ptvarcone30_TightTTVA_pt500rel, ptvarcone30TightTTVAPt500rel);
621
622 //
623 // Get Muon Secondary Vertex variable
624 //
625 std::vector<double> goodVertexNdistLong;
626
627 if(m_accessDeepSecondaryVertex->isAvailable(muon)) {
628 std::vector<ElementLink<xAOD::VertexContainer> > vtxLinks = (*m_accessDeepSecondaryVertex)(muon);
629 goodVertexNdistLong.reserve(vtxLinks.size());
630
631 for(ElementLink<xAOD::VertexContainer> &vtxLink: vtxLinks) {
632 if(!vtxLink.isValid()) {
633 ATH_MSG_WARNING("VertexContainer : invalid link");
634 continue;
635 }
636
637 const xAOD::Vertex *vtx = *vtxLink;
638
639 const double fitProb = Prompt::getVertexFitProb(vtx);
640
641 if(fitProb > m_vertexMinChiSquaredProb) {
642 const double vertex_ndist_long = getVertexLongitudinalNormDist(muon, vtx, primaryVertex);
643
644 goodVertexNdistLong.push_back(vertex_ndist_long);
645 }
646 }
647 }
648 else {
649 ATH_MSG_WARNING("VertexContainer : " << m_vertexLinkName << " not found for the muon");
650 }
651
652 double best_vertex_ndist_long = 0.0;
653
654 if(goodVertexNdistLong.size() > 0) {
655 std::sort(goodVertexNdistLong.begin(), goodVertexNdistLong.end());
656 best_vertex_ndist_long = goodVertexNdistLong.back();
657 }
658
660 vars.addVar(Prompt::Def::CandVertex_NPassVtx, goodVertexNdistLong.size());
661}
@ Ptvarcone30_TightTTVA_pt500rel
Definition VarHolder.h:62
@ CaloClusterERel
Definition VarHolder.h:65
@ CandVertex_normDistToPriVtxLongitudinalBest
Definition VarHolder.h:68

◆ getMutualVariables()

void Prompt::DecoratePromptLeptonImproved::getMutualVariables ( const xAOD::IParticle & particle,
const xAOD::Jet & track_jet,
const xAOD::TrackParticle * track,
Prompt::VarHolder & vars ) const
private

Definition at line 664 of file DecoratePromptLeptonImproved.cxx.

670{
671 //
672 // Add lepton - jet variables to VarHolder
673 //
674 double PtFrac = -99.;
675 double PtRel = -99.;
676
677 if(particle.pt() > 0.0 && track_jet.pt() > 0.0) {
678
679 if(track) {
680 PtFrac = track->pt()/track_jet.pt();
681 }
682
683 const double angle = particle.p4().Vect().Angle(track_jet.p4().Vect());
684
685 PtRel = particle.pt() * std::sin(angle);
686 }
687
688 //
689 // Add vars to VarHolder
690 //
691 vars.addVar(Prompt::Def::PtFrac, PtFrac);
692 vars.addVar(Prompt::Def::PtRel, PtRel);
693 vars.addVar(Prompt::Def::DRlj, track_jet.p4().DeltaR(particle.p4()));
695
696 //
697 // Get RNN variables
698 //
699 for(const floatAccessorMap::value_type &acc: m_accessRNNMap) {
700 if(acc.second.isAvailable(particle)) {
701 vars.addVar(acc.first, acc.second(particle));
702 }
703 else {
704 ATH_MSG_WARNING("LeptonTagger RNN not found in auxiliary store for variable=" << vars.asStr(acc.first));
705 }
706 }
707
708 //
709 // Get lepton variables - pT X bin
710 //
711 const double lepPt = particle.pt();
712
713 const double xmax = m_leptonPtBinHist->GetXaxis()->GetXmax();
714 const double xmin = m_leptonPtBinHist->GetXaxis()->GetXmin();
715
716 int curr_bin = 0;
717
718 if(xmin < lepPt && lepPt < xmax) {
719 curr_bin = m_leptonPtBinHist->FindBin(lepPt);
720 }
721 else if (!(lepPt < xmax)) {
722 curr_bin = m_leptonPtBinHist->GetNbinsX();
723 }
724 else if (!(lepPt > xmin)) {
725 curr_bin = 1;
726 }
727
728 vars.addVar(Prompt::Def::MVAXBin, curr_bin);
729 vars.addVar(Prompt::Def::RawPt, lepPt);
730
731 ATH_MSG_DEBUG("getMutualVariables - lepPt = " << lepPt << ", MVAXBin = " << curr_bin);
732}
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
size_t size() const
number of constituents
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition Jet_v1.cxx:71
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Definition Jet_v1.cxx:149
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition Jet_v1.cxx:44
double xmax
Definition listroot.cxx:61
double xmin
Definition listroot.cxx:60

◆ getVertexCosThetaWithLepDir()

double Prompt::DecoratePromptLeptonImproved::getVertexCosThetaWithLepDir ( const xAOD::IParticle & lepton,
const xAOD::Vertex * secondaryVertex,
const xAOD::Vertex * primaryVertex ) const
private

Definition at line 896 of file DecoratePromptLeptonImproved.cxx.

899{
900 //
901 // get the Longitudinal nomalized distance between the secondary vertex and primary vertex
902 //
903 if(!secondaryVertex || !primaryVertex) {
904 ATH_MSG_WARNING("GetVertexThetaWithLepDir - invalid pointer of lepton/secondaryVertex/primaryVertex");
905 return 0.0;
906 }
907
908 const Amg::Vector3D sv_to_pv_v3 = secondaryVertex->position() - primaryVertex->position();
909
910 const TVector3 sv_to_pv_t3 = TVector3(sv_to_pv_v3.x(), sv_to_pv_v3.y(), sv_to_pv_v3.z());
911 const TVector3 lepton_dirt = lepton.p4().Vect();
912
913 const double cos_theta = sv_to_pv_t3.Unit()*lepton_dirt.Unit();
914
915 return cos_theta;
916}
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
const Amg::Vector3D & position() const
Returns the 3-pos.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ getVertexLongitudinalNormDist()

double Prompt::DecoratePromptLeptonImproved::getVertexLongitudinalNormDist ( const xAOD::IParticle & lepton,
const xAOD::Vertex * secondaryVertex,
const xAOD::Vertex * primaryVertex ) const
private

Definition at line 869 of file DecoratePromptLeptonImproved.cxx.

874{
875 //
876 // get the Longitudinal normalized distance between the secondary vertex and primary vertex
877 //
878 if(!secondaryVertex || !primaryVertex) {
879 ATH_MSG_WARNING("getVertexLongitudinalNormDist - invalid pointer of lepton/secondaryVertex/primaryVertex");
880 return 0.0;
881 }
882
883
884 float normDist_SVPV = 0.0;
885
886 if(!Prompt::GetAuxVar(*secondaryVertex, normDist_SVPV, "normDistToPriVtx")) {
887 ATH_MSG_WARNING("getVertexLongitudinalNormDist - missing \"normDistToPriVtx\"");
888 }
889
890 double cos_theta = getVertexCosThetaWithLepDir(lepton, secondaryVertex, primaryVertex);
891
892 return normDist_SVPV*cos_theta;
893}
bool GetAuxVar(const T1 &obj, T2 &value, const std::string &var_name)
Definition PromptUtils.h:83

◆ initialize()

StatusCode Prompt::DecoratePromptLeptonImproved::initialize ( )
overridevirtual

Definition at line 41 of file DecoratePromptLeptonImproved.cxx.

42{
43 ATH_MSG_DEBUG("Initializing DecoratePromptLeptonImproved...");
44 ATH_MSG_DEBUG("m_leptonsName = " << m_leptonsName);
45 if (m_printTime)
46 {
47 //
48 // Reset timers
49 //
50 m_timerAll .Reset();
51 m_timerExec.Reset();
52 m_timerMuon.Reset();
53 m_timerElec.Reset();
54
55 //
56 // Start full timer
57 //
58 m_timerAll.Start();
59 }
60
61 ATH_CHECK(m_trackJetsKey.initialize());
62 ATH_CHECK(m_primaryVertexKey.initialize());
63 ATH_CHECK(m_clusterContainerKey.initialize());
64
65 ATH_MSG_DEBUG("Initializing " << m_electronsKey);
66
67 ATH_CHECK(m_electronsKey.initialize(m_leptonsName == "Electrons"));
68 ATH_CHECK(m_muonsKey.initialize(m_leptonsName == "Muons"));
69
70 ATH_MSG_DEBUG("Number of int vars to read: " << m_stringIntVars.size());
71 ATH_MSG_DEBUG("Number of float vars to read: " << m_stringFloatVars.size());
72
73 // Setup variable holder
74 m_vars = std::make_unique<Prompt::VarHolder>();
75
76 //
77 // Read vector<string> vars into vector<Var> and append
78 //
79 m_intVars = m_vars->readVectorVars(m_stringIntVars);
80 m_floatVars = m_vars->readVectorVars(m_stringFloatVars);
81
82 m_allVars.insert(m_allVars.end(), m_intVars .begin(), m_intVars .end());
83 m_allVars.insert(m_allVars.end(), m_floatVars.begin(), m_floatVars.end());
84
85 m_varTMVA.resize(m_allVars.size());
86
87
88 //
89 // Get key for recording BDT output
90 //
91 m_BDTVarKey = m_vars->registerDynamicVar(m_BDTName);
92
93 if(m_BDTVarKey == Def::NONE) {
94 ATH_MSG_ERROR("Failed to create key for BDT name=" << m_BDTName);
95 return StatusCode::FAILURE;
96 }
97
98 //
99 // Fill decorator maps
100 //
102
103 //
104 // Initialize const accessors
105 //
107
108 ATH_MSG_DEBUG("Initialized DecoratePromptLeptonImproved.");
109
110 //
111 // Initialize TMVA Reader
112 //
114
115 ATH_MSG_DEBUG("Initialized TMVA Reader.");
116
117 return StatusCode::SUCCESS;
118}
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< std::vector< std::string > > m_stringFloatVars
Gaudi::Property< std::vector< std::string > > m_stringIntVars

◆ initializeConstAccessors()

void Prompt::DecoratePromptLeptonImproved::initializeConstAccessors ( )
private

Definition at line 377 of file DecoratePromptLeptonImproved.cxx.

378{
379 //
380 // Instantiate isolation accessors
381 //
383
384 //
385 // Instantiate accessors for RNN variables
386 //
387 for(const std::string &name: m_accessorRNNVars) {
388 const Def::Var akey = m_vars->registerDynamicVar(name);
389
390 if(m_accessRNNMap.insert(floatAccessorMap::value_type(akey, AccessFloat(name))).second) {
391 ATH_MSG_DEBUG("Add float RNN accessor: " << name);
392 }
393 else {
394 ATH_MSG_WARNING("Skip duplicate float accessor: " << name);
395 }
396 }
397}
Gaudi::Property< std::vector< std::string > > m_accessorRNNVars

◆ initializeDecorators()

StatusCode Prompt::DecoratePromptLeptonImproved::initializeDecorators ( )
private

Definition at line 258 of file DecoratePromptLeptonImproved.cxx.

259{
260 std::string inputContName;
261 if (m_leptonsName == "Electrons") {
262 inputContName = m_electronsKey.key();
263 }
264 else if (m_leptonsName == "Muons") {
265 inputContName = m_muonsKey.key();
266 }
267 else {
268 ATH_MSG_ERROR ("LeptonContainerName was " << m_leptonsName <<
269 "; must be either Electrons or Muons");
270 return StatusCode::FAILURE;
271 }
272
273 DecorMap_t vetoedVars;
274 for(const std::string &vvar: m_vetoDecoratorFloatVars) {
275 const Def::Var vkey = m_vars->registerDynamicVar(vvar);
276
277 if(vkey == Def::NONE) {
278 ATH_MSG_ERROR("Failed to create key for variable name=" << vvar);
279 return StatusCode::FAILURE;
280 }
281
282 vetoedVars.try_emplace (vkey, 0);
283 }
284 for(const std::string &vvar: m_vetoDecoratorShortVars) {
285 const Def::Var vkey = m_vars->registerDynamicVar(vvar);
286
287 if(vkey == Def::NONE) {
288 ATH_MSG_ERROR("Failed to create key for variable name=" << vvar);
289 return StatusCode::FAILURE;
290 }
291
292 vetoedVars.try_emplace (vkey, 0);
293 }
294
295 //
296 // Fill short variable map
297 //
298 for(Prompt::Def::Var &var: m_intVars) {
299 if (!vetoedVars.contains (var)) {
300 m_shortDecorMap.try_emplace (var, m_shortDecorHandleKeys.size());
301 m_shortDecorHandleKeys.push_back (SG::makeContDecorKey (inputContName, m_inputVarDecoratePrefix + m_vars->asStr(var)));
302 }
303 }
304
305 //
306 // Fill float variable map
307 //
309 for(Prompt::Def::Var &var: m_floatVars) {
310 if (!vetoedVars.contains (var)) {
311 m_floatDecorMap.try_emplace (var, m_floatDecorHandleKeys.size());
312 m_floatDecorHandleKeys.push_back (SG::makeContDecorKey (inputContName, m_inputVarDecoratePrefix + m_vars->asStr(var)));
313 }
314 }
315
316 //
317 // Fill additional variables
318 //
319 if (!vetoedVars.contains (m_BDTVarKey)) {
321 m_floatDecorHandleKeys.push_back (SG::makeContDecorKey (inputContName, m_BDTName));
322 }
323
324 for(const std::string &evar: m_extraDecoratorFloatVars) {
325 const Def::Var ekey = m_vars->registerDynamicVar(evar);
326
327 if(ekey == Def::NONE) {
328 ATH_MSG_ERROR("Failed to create key for variable name=" << evar);
329 return StatusCode::FAILURE;
330 }
331
332 if (!vetoedVars.contains (ekey)) {
333 m_floatDecorMap.try_emplace (ekey, m_floatDecorHandleKeys.size());
334 m_floatDecorHandleKeys.push_back (SG::makeContDecorKey (inputContName, m_inputVarDecoratePrefix + evar));
335 }
336 }
337
338 for(const std::string &evar: m_extraDecoratorShortVars) {
339 const Def::Var ekey = m_vars->registerDynamicVar(evar);
340
341 if(ekey == Def::NONE) {
342 ATH_MSG_ERROR("Failed to create key for variable name=" << evar);
343 return StatusCode::FAILURE;
344 }
345
346 if (!vetoedVars.contains (ekey)) {
347 m_shortDecorMap.try_emplace (ekey, m_shortDecorHandleKeys.size());
348 m_shortDecorHandleKeys.push_back (SG::makeContDecorKey (inputContName, m_inputVarDecoratePrefix + evar));
349 }
350 }
351
352 ATH_CHECK(m_shortDecorHandleKeys.initialize());
353 ATH_CHECK(m_floatDecorHandleKeys.initialize());
354
355 // Print decorator counts
356 ATH_MSG_DEBUG("Added " << m_shortDecorHandleKeys.size() << " short decorators");
357 ATH_MSG_DEBUG("Added " << m_floatDecorHandleKeys.size() << " float decorators");
358
359 // Instantiate MVA X bin
360 if(m_leptonPtBinsVector.size() < 2) {
361 ATH_MSG_ERROR("Invalid PtBins size=" << m_leptonPtBinsVector.size());
362 return StatusCode::FAILURE;
363 }
364
365 std::unique_ptr<double []> PtBins = std::make_unique<double []>(m_leptonPtBinsVector.size());
366
367 for(unsigned i = 0; i < m_leptonPtBinsVector.size(); i++) {
368 PtBins[i] = m_leptonPtBinsVector[i];
369 }
370
371 m_leptonPtBinHist = std::make_unique<TH1D>("PtBin", "PtBin", m_leptonPtBinsVector.size() - 1, PtBins.get());
372
373 return StatusCode::SUCCESS;
374}
Gaudi::Property< std::vector< double > > m_leptonPtBinsVector
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorShortVars
std::unordered_map< Def::Var, size_t > DecorMap_t
Gaudi::Property< std::vector< std::string > > m_extraDecoratorShortVars
Gaudi::Property< std::string > m_inputVarDecoratePrefix
Gaudi::Property< std::vector< std::string > > m_extraDecoratorFloatVars
Gaudi::Property< std::vector< std::string > > m_vetoDecoratorFloatVars
std::string makeContDecorKey(const std::string &cont, const std::string &decor)
Make a StoreGate key from container and decoration name.

◆ initializeTMVAReader()

bool Prompt::DecoratePromptLeptonImproved::initializeTMVAReader ( )
private

Definition at line 216 of file DecoratePromptLeptonImproved.cxx.

217{
218 //
219 // Make new instance of TMVA Reader and add variables
220 //
221 m_TMVAReader = std::make_unique<TMVA::Reader>();
222
223 for(unsigned i = 0; i < m_allVars.size(); ++i) {
224 m_TMVAReader->AddVariable(m_vars->asStr(m_allVars.at(i)), &m_varTMVA[i]);
225 }
226
227 //
228 // Get path to xml training file
229 //
230 std::string fullPathToFile = PathResolverFindCalibFile("JetTagNonPromptLepton/"
232 + "/TMVAClassification_" + m_methodTitleMVA + ".weights.xml");
233
234 if(!m_configPathOverride.empty()) {
235 ATH_MSG_INFO("Override path resolver result");
236 fullPathToFile = m_configPathOverride;
237 }
238
239 ATH_MSG_INFO("TMVA configuration file: " + fullPathToFile);
240 ATH_MSG_INFO("TMVA method name: " + m_methodTitleMVA);
241
242 //
243 // Book an instance of BDT reader if path is available
244 //
245 if(fullPathToFile == "") {
246 ATH_MSG_ERROR("Could not find path to xml training file");
247 return false;
248 }
249 else {
250 m_TMVAReader->BookMVA(m_methodTitleMVA.toString(), fullPathToFile);
251 }
252
253 return true;
254}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Gaudi::Property< std::string > m_configFileVersion
Gaudi::Property< std::string > m_configPathOverride

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_accessDeepSecondaryVertex

std::optional<AccessVertex> Prompt::DecoratePromptLeptonImproved::m_accessDeepSecondaryVertex
private

Definition at line 212 of file DecoratePromptLeptonImproved.h.

◆ m_accessorRNNVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_accessorRNNVars {this, "accessorRNNVars", {}, "Name of the RNN accessor of the lepton"}
private

Definition at line 159 of file DecoratePromptLeptonImproved.h.

159{this, "accessorRNNVars", {}, "Name of the RNN accessor of the lepton"};

◆ m_accessRNNMap

floatAccessorMap Prompt::DecoratePromptLeptonImproved::m_accessRNNMap
private

Definition at line 214 of file DecoratePromptLeptonImproved.h.

◆ m_allVars

std::vector<Prompt::Def::Var> Prompt::DecoratePromptLeptonImproved::m_allVars
private

Definition at line 203 of file DecoratePromptLeptonImproved.h.

◆ m_BDTName

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_BDTName {this, "BDTName", "", "BDT name"}
private

Definition at line 156 of file DecoratePromptLeptonImproved.h.

156{this, "BDTName", "", "BDT name"};

◆ m_BDTVarKey

Prompt::Def::Var Prompt::DecoratePromptLeptonImproved::m_BDTVarKey
private

Definition at line 207 of file DecoratePromptLeptonImproved.h.

◆ m_clusterContainerKey

SG::ReadHandleKey<xAOD::CaloClusterContainer> Prompt::DecoratePromptLeptonImproved::m_clusterContainerKey
private
Initial value:
{
this, "ClusterContainerName", "",
"Container name of the Clusters which are used to calculate the input variables for the PromptLeptonImproved"
}

Definition at line 185 of file DecoratePromptLeptonImproved.h.

185 {
186 this, "ClusterContainerName", "",
187 "Container name of the Clusters which are used to calculate the input variables for the PromptLeptonImproved"
188 };

◆ m_configFileVersion

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_configFileVersion {this, "ConfigFileVersion", "", "BDT weight file version"}
private

Definition at line 153 of file DecoratePromptLeptonImproved.h.

153{this, "ConfigFileVersion", "", "BDT weight file version"};

◆ m_configPathOverride

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_configPathOverride {this, "ConfigPathOverride", "", "Path of the local BDT weight file you want to study/test"}
private

Definition at line 154 of file DecoratePromptLeptonImproved.h.

154{this, "ConfigPathOverride", "", "Path of the local BDT weight file you want to study/test"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_elecMinCalErelConeSize

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_elecMinCalErelConeSize {this, "ElecMinCalErelConeSize", 0.15, "Cut of the cluster for calculating the core energy of the lepton"}
private

Definition at line 175 of file DecoratePromptLeptonImproved.h.

175{this, "ElecMinCalErelConeSize", 0.15, "Cut of the cluster for calculating the core energy of the lepton"};

◆ m_electronsKey

SG::ReadHandleKey<xAOD::ElectronContainer> Prompt::DecoratePromptLeptonImproved::m_electronsKey
private
Initial value:
{
this, "ElectronContainerKey", "Electrons",
"Container's name of the electrons that you want to decorate"
}

Definition at line 190 of file DecoratePromptLeptonImproved.h.

190 {
191 this, "ElectronContainerKey", "Electrons",
192 "Container's name of the electrons that you want to decorate"
193 };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extraDecoratorFloatVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_extraDecoratorFloatVars {this, "extraDecoratorFloatVars", {}, "Extra float variables' names you want to compute and decorate into the lepton"}
private

Definition at line 162 of file DecoratePromptLeptonImproved.h.

162{this, "extraDecoratorFloatVars", {}, "Extra float variables' names you want to compute and decorate into the lepton"};

◆ m_extraDecoratorShortVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_extraDecoratorShortVars {this, "extraDecoratorShortVars", {}, "Extra short variables' names you want to compute and decorate into the lepton"}
private

Definition at line 163 of file DecoratePromptLeptonImproved.h.

163{this, "extraDecoratorShortVars", {}, "Extra short variables' names you want to compute and decorate into the lepton"};

◆ m_floatDecorHandleKeys

SG::WriteDecorHandleKeyArray<xAOD::IParticleContainer> Prompt::DecoratePromptLeptonImproved::m_floatDecorHandleKeys { this, "FloatDecorHandleKeys", {} }
private

Definition at line 223 of file DecoratePromptLeptonImproved.h.

224{ this, "FloatDecorHandleKeys", {} };

◆ m_floatDecorMap

DecorMap_t Prompt::DecoratePromptLeptonImproved::m_floatDecorMap
private

Definition at line 229 of file DecoratePromptLeptonImproved.h.

◆ m_floatVars

std::vector<Prompt::Def::Var> Prompt::DecoratePromptLeptonImproved::m_floatVars
private

Definition at line 202 of file DecoratePromptLeptonImproved.h.

◆ m_inputVarDecoratePrefix

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_inputVarDecoratePrefix {this, "InputVarDecoratePrefix", "", "Prefix of the variables that will be decorated into the lepton"}
private

Definition at line 155 of file DecoratePromptLeptonImproved.h.

155{this, "InputVarDecoratePrefix", "", "Prefix of the variables that will be decorated into the lepton"};

◆ m_intVars

std::vector<Prompt::Def::Var> Prompt::DecoratePromptLeptonImproved::m_intVars
private

Definition at line 201 of file DecoratePromptLeptonImproved.h.

◆ m_leptonPtBinHist

std::unique_ptr<TH1D> Prompt::DecoratePromptLeptonImproved::m_leptonPtBinHist
private

Definition at line 216 of file DecoratePromptLeptonImproved.h.

◆ m_leptonPtBinsVector

Gaudi::Property<std::vector<double> > Prompt::DecoratePromptLeptonImproved::m_leptonPtBinsVector {this, "leptonPtBinsVector", {}, "pT bin edges that are used for MVABin calculation"}
private

Definition at line 166 of file DecoratePromptLeptonImproved.h.

166{this, "leptonPtBinsVector", {}, "pT bin edges that are used for MVABin calculation"};

◆ m_leptonsName

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_leptonsName
private
Initial value:
{
this, "LeptonContainerName", "",
"Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
}

Definition at line 148 of file DecoratePromptLeptonImproved.h.

148 {
149 this, "LeptonContainerName", "",
150 "Container's name of the lepton that you want to decorate. Also need to set ElectronContainerKey or MuonContainerKey accordingly"
151 };

◆ m_maxLepTrackJetDR

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_maxLepTrackJetDR {this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"}
private

Definition at line 176 of file DecoratePromptLeptonImproved.h.

176{this, "maxLepTrackJetDR", 0.4, "Maximum distance between lepton and track jet for track jet matching"};

◆ m_methodTitleMVA

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_methodTitleMVA {this, "MethodTitleMVA", "BDT", "Help to config the path of the BDT xml file"}
private

Definition at line 157 of file DecoratePromptLeptonImproved.h.

157{this, "MethodTitleMVA", "BDT", "Help to config the path of the BDT xml file"};

◆ m_muonsKey

SG::ReadHandleKey<xAOD::MuonContainer> Prompt::DecoratePromptLeptonImproved::m_muonsKey
private
Initial value:
{
this, "MuonContainerKey", "Muons",
"Container's name of the muons that you want to decorate"
}

Definition at line 194 of file DecoratePromptLeptonImproved.h.

194 {
195 this, "MuonContainerKey", "Muons",
196 "Container's name of the muons that you want to decorate"
197 };

◆ m_primaryVertexKey

SG::ReadHandleKey<xAOD::VertexContainer> Prompt::DecoratePromptLeptonImproved::m_primaryVertexKey
private
Initial value:
{
this, "PrimaryVertexContainerName", "", "Primary vertex container name"
}

Definition at line 182 of file DecoratePromptLeptonImproved.h.

182 {
183 this, "PrimaryVertexContainerName", "", "Primary vertex container name"
184 };

◆ m_printTime

Gaudi::Property<bool> Prompt::DecoratePromptLeptonImproved::m_printTime {this, "PrintTime", false, "Whether to print current time"}
private

Definition at line 168 of file DecoratePromptLeptonImproved.h.

168{this, "PrintTime", false, "Whether to print current time"};

◆ m_shortDecorHandleKeys

SG::WriteDecorHandleKeyArray<xAOD::IParticleContainer> Prompt::DecoratePromptLeptonImproved::m_shortDecorHandleKeys { this, "ShortDecorHandleKeys", {} }
private

Definition at line 225 of file DecoratePromptLeptonImproved.h.

226{ this, "ShortDecorHandleKeys", {} };

◆ m_shortDecorMap

DecorMap_t Prompt::DecoratePromptLeptonImproved::m_shortDecorMap
private

Definition at line 230 of file DecoratePromptLeptonImproved.h.

◆ m_stringFloatVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_stringFloatVars {this, "stringFloatVars", {}, "Vector of the BDT float variables' names and they will be decorated into lepton if not in the veto list"}
private

Definition at line 161 of file DecoratePromptLeptonImproved.h.

161{this, "stringFloatVars", {}, "Vector of the BDT float variables' names and they will be decorated into lepton if not in the veto list"};

◆ m_stringIntVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_stringIntVars {this, "stringIntVars", {}, "Vector of the BDT int variables' names and they will be decorated into lepton if not in the veto list"}
private

Definition at line 160 of file DecoratePromptLeptonImproved.h.

160{this, "stringIntVars", {}, "Vector of the BDT int variables' names and they will be decorated into lepton if not in the veto list"};

◆ m_timerAll

TStopwatch Prompt::DecoratePromptLeptonImproved::m_timerAll
private

Definition at line 218 of file DecoratePromptLeptonImproved.h.

◆ m_timerElec

TStopwatch Prompt::DecoratePromptLeptonImproved::m_timerElec
private

Definition at line 221 of file DecoratePromptLeptonImproved.h.

◆ m_timerExec

TStopwatch Prompt::DecoratePromptLeptonImproved::m_timerExec
private

Definition at line 219 of file DecoratePromptLeptonImproved.h.

◆ m_timerMuon

TStopwatch Prompt::DecoratePromptLeptonImproved::m_timerMuon
private

Definition at line 220 of file DecoratePromptLeptonImproved.h.

◆ m_TMVAReader

std::unique_ptr<TMVA::Reader> Prompt::DecoratePromptLeptonImproved::m_TMVAReader
private

Definition at line 209 of file DecoratePromptLeptonImproved.h.

◆ m_trackJetsKey

SG::ReadHandleKey<xAOD::JetContainer> Prompt::DecoratePromptLeptonImproved::m_trackJetsKey
private
Initial value:
{
this, "TrackJetContainerName", "", "Track Jet container name"
}

Definition at line 179 of file DecoratePromptLeptonImproved.h.

179 {
180 this, "TrackJetContainerName", "", "Track Jet container name"
181 };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vars

std::unique_ptr<Prompt::VarHolder> Prompt::DecoratePromptLeptonImproved::m_vars
private

Definition at line 205 of file DecoratePromptLeptonImproved.h.

◆ m_varTMVA

std::vector<Float_t> Prompt::DecoratePromptLeptonImproved::m_varTMVA
private

Definition at line 210 of file DecoratePromptLeptonImproved.h.

◆ m_vertexBarrEcapAbsEtaAt

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_vertexBarrEcapAbsEtaAt {this, "VertexBarrEcapAbsEtaAt", 1.37, "Relate to the vertex cut above, define the barrel and central electrons by abs(eta)"}
private

Definition at line 174 of file DecoratePromptLeptonImproved.h.

174{this, "VertexBarrEcapAbsEtaAt", 1.37, "Relate to the vertex cut above, define the barrel and central electrons by abs(eta)"};

◆ m_vertexLinkName

Gaudi::Property<std::string> Prompt::DecoratePromptLeptonImproved::m_vertexLinkName {this, "VertexLinkName", "", "ElementLink name of the secondary vertices"}
private

Definition at line 170 of file DecoratePromptLeptonImproved.h.

170{this, "VertexLinkName", "", "ElementLink name of the secondary vertices"};

◆ m_vertexMinChiSquaredProb

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_vertexMinChiSquaredProb {this, "VertexMinChiSquaredProb", 0.03, "Vertex chi2 cut"}
private

Definition at line 171 of file DecoratePromptLeptonImproved.h.

171{this, "VertexMinChiSquaredProb", 0.03, "Vertex chi2 cut"};

◆ m_vertexMinThetaBarrElec

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_vertexMinThetaBarrElec {this, "VertexMinThetaBarrElec", 0.002, "Vertex theta between lepton and the direction of sv-pv cut for barrel electrons"}
private

Definition at line 172 of file DecoratePromptLeptonImproved.h.

172{this, "VertexMinThetaBarrElec", 0.002, "Vertex theta between lepton and the direction of sv-pv cut for barrel electrons"};

◆ m_vertexMinThetaEcapElec

Gaudi::Property<double> Prompt::DecoratePromptLeptonImproved::m_vertexMinThetaEcapElec {this, "VertexMinThetaEcapElec", 0.001, "Vertex theta between lepton and the direction of sv-pv cut for central electrons"}
private

Definition at line 173 of file DecoratePromptLeptonImproved.h.

173{this, "VertexMinThetaEcapElec", 0.001, "Vertex theta between lepton and the direction of sv-pv cut for central electrons"};

◆ m_vetoDecoratorFloatVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_vetoDecoratorFloatVars {this, "vetoDecoratorFloatVars", {}, "Vector of the float variables' names you do not want to save"}
private

Definition at line 164 of file DecoratePromptLeptonImproved.h.

164{this, "vetoDecoratorFloatVars", {}, "Vector of the float variables' names you do not want to save"};

◆ m_vetoDecoratorShortVars

Gaudi::Property<std::vector<std::string> > Prompt::DecoratePromptLeptonImproved::m_vetoDecoratorShortVars {this, "vetoDecoratorShortVars", {}, "Vector of the short variables' names you do not want to save"}
private

Definition at line 165 of file DecoratePromptLeptonImproved.h.

165{this, "vetoDecoratorShortVars", {}, "Vector of the short variables' names you do not want to save"};

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: