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

#include <METMakerAlg.h>

Inheritance diagram for met::METMakerAlg:

Public Member Functions

 METMakerAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
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 unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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

std::string m_softclname
std::string m_softtrkname
SG::ReadHandleKey< xAOD::ElectronContainerm_ElectronContainerKey
SG::ReadHandleKey< xAOD::PhotonContainerm_PhotonContainerKey
SG::ReadHandleKey< xAOD::TauJetContainerm_TauJetContainerKey
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey
SG::ReadHandleKey< xAOD::JetContainerm_JetContainerKey
SG::ReadHandleKey< xAOD::MissingETContainerm_CoreMetKey
SG::WriteHandleKey< xAOD::MissingETContainerm_metKey
SG::ReadHandleKey< xAOD::MissingETAssociationMapm_metMapKey
bool m_doTruthLep
ToolHandle< IMETMakerm_metmaker
 Athena configured tools.
ToolHandle< CP::IMuonSelectionToolm_muonSelTool
ToolHandle< IAsgElectronLikelihoodToolm_elecSelLHTool
ToolHandle< IAsgPhotonIsEMSelectorm_photonSelIsEMTool
ToolHandle< TauAnalysisTools::ITauSelectionToolm_tauSelTool

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 41 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 ( const std::string & name,
ISvcLocator * pSvcLocator )

Constructor with parameters:

Definition at line 27 of file METMakerAlg.cxx.

29 : ::AthReentrantAlgorithm( name, pSvcLocator ),
30 m_metKey(""),
31 m_metmaker(this),
32 m_muonSelTool(this,""),
33 m_elecSelLHTool(this,""),
34 m_photonSelIsEMTool(this,""),
35 m_tauSelTool(this,"")
36
37 {
38 declareProperty( "Maker", m_metmaker );
39 declareProperty( "METCoreName", m_CoreMetKey = "MET_Core" );
40 declareProperty("METName", m_metKey = std::string("MET_Reference"),"MET container");
41 declareProperty("METMapName", m_metMapKey = "METAssoc" );
42
43 declareProperty( "METSoftClName", m_softclname = "SoftClus" );
44 declareProperty( "METSoftTrkName", m_softtrkname = "PVSoftTrk" );
45
46 declareProperty( "InputJets", m_JetContainerKey = "AntiKt4LCTopoJets" );
47 declareProperty( "InputElectrons", m_ElectronContainerKey = "Electrons" );
48 declareProperty( "InputPhotons", m_PhotonContainerKey = "Photons" );
49 declareProperty( "InputTaus", m_TauJetContainerKey = "TauJets" );
50 declareProperty( "InputMuons", m_MuonContainerKey = "Muons" );
51
52 declareProperty( "MuonSelectionTool", m_muonSelTool );
53 declareProperty( "ElectronLHSelectionTool", m_elecSelLHTool );
54 declareProperty( "PhotonIsEMSelectionTool" , m_photonSelIsEMTool );
55 declareProperty( "TauSelectionTool", m_tauSelTool );
56
57 declareProperty( "DoTruthLeptons", m_doTruthLep = false );
58
59 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_softclname
Definition METMakerAlg.h:63
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
Definition METMakerAlg.h:69
std::string m_softtrkname
Definition METMakerAlg.h:64
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
Definition METMakerAlg.h:75
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition METMakerAlg.h:70
ToolHandle< IMETMaker > m_metmaker
Athena configured tools.
Definition METMakerAlg.h:82
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Definition METMakerAlg.h:84
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_metMapKey
Definition METMakerAlg.h:76
ToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMTool
Definition METMakerAlg.h:86
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
Definition METMakerAlg.h:68
SG::ReadHandleKey< xAOD::JetContainer > m_JetContainerKey
Definition METMakerAlg.h:71
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelLHTool
Definition METMakerAlg.h:85
ToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelTool
Definition METMakerAlg.h:87
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition METMakerAlg.h:67
SG::ReadHandleKey< xAOD::MissingETContainer > m_CoreMetKey
Definition METMakerAlg.h:73

◆ ~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 291 of file METMakerAlg.cxx.

292 {
293 if( fabs(el->eta())>2.47 || el->pt()<10e3 ) return false;
294 return static_cast<bool> (m_elecSelLHTool->accept(el));
295 }

◆ accept() [2/4]

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

Definition at line 285 of file METMakerAlg.cxx.

286 {
287 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 ) return false;
288 return static_cast<bool>(m_muonSelTool->accept(*mu));
289 }

◆ accept() [3/4]

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

Definition at line 297 of file METMakerAlg.cxx.

298 {
299 if( !(ph->author()&20) || fabs(ph->eta())>2.47 || ph->pt()<10e3 ) return false;
300 return static_cast<bool> (m_photonSelIsEMTool->accept(ph));
301 }
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 303 of file METMakerAlg.cxx.

304 {
305 return static_cast<bool>(m_tauSelTool->accept( *tau ));
306 }

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

62{
63 return 0;
64}

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

◆ 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 117 of file METMakerAlg.cxx.

117 {
118 ATH_MSG_VERBOSE("Executing " << name() << "...");
119
120 // Create a MissingETContainer with its aux store
121 auto metHandle= SG::makeHandle (m_metKey,ctx);
122 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(),
123 std::make_unique<xAOD::MissingETAuxContainer>()) );
124 xAOD::MissingETContainer* newMet=metHandle.ptr();
125
126 SG::ReadHandle<xAOD::MissingETAssociationMap> metMap(m_metMapKey, ctx);
127 if (!metMap.isValid()) {
128 ATH_MSG_WARNING("Unable to retrieve MissingETAssociationMap: " << m_metMapKey.key());
129 return StatusCode::FAILURE;
130 }
131
132 MissingETAssociationHelper metHelper(&(*metMap));
133 // Retrieve containers ***********************************************
134
136 SG::ReadHandle<xAOD::MissingETContainer> coreMet(m_CoreMetKey, ctx);
137 if (!coreMet.isValid()) {
138 ATH_MSG_WARNING("Unable to retrieve MissingETContainer: " << m_CoreMetKey.key());
139 return StatusCode::FAILURE;
140 }
141
142
144 SG::ReadHandle<xAOD::JetContainer> Jets(m_JetContainerKey, ctx);
145 if (!Jets.isValid()) {
146 ATH_MSG_WARNING("Unable to retrieve JetContainer: " << Jets.key());
147 return StatusCode::FAILURE;
148 }
149
151 SG::ReadHandle<xAOD::ElectronContainer> Electrons(m_ElectronContainerKey, ctx);
152 if (!Electrons.isValid()) {
153 ATH_MSG_WARNING("Unable to retrieve ElectronContainer: " << Electrons.key());
154 return StatusCode::FAILURE;
155 }
156
158 SG::ReadHandle<xAOD::PhotonContainer> Gamma(m_PhotonContainerKey, ctx);
159 if (!Gamma.isValid()) {
160 ATH_MSG_WARNING("Unable to retrieve GammaContainer: " << Gamma.key());
161 return StatusCode::FAILURE;
162 }
163
165 SG::ReadHandle<xAOD::TauJetContainer> TauJets(m_TauJetContainerKey, ctx);
166 if (!TauJets.isValid()) {
167 ATH_MSG_WARNING("Unable to retrieve TauJetContainer: " << TauJets.key());
168 return StatusCode::FAILURE;
169 }
170
172 SG::ReadHandle<xAOD::MuonContainer> Muons(m_MuonContainerKey, ctx);
173 if (!Muons.isValid()) {
174 ATH_MSG_WARNING("Unable to retrieve MuonContainer: " << Muons.key());
175 return StatusCode::FAILURE;
176 }
177
178 // Select and flag objects for final MET building ***************************
179
182 // Electrons
183 if(!m_ElectronContainerKey.empty()) {
184 ConstDataVector<ElectronContainer> metElectrons(SG::VIEW_ELEMENTS);
185 for(const auto *const el : *Electrons) {
186 if(accept(el)) {
187 metElectrons.push_back(el);
188
189 }
190 }
191 if( m_metmaker->rebuildMET("RefEle", xAOD::Type::Electron, newMet,
192 metElectrons.asDataVector(),
193 metHelper, objScale).isFailure() ) {
194 ATH_MSG_WARNING("Failed to build electron term.");
195 }
196 ATH_MSG_DEBUG("Selected " << metElectrons.size() << " MET electrons. "
197 << getMETElements(*(*newMet)["RefEle"]).size() << " are non-overlapping.");
198 }
199
200 // Photons
201 if(!m_PhotonContainerKey.empty()) {
202 ConstDataVector<PhotonContainer> metPhotons(SG::VIEW_ELEMENTS);
203 for(const auto *const ph : *Gamma) {
204 if(accept(ph)) {
205 metPhotons.push_back(ph);
206 }
207 }
208 if( m_metmaker->rebuildMET("RefGamma", xAOD::Type::Photon, newMet,
209 metPhotons.asDataVector(),
210 metHelper, objScale).isFailure() ) {
211 ATH_MSG_WARNING("Failed to build photon term.");
212 }
213 ATH_MSG_DEBUG("Selected " << metPhotons.size() << " MET photons. "
214 << getMETElements(*(*newMet)["RefGamma"]).size() << " are non-overlapping.");
215 }
216
217 // Taus
218 if(!m_TauJetContainerKey.empty()) {
219 ConstDataVector<TauJetContainer> metTaus(SG::VIEW_ELEMENTS);
220 for(const auto *const tau : *TauJets) {
221 if(accept(tau)) {
222 metTaus.push_back(tau);
223 }
224 }
225 if( m_metmaker->rebuildMET("RefTau", xAOD::Type::Tau, newMet,
226 metTaus.asDataVector(),
227 metHelper, objScale).isFailure() ){
228 ATH_MSG_WARNING("Failed to build tau term.");
229 }
230 ATH_MSG_DEBUG("Selected " << metTaus.size() << " MET taus. "
231 << getMETElements(*(*newMet)["RefTau"]).size() << " are non-overlapping.");
232 }
233
234 // Muons
235 if(!m_MuonContainerKey.empty()) {
236 ConstDataVector<MuonContainer> metMuons(SG::VIEW_ELEMENTS);
237 for(const auto *const mu : *Muons) {
238 if(accept(mu)) {
239 metMuons.push_back(mu);
240 }
241 }
242
244 if( m_metmaker->rebuildMET("Muons", xAOD::Type::Muon, newMet,
245 metMuons.asDataVector(),
246 metHelper, objScale).isFailure() ) {
247 ATH_MSG_WARNING("Failed to build muon term.");
248 }
249 ATH_MSG_DEBUG("Selected " << metMuons.size() << " MET muons. "
250 << getMETElements(*(*newMet)["Muons"]).size() << " are non-overlapping.");
251 }
252
253 if( m_metmaker->rebuildJetMET("RefJet", m_softclname, m_softtrkname, newMet,
254 Jets.cptr(), coreMet.cptr(), metHelper, false ).isFailure() ) {
255 ATH_MSG_WARNING("Failed to build jet and soft terms.");
256 }
257 ATH_MSG_DEBUG("Of " << Jets.cptr()->size() << " jets, "
258 << getMETElements(*(*newMet)["RefJet"]).size() << " are non-overlapping, "
259 << getMETElements(*(*newMet)[m_softtrkname]).size() << " are soft");
260
261 auto jets_and_weights = getMETElementsWeights<xAOD::Jet>(*(*newMet)["RefJet"]);
262 for (const auto& [jet, weight] : jets_and_weights) {
263 ATH_MSG_VERBOSE(" Jet " << jet->index() << " with pt " << jet->pt()
264 << " contributes with weight " <<weight
265 );
266 }
267
268
270 if((*newMet)[m_softtrkname]) trksource = (*newMet)[m_softtrkname]->source();
271 if( buildMETSum("FinalTrk", newMet, trksource).isFailure() ){
272 ATH_MSG_WARNING("Building MET FinalTrk sum failed.");
273 }
275 if((*newMet)[m_softclname]) clsource = (*newMet)[m_softclname]->source();
276 if( buildMETSum("FinalClus", newMet, clsource).isFailure() ) {
277 ATH_MSG_WARNING("Building MET FinalClus sum failed.");
278 }
279
280 return StatusCode::SUCCESS;
281 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
size_t size() const
Number of registered mappings.
virtual bool accept(const xAOD::Electron *el) const
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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode met::METMakerAlg::finalize ( )
overridevirtual

Definition at line 110 of file METMakerAlg.cxx.

110 {
111 ATH_MSG_INFO ("Finalizing " << name() << "...");
112 return StatusCode::SUCCESS;
113 }
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode met::METMakerAlg::initialize ( )
overridevirtual

Athena algorithm's Hooks.

Definition at line 67 of file METMakerAlg.cxx.

67 {
68 ATH_MSG_INFO("Initializing " << name() << "...");
69 ATH_MSG_INFO("Retrieving tools...");
70
71 // retrieve tools
72 if( m_metmaker.retrieve().isFailure() ) {
73 ATH_MSG_ERROR("Failed to retrieve tool: " << m_metmaker->name());
74 return StatusCode::FAILURE;
75 };
76
77 if( m_muonSelTool.retrieve().isFailure() ) {
78 ATH_MSG_ERROR("Failed to retrieve tool: " << m_muonSelTool->name());
79 return StatusCode::FAILURE;
80 };
81
82 if( m_elecSelLHTool.retrieve().isFailure() ) {
83 ATH_MSG_ERROR("Failed to retrieve tool: " << m_elecSelLHTool->name());
84 return StatusCode::FAILURE;
85 };
86
87 if( m_photonSelIsEMTool.retrieve().isFailure() ) {
88 ATH_MSG_ERROR("Failed to retrieve tool: " << m_photonSelIsEMTool->name());
89 return StatusCode::FAILURE;
90 };
91
92 if( m_tauSelTool.retrieve().isFailure() ) {
93 ATH_MSG_ERROR("Failed to retrieve tool: " << m_tauSelTool->name());
94 return StatusCode::FAILURE;
95 };
96 ATH_CHECK( m_ElectronContainerKey.initialize() );
97 ATH_CHECK( m_PhotonContainerKey.initialize() );
98 ATH_CHECK( m_TauJetContainerKey.initialize() );
99 ATH_CHECK( m_MuonContainerKey.initialize() );
100 ATH_CHECK( m_JetContainerKey.initialize() );
101 ATH_CHECK( m_CoreMetKey.initialize() );
102 ATH_CHECK( m_metKey.initialize() );
103 ATH_CHECK( m_metMapKey.initialize() );
104
105 return StatusCode::SUCCESS;
106 }
#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()

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

105 {
107
108 if (sc.isFailure()) {
109 return sc;
110 }
111
112 ServiceHandle<ICondSvc> cs("CondSvc",name());
113 for (auto h : outputHandles()) {
114 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
115 // do this inside the loop so we don't create the CondSvc until needed
116 if ( cs.retrieve().isFailure() ) {
117 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
118 return StatusCode::SUCCESS;
119 }
120 if (cs->regHandle(this,*h).isFailure()) {
122 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
123 << " with CondSvc");
124 }
125 }
126 }
127 return sc;
128}
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
protected

Definition at line 73 of file METMakerAlg.h.

◆ 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

bool met::METMakerAlg::m_doTruthLep
protected

Definition at line 79 of file METMakerAlg.h.

◆ m_elecSelLHTool

ToolHandle<IAsgElectronLikelihoodTool> met::METMakerAlg::m_elecSelLHTool
protected

Definition at line 85 of file METMakerAlg.h.

◆ m_ElectronContainerKey

SG::ReadHandleKey<xAOD::ElectronContainer> met::METMakerAlg::m_ElectronContainerKey
protected

Definition at line 67 of file METMakerAlg.h.

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_JetContainerKey

SG::ReadHandleKey<xAOD::JetContainer> met::METMakerAlg::m_JetContainerKey
protected

Definition at line 71 of file METMakerAlg.h.

◆ m_metKey

SG::WriteHandleKey<xAOD::MissingETContainer> met::METMakerAlg::m_metKey
protected

Definition at line 75 of file METMakerAlg.h.

◆ m_metmaker

ToolHandle<IMETMaker> met::METMakerAlg::m_metmaker
protected

Athena configured tools.

Definition at line 82 of file METMakerAlg.h.

◆ m_metMapKey

SG::ReadHandleKey<xAOD::MissingETAssociationMap> met::METMakerAlg::m_metMapKey
protected

Definition at line 76 of file METMakerAlg.h.

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> met::METMakerAlg::m_MuonContainerKey
protected

Definition at line 70 of file METMakerAlg.h.

◆ m_muonSelTool

ToolHandle<CP::IMuonSelectionTool> met::METMakerAlg::m_muonSelTool
protected

Definition at line 84 of file METMakerAlg.h.

◆ m_PhotonContainerKey

SG::ReadHandleKey<xAOD::PhotonContainer> met::METMakerAlg::m_PhotonContainerKey
protected

Definition at line 68 of file METMakerAlg.h.

◆ m_photonSelIsEMTool

ToolHandle<IAsgPhotonIsEMSelector> met::METMakerAlg::m_photonSelIsEMTool
protected

Definition at line 86 of file METMakerAlg.h.

◆ m_softclname

std::string met::METMakerAlg::m_softclname
protected

Definition at line 63 of file METMakerAlg.h.

◆ m_softtrkname

std::string met::METMakerAlg::m_softtrkname
protected

Definition at line 64 of file METMakerAlg.h.

◆ m_TauJetContainerKey

SG::ReadHandleKey<xAOD::TauJetContainer> met::METMakerAlg::m_TauJetContainerKey
protected

Definition at line 69 of file METMakerAlg.h.

◆ m_tauSelTool

ToolHandle<TauAnalysisTools::ITauSelectionTool> met::METMakerAlg::m_tauSelTool
protected

Definition at line 87 of file METMakerAlg.h.

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