ATLAS Offline Software
Loading...
Searching...
No Matches
met::METMakerAlg Class Reference

#include <METMakerAlg.h>

Inheritance diagram for met::METMakerAlg:
Collaboration diagram for met::METMakerAlg:

Public Member Functions

virtual ~METMakerAlg ()
 Destructor:
virtual StatusCode initialize () override
 Athena algorithm's Hooks.
virtual StatusCode execute (const EventContext &ctx) const override
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 accept (const xAOD::Electron *el) const
virtual bool accept (const xAOD::Photon *ph) const
virtual bool accept (const xAOD::TauJet *tau) const
virtual bool accept (const xAOD::Muon *muon) const
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.

Protected Attributes

Gaudi::Property< std::string > m_softclname {this, "METSoftClName", "SoftClus"}
Gaudi::Property< std::string > m_softtrkname {this, "METSoftTrkName", "PVSoftTrk"}
SG::ReadHandleKey< xAOD::ElectronContainerm_ElectronContainerKey {this, "InputElectrons", "Electrons"}
SG::ReadHandleKey< xAOD::PhotonContainerm_PhotonContainerKey {this, "InputPhotons", "Photons"}
SG::ReadHandleKey< xAOD::TauJetContainerm_TauJetContainerKey {this, "InputTaus", "TauJets"}
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey {this, "InputMuons", "Muons"}
SG::ReadHandleKey< xAOD::JetContainerm_JetContainerKey {this, "InputJets", "AntiKt4LCTopoJets"}
SG::ReadHandleKey< xAOD::MissingETContainerm_CoreMetKey {this, "METCoreName", "MET_Core"}
SG::WriteHandleKey< xAOD::MissingETContainerm_metKey {this, "METName", "MET_Reference", "MET container"}
SG::ReadHandleKey< xAOD::MissingETAssociationMapm_metMapKey {this, "METMapName", "METAssoc"}
Gaudi::Property< boolm_doTruthLep {this, "DoTruthLeptons", false}
ToolHandle< IMETMakerm_metmaker {this, "Maker", "Maker"}
 Athena configured tools.
ToolHandle< CP::IMuonSelectionToolm_muonSelTool {this, "MuonSelectionTool", "MuonSelectionTool"}
ToolHandle< IAsgElectronLikelihoodToolm_elecSelLHTool {this, "ElectronLHSelectionTool", "ElectronLHSelectionTool"}
ToolHandle< IAsgPhotonIsEMSelectorm_photonSelIsEMTool {this, "PhotonIsEMSelectionTool", "PhotonIsEMSelectionTool"}
ToolHandle< TauAnalysisTools::ITauSelectionToolm_tauSelTool {this, "TauSelectionTool", "TauSelectionTool"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

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 42 of file METMakerAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~METMakerAlg()

met::METMakerAlg::~METMakerAlg ( )
virtualdefault

Destructor:

Member Function Documentation

◆ accept() [1/4]

bool met::METMakerAlg::accept ( const xAOD::Electron * el) const
protectedvirtual

Definition at line 253 of file METMakerAlg.cxx.

254 {
255 if( fabs(el->eta())>2.47 || el->pt()<10e3 ) return false;
256 return static_cast<bool> (m_elecSelLHTool->accept(el));
257 }
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelLHTool
Definition METMakerAlg.h:85

◆ accept() [2/4]

bool met::METMakerAlg::accept ( const xAOD::Muon * muon) const
protectedvirtual

Definition at line 247 of file METMakerAlg.cxx.

248 {
249 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 ) return false;
250 return static_cast<bool>(m_muonSelTool->accept(*mu));
251 }
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Definition METMakerAlg.h:84

◆ accept() [3/4]

bool met::METMakerAlg::accept ( const xAOD::Photon * ph) const
protectedvirtual

Definition at line 259 of file METMakerAlg.cxx.

260 {
261 if( !(ph->author()&20) || fabs(ph->eta())>2.47 || ph->pt()<10e3 ) return false;
262 return static_cast<bool> (m_photonSelIsEMTool->accept(ph));
263 }
ToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMTool
Definition METMakerAlg.h:86
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
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.

◆ accept() [4/4]

bool met::METMakerAlg::accept ( const xAOD::TauJet * tau) const
protectedvirtual

Definition at line 265 of file METMakerAlg.cxx.

266 {
267 return static_cast<bool>(m_tauSelTool->accept( *tau ));
268 }
ToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelTool
Definition METMakerAlg.h:87

◆ 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>

◆ 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 met::METMakerAlg::execute ( const EventContext & ctx) const
overridevirtual

MET

Jets

Electrons

Photons

Taus

Muons

Definition at line 79 of file METMakerAlg.cxx.

79 {
80 ATH_MSG_VERBOSE("Executing " << name() << "...");
81
82 // Create a MissingETContainer with its aux store
83 auto metHandle= SG::makeHandle (m_metKey,ctx);
84 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(),
85 std::make_unique<xAOD::MissingETAuxContainer>()) );
86 xAOD::MissingETContainer* newMet=metHandle.ptr();
87
88 SG::ReadHandle<xAOD::MissingETAssociationMap> metMap(m_metMapKey, ctx);
89 if (!metMap.isValid()) {
90 ATH_MSG_WARNING("Unable to retrieve MissingETAssociationMap: " << m_metMapKey.key());
91 return StatusCode::FAILURE;
92 }
93
94 MissingETAssociationHelper metHelper(&(*metMap));
95 // Retrieve containers ***********************************************
96
98 SG::ReadHandle<xAOD::MissingETContainer> coreMet(m_CoreMetKey, ctx);
99 if (!coreMet.isValid()) {
100 ATH_MSG_WARNING("Unable to retrieve MissingETContainer: " << m_CoreMetKey.key());
101 return StatusCode::FAILURE;
102 }
103
104
106 SG::ReadHandle<xAOD::JetContainer> Jets(m_JetContainerKey, ctx);
107 if (!Jets.isValid()) {
108 ATH_MSG_WARNING("Unable to retrieve JetContainer: " << Jets.key());
109 return StatusCode::FAILURE;
110 }
111
113 SG::ReadHandle<xAOD::ElectronContainer> Electrons(m_ElectronContainerKey, ctx);
114 if (!Electrons.isValid()) {
115 ATH_MSG_WARNING("Unable to retrieve ElectronContainer: " << Electrons.key());
116 return StatusCode::FAILURE;
117 }
118
120 SG::ReadHandle<xAOD::PhotonContainer> Gamma(m_PhotonContainerKey, ctx);
121 if (!Gamma.isValid()) {
122 ATH_MSG_WARNING("Unable to retrieve GammaContainer: " << Gamma.key());
123 return StatusCode::FAILURE;
124 }
125
127 SG::ReadHandle<xAOD::TauJetContainer> TauJets(m_TauJetContainerKey, ctx);
128 if (!TauJets.isValid()) {
129 ATH_MSG_WARNING("Unable to retrieve TauJetContainer: " << TauJets.key());
130 return StatusCode::FAILURE;
131 }
132
134 SG::ReadHandle<xAOD::MuonContainer> Muons(m_MuonContainerKey, ctx);
135 if (!Muons.isValid()) {
136 ATH_MSG_WARNING("Unable to retrieve MuonContainer: " << Muons.key());
137 return StatusCode::FAILURE;
138 }
139
140 // Select and flag objects for final MET building ***************************
141
144 // Electrons
145 if(!m_ElectronContainerKey.empty()) {
146 ConstDataVector<ElectronContainer> metElectrons(SG::VIEW_ELEMENTS);
147 for(const auto *const el : *Electrons) {
148 if(accept(el)) {
149 metElectrons.push_back(el);
150
151 }
152 }
153 if( m_metmaker->rebuildMET("RefEle", xAOD::Type::Electron, newMet,
154 metElectrons.asDataVector(),
155 metHelper, objScale).isFailure() ) {
156 ATH_MSG_WARNING("Failed to build electron term.");
157 }
158 ATH_MSG_DEBUG("Selected " << metElectrons.size() << " MET electrons. "
159 << getMETElements(*(*newMet)["RefEle"]).size() << " are non-overlapping.");
160 }
161
162 // Photons
163 if(!m_PhotonContainerKey.empty()) {
164 ConstDataVector<PhotonContainer> metPhotons(SG::VIEW_ELEMENTS);
165 for(const auto *const ph : *Gamma) {
166 if(accept(ph)) {
167 metPhotons.push_back(ph);
168 }
169 }
170 if( m_metmaker->rebuildMET("RefGamma", xAOD::Type::Photon, newMet,
171 metPhotons.asDataVector(),
172 metHelper, objScale).isFailure() ) {
173 ATH_MSG_WARNING("Failed to build photon term.");
174 }
175 ATH_MSG_DEBUG("Selected " << metPhotons.size() << " MET photons. "
176 << getMETElements(*(*newMet)["RefGamma"]).size() << " are non-overlapping.");
177 }
178
179 // Taus
180 if(!m_TauJetContainerKey.empty()) {
181 ConstDataVector<TauJetContainer> metTaus(SG::VIEW_ELEMENTS);
182 for(const auto *const tau : *TauJets) {
183 if(accept(tau)) {
184 metTaus.push_back(tau);
185 }
186 }
187 if( m_metmaker->rebuildMET("RefTau", xAOD::Type::Tau, newMet,
188 metTaus.asDataVector(),
189 metHelper, objScale).isFailure() ){
190 ATH_MSG_WARNING("Failed to build tau term.");
191 }
192 ATH_MSG_DEBUG("Selected " << metTaus.size() << " MET taus. "
193 << getMETElements(*(*newMet)["RefTau"]).size() << " are non-overlapping.");
194 }
195
196 // Muons
197 if(!m_MuonContainerKey.empty()) {
198 ConstDataVector<MuonContainer> metMuons(SG::VIEW_ELEMENTS);
199 for(const auto *const mu : *Muons) {
200 if(accept(mu)) {
201 metMuons.push_back(mu);
202 }
203 }
204
206 if( m_metmaker->rebuildMET("Muons", xAOD::Type::Muon, newMet,
207 metMuons.asDataVector(),
208 metHelper, objScale).isFailure() ) {
209 ATH_MSG_WARNING("Failed to build muon term.");
210 }
211 ATH_MSG_DEBUG("Selected " << metMuons.size() << " MET muons. "
212 << getMETElements(*(*newMet)["Muons"]).size() << " are non-overlapping.");
213 }
214
215 if( m_metmaker->rebuildJetMET("RefJet", m_softclname, m_softtrkname, newMet,
216 Jets.cptr(), coreMet.cptr(), metHelper, false ).isFailure() ) {
217 ATH_MSG_WARNING("Failed to build jet and soft terms.");
218 }
219 ATH_MSG_DEBUG("Of " << Jets.cptr()->size() << " jets, "
220 << getMETElements(*(*newMet)["RefJet"]).size() << " are non-overlapping, "
221 << getMETElements(*(*newMet)[m_softtrkname]).size() << " are soft");
222
223 auto jets_and_weights = getMETElementsWeights<xAOD::Jet>(*(*newMet)["RefJet"]);
224 for (const auto& [jet, weight] : jets_and_weights) {
225 ATH_MSG_VERBOSE(" Jet " << jet->index() << " with pt " << jet->pt()
226 << " contributes with weight " <<weight
227 );
228 }
229
230
232 if((*newMet)[m_softtrkname]) trksource = (*newMet)[m_softtrkname]->source();
233 if( buildMETSum("FinalTrk", newMet, trksource).isFailure() ){
234 ATH_MSG_WARNING("Building MET FinalTrk sum failed.");
235 }
237 if((*newMet)[m_softclname]) clsource = (*newMet)[m_softclname]->source();
238 if( buildMETSum("FinalClus", newMet, clsource).isFailure() ) {
239 ATH_MSG_WARNING("Building MET FinalClus sum failed.");
240 }
241
242 return StatusCode::SUCCESS;
243 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
size_t size() const
Number of registered mappings.
virtual bool accept(const xAOD::Electron *el) const
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
Definition METMakerAlg.h:69
Gaudi::Property< bool > m_doTruthLep
Definition METMakerAlg.h:79
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
Definition METMakerAlg.h:75
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition METMakerAlg.h:70
Gaudi::Property< std::string > m_softclname
Definition METMakerAlg.h:64
Gaudi::Property< std::string > m_softtrkname
Definition METMakerAlg.h:65
ToolHandle< IMETMaker > m_metmaker
Athena configured tools.
Definition METMakerAlg.h:82
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_metMapKey
Definition METMakerAlg.h:76
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
Definition METMakerAlg.h:68
SG::ReadHandleKey< xAOD::JetContainer > m_JetContainerKey
Definition METMakerAlg.h:71
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition METMakerAlg.h:67
SG::ReadHandleKey< xAOD::MissingETContainer > m_CoreMetKey
Definition METMakerAlg.h:73
uint64_t bitmask_t
Type for status word bit mask.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
template std::vector< std::pair< const xAOD::Jet *, float > > getMETElementsWeights< xAOD::Jet >(const xAOD::MissingET &met)
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
std::vector< const T * > getMETElements(const xAOD::MissingET &met)
@ Photon
The object is a photon.
Definition ObjectType.h:47
@ Muon
The object is a muon.
Definition ObjectType.h:48
@ Electron
The object is an electron.
Definition ObjectType.h:46
@ Tau
The object is a tau (jet).
Definition ObjectType.h:49
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.

◆ 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.

◆ 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 met::METMakerAlg::finalize ( )
overridevirtual

Definition at line 72 of file METMakerAlg.cxx.

72 {
73 ATH_MSG_INFO ("Finalizing " << name() << "...");
74 return StatusCode::SUCCESS;
75 }
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode met::METMakerAlg::initialize ( )
overridevirtual

Athena algorithm's Hooks.

Definition at line 29 of file METMakerAlg.cxx.

29 {
30 ATH_MSG_INFO("Initializing " << name() << "...");
31 ATH_MSG_INFO("Retrieving tools...");
32
33 // retrieve tools
34 if( m_metmaker.retrieve().isFailure() ) {
35 ATH_MSG_ERROR("Failed to retrieve tool: " << m_metmaker->name());
36 return StatusCode::FAILURE;
37 };
38
39 if( m_muonSelTool.retrieve().isFailure() ) {
40 ATH_MSG_ERROR("Failed to retrieve tool: " << m_muonSelTool->name());
41 return StatusCode::FAILURE;
42 };
43
44 if( m_elecSelLHTool.retrieve().isFailure() ) {
45 ATH_MSG_ERROR("Failed to retrieve tool: " << m_elecSelLHTool->name());
46 return StatusCode::FAILURE;
47 };
48
49 if( m_photonSelIsEMTool.retrieve().isFailure() ) {
50 ATH_MSG_ERROR("Failed to retrieve tool: " << m_photonSelIsEMTool->name());
51 return StatusCode::FAILURE;
52 };
53
54 if( m_tauSelTool.retrieve().isFailure() ) {
55 ATH_MSG_ERROR("Failed to retrieve tool: " << m_tauSelTool->name());
56 return StatusCode::FAILURE;
57 };
58 ATH_CHECK( m_ElectronContainerKey.initialize() );
59 ATH_CHECK( m_PhotonContainerKey.initialize() );
60 ATH_CHECK( m_TauJetContainerKey.initialize() );
61 ATH_CHECK( m_MuonContainerKey.initialize() );
62 ATH_CHECK( m_JetContainerKey.initialize() );
63 ATH_CHECK( m_CoreMetKey.initialize() );
64 ATH_CHECK( m_metKey.initialize() );
65 ATH_CHECK( m_metMapKey.initialize() );
66
67 return StatusCode::SUCCESS;
68 }
#define ATH_MSG_ERROR(x,...)

◆ 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 }

◆ 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_CoreMetKey

SG::ReadHandleKey<xAOD::MissingETContainer> met::METMakerAlg::m_CoreMetKey {this, "METCoreName", "MET_Core"}
protected

Definition at line 73 of file METMakerAlg.h.

73{this, "METCoreName", "MET_Core"};

◆ 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_doTruthLep

Gaudi::Property<bool> met::METMakerAlg::m_doTruthLep {this, "DoTruthLeptons", false}
protected

Definition at line 79 of file METMakerAlg.h.

79{this, "DoTruthLeptons", false};

◆ m_elecSelLHTool

ToolHandle<IAsgElectronLikelihoodTool> met::METMakerAlg::m_elecSelLHTool {this, "ElectronLHSelectionTool", "ElectronLHSelectionTool"}
protected

Definition at line 85 of file METMakerAlg.h.

85{this, "ElectronLHSelectionTool", "ElectronLHSelectionTool"};

◆ m_ElectronContainerKey

SG::ReadHandleKey<xAOD::ElectronContainer> met::METMakerAlg::m_ElectronContainerKey {this, "InputElectrons", "Electrons"}
protected

Definition at line 67 of file METMakerAlg.h.

67{this, "InputElectrons", "Electrons"};

◆ 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_JetContainerKey

SG::ReadHandleKey<xAOD::JetContainer> met::METMakerAlg::m_JetContainerKey {this, "InputJets", "AntiKt4LCTopoJets"}
protected

Definition at line 71 of file METMakerAlg.h.

71{this, "InputJets", "AntiKt4LCTopoJets"};

◆ m_metKey

SG::WriteHandleKey<xAOD::MissingETContainer> met::METMakerAlg::m_metKey {this, "METName", "MET_Reference", "MET container"}
protected

Definition at line 75 of file METMakerAlg.h.

75{this, "METName", "MET_Reference", "MET container"};

◆ m_metmaker

ToolHandle<IMETMaker> met::METMakerAlg::m_metmaker {this, "Maker", "Maker"}
protected

Athena configured tools.

Definition at line 82 of file METMakerAlg.h.

82{this, "Maker", "Maker"};

◆ m_metMapKey

SG::ReadHandleKey<xAOD::MissingETAssociationMap> met::METMakerAlg::m_metMapKey {this, "METMapName", "METAssoc"}
protected

Definition at line 76 of file METMakerAlg.h.

76{this, "METMapName", "METAssoc"};

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> met::METMakerAlg::m_MuonContainerKey {this, "InputMuons", "Muons"}
protected

Definition at line 70 of file METMakerAlg.h.

70{this, "InputMuons", "Muons"};

◆ m_muonSelTool

ToolHandle<CP::IMuonSelectionTool> met::METMakerAlg::m_muonSelTool {this, "MuonSelectionTool", "MuonSelectionTool"}
protected

Definition at line 84 of file METMakerAlg.h.

84{this, "MuonSelectionTool", "MuonSelectionTool"};

◆ m_PhotonContainerKey

SG::ReadHandleKey<xAOD::PhotonContainer> met::METMakerAlg::m_PhotonContainerKey {this, "InputPhotons", "Photons"}
protected

Definition at line 68 of file METMakerAlg.h.

68{this, "InputPhotons", "Photons"};

◆ m_photonSelIsEMTool

ToolHandle<IAsgPhotonIsEMSelector> met::METMakerAlg::m_photonSelIsEMTool {this, "PhotonIsEMSelectionTool", "PhotonIsEMSelectionTool"}
protected

Definition at line 86 of file METMakerAlg.h.

86{this, "PhotonIsEMSelectionTool", "PhotonIsEMSelectionTool"};

◆ m_softclname

Gaudi::Property<std::string> met::METMakerAlg::m_softclname {this, "METSoftClName", "SoftClus"}
protected

Definition at line 64 of file METMakerAlg.h.

64{this, "METSoftClName", "SoftClus"};

◆ m_softtrkname

Gaudi::Property<std::string> met::METMakerAlg::m_softtrkname {this, "METSoftTrkName", "PVSoftTrk"}
protected

Definition at line 65 of file METMakerAlg.h.

65{this, "METSoftTrkName", "PVSoftTrk"};

◆ m_TauJetContainerKey

SG::ReadHandleKey<xAOD::TauJetContainer> met::METMakerAlg::m_TauJetContainerKey {this, "InputTaus", "TauJets"}
protected

Definition at line 69 of file METMakerAlg.h.

69{this, "InputTaus", "TauJets"};

◆ m_tauSelTool

ToolHandle<TauAnalysisTools::ITauSelectionTool> met::METMakerAlg::m_tauSelTool {this, "TauSelectionTool", "TauSelectionTool"}
protected

Definition at line 87 of file METMakerAlg.h.

87{this, "TauSelectionTool", "TauSelectionTool"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ 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: