ATLAS Offline Software
Loading...
Searching...
No Matches
CP::MuonLRTMergingAlg Class Referencefinal

this wraps the MCP LRT collection merger in a CP algorithm More...

#include <MuonLRTMergingAlg.h>

Inheritance diagram for CP::MuonLRTMergingAlg:
Collaboration diagram for CP::MuonLRTMergingAlg:

Public Member Functions

 MuonLRTMergingAlg (const std::string &name, ISvcLocator *pSvcLocator)
 the standard constructor
StatusCode initialize () override
StatusCode execute (const EventContext &ctx) const 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::StatusCode finalize ()
 finalize this algorithm
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

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

StatusCode mergeMuon (const xAOD::MuonContainer &muonCol, const std::vector< bool > &muonIsGood, ConstDataVector< xAOD::MuonContainer > *outputCol) const
 Private methods:
StatusCode mergeMuon (const xAOD::MuonContainer &muonCol, const std::vector< bool > &muonIsGood, xAOD::MuonContainer *outputCol) const
 A routine that merges the muon collections.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::MuonContainer > m_promptMuonLocation {this, "PromptMuonLocation","Muons", "Prompt muons to merge"}
 Private data:
SG::ReadHandleKey< xAOD::MuonContainer > m_lrtMuonLocation {this, "LRTMuonLocation","MuonsLRT", "LRT muons to merge"}
 LRT muon collection to be merged.
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation {this, "OutputMuonLocation", "StdWithLRTMuons", "name of the muon container to write"}
 Combined muon collection.
SG::WriteHandleKey< ConstDataVector< xAOD::MuonContainer > > m_outMuonViewLocation
 Combined muon view collection, set from m_outMuonLocation in initialize().
Gaudi::Property< bool > m_createViewCollection {this, "CreateViewCollection", true}
 flag to create a view collection rather than building deep-copies (true by default)
ToolHandle< CP::IMuonLRTOverlapRemovalTool > m_overlapRemovalTool {this, "overlapRemovalTool", "", "tool to determine overlaps between regular and LRT muons"}
Gaudi::Property< int > m_ORstrategy {this, "overlapStrategy", CP::IMuonLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default, 1 = write all muons and decorate with overlap type)"}
 allows to pass an overlap removal strategy to the underlying removal tool, without manually configuring said tool.
Gaudi::Property< bool > m_useRun3WP {this, "UseRun3WP", false, "Switch to toggle the run 2 & run 3 geometry for the muon ID working points used in the prompt-LRT overlap resolution. Set to true for run 3 and false for run 2."}
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_promptIsLRTKey { this, "PromptIsLRTKey", m_promptMuonLocation, "isLRT" }
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_lrtIsLRTKey { this, "LRTIsLRTKey", m_lrtMuonLocation, "isLRT" }
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

this wraps the MCP LRT collection merger in a CP algorithm

Definition at line 27 of file MuonLRTMergingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonLRTMergingAlg()

CP::MuonLRTMergingAlg::MuonLRTMergingAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

the standard constructor

Definition at line 24 of file MuonLRTMergingAlg.cxx.

25 : EL::AnaReentrantAlgorithm( name, svcLoc ){
26 //nothing to do here
27 }

Member Function Documentation

◆ 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 CP::MuonLRTMergingAlg::execute ( const EventContext & ctx) const
override

retrieve muons from StoreGate

Definition at line 57 of file MuonLRTMergingAlg.cxx.

57 {
58
59 // Setup containers for output, to avoid const conversions setup two different kind of containers
60 std::unique_ptr<ConstDataVector<xAOD::MuonContainer>> outputViewCol;
61 std::unique_ptr<xAOD::MuonContainer> outputCol;
62 std::unique_ptr<xAOD::MuonAuxContainer> outputAuxCol;
64 outputViewCol = std::make_unique<ConstDataVector<xAOD::MuonContainer>>(SG::VIEW_ELEMENTS);
65 } else {
66 outputCol = std::make_unique<xAOD::MuonContainer>();
67 outputAuxCol = std::make_unique<xAOD::MuonAuxContainer>();
68 outputCol->setStore(outputAuxCol.get());
69 }
70
72 SG::ReadHandle<xAOD::MuonContainer> promptCol (m_promptMuonLocation, ctx);
73 SG::ReadHandle<xAOD::MuonContainer> lrtCol (m_lrtMuonLocation, ctx);
74 if (!promptCol.isValid()) {
75 ATH_MSG_FATAL("Unable to retrieve xAOD::MuonContainer, \"" << m_promptMuonLocation << "\", cannot run the LRT muon merger!");
76 return StatusCode::FAILURE;
77 }
78 if (!lrtCol.isValid()) {
79 ATH_MSG_FATAL("Unable to retrieve xAOD::MuonContainer, \"" << m_lrtMuonLocation << "\", cannot run the LRT muon merger!");
80 return StatusCode::FAILURE;
81 }
82
83 // Check and resolve overlaps
84 std::vector<bool> writePromptMuon;
85 std::vector<bool> writeLRTMuon;
86 m_overlapRemovalTool->checkOverlap(*promptCol, *lrtCol, writePromptMuon, writeLRTMuon);
87
88 // Decorate the muons with their locations.
89 // 0 if prompt, 1 if LRT
90 SG::WriteDecorHandle<xAOD::MuonContainer, char> promptIsLRT(m_promptIsLRTKey, ctx);
91 SG::WriteDecorHandle<xAOD::MuonContainer, char> lrtIsLRT(m_lrtIsLRTKey, ctx);
92 for (const xAOD::Muon* mu : *promptCol) promptIsLRT(*mu) = 0;
93 for (const xAOD::Muon* mu : *lrtCol) lrtIsLRT(*mu) = 1;
94
95 // and merge
97 outputViewCol->reserve(promptCol->size() + lrtCol->size());
98 ATH_CHECK(mergeMuon(*promptCol, writePromptMuon, outputViewCol.get()));
99 ATH_CHECK(mergeMuon(*lrtCol, writeLRTMuon, outputViewCol.get()));
100 } else {
101 outputCol->reserve(promptCol->size() + lrtCol->size());
102 ATH_CHECK(mergeMuon(*promptCol, writePromptMuon, outputCol.get()));
103 ATH_CHECK(mergeMuon(*lrtCol, writeLRTMuon, outputCol.get()));
104 }
105
106 // write
108 SG::WriteHandle<ConstDataVector<xAOD::MuonContainer>> h_write(m_outMuonViewLocation, ctx);
109 ATH_CHECK(h_write.record(std::move(outputViewCol)));
110 }
111 else {
112 SG::WriteHandle<xAOD::MuonContainer> h_write(m_outMuonLocation, ctx);
113 ATH_CHECK(h_write.record(std::move(outputCol), std::move(outputAuxCol)));
114 }
115
116 return StatusCode::SUCCESS;
117
118 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x,...)
ToolHandle< CP::IMuonLRTOverlapRemovalTool > m_overlapRemovalTool
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
Combined muon collection.
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_lrtIsLRTKey
Gaudi::Property< bool > m_createViewCollection
flag to create a view collection rather than building deep-copies (true by default)
StatusCode mergeMuon(const xAOD::MuonContainer &muonCol, const std::vector< bool > &muonIsGood, ConstDataVector< xAOD::MuonContainer > *outputCol) const
Private methods:
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_promptIsLRTKey
SG::WriteHandleKey< ConstDataVector< xAOD::MuonContainer > > m_outMuonViewLocation
Combined muon view collection, set from m_outMuonLocation in initialize().
SG::ReadHandleKey< xAOD::MuonContainer > m_lrtMuonLocation
LRT muon collection to be merged.
SG::ReadHandleKey< xAOD::MuonContainer > m_promptMuonLocation
Private data:
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Muon_v1 Muon
Reference the current persistent 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.

◆ 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 EL::AnaReentrantAlgorithm::finalize ( )
protectedinherited

finalize this algorithm

This gets called after event processing has finished. The last event may no longer be in memory, and the code should not try to access it.

Definition at line 96 of file AnaReentrantAlgorithm.cxx.

98 {
99 return StatusCode::SUCCESS;
100 }

◆ initialize()

StatusCode CP::MuonLRTMergingAlg::initialize ( )
override

initialize the handles

if the tool is not user-set, configure the automatic instance via our overlap flag

Definition at line 29 of file MuonLRTMergingAlg.cxx.

29 {
30
31 // Greet the user:
32 ATH_MSG_DEBUG( "Initialising" );
33
35 ATH_CHECK( m_promptMuonLocation.initialize() );
36 ATH_CHECK( m_lrtMuonLocation.initialize() );
37 ATH_CHECK( m_outMuonLocation.initialize() );
40 ATH_CHECK( m_promptIsLRTKey.initialize() );
41 ATH_CHECK( m_lrtIsLRTKey.initialize() );
42
44 if (m_overlapRemovalTool.empty()){
45 asg::AsgToolConfig config("CP::MuonLRTOverlapRemovalTool/MuonLRTOverlapRemovalTool");
46 ATH_CHECK(config.setProperty("overlapStrategy",m_ORstrategy.value()));
47 ATH_CHECK(config.setProperty("UseRun3WP",m_useRun3WP.value()));
48 ATH_CHECK(config.makePrivateTool(m_overlapRemovalTool));
49 }
50
51 // Retrieve the tools
52 ATH_CHECK( m_overlapRemovalTool.retrieve() );
53 // Return gracefully:
54 return StatusCode::SUCCESS;
55 }
#define ATH_MSG_DEBUG(x,...)
Gaudi::Property< bool > m_useRun3WP
Gaudi::Property< int > m_ORstrategy
allows to pass an overlap removal strategy to the underlying removal tool, without manually configuri...

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

◆ mergeMuon() [1/2]

StatusCode CP::MuonLRTMergingAlg::mergeMuon ( const xAOD::MuonContainer & muonCol,
const std::vector< bool > & muonIsGood,
ConstDataVector< xAOD::MuonContainer > * outputCol ) const
private

Private methods:

A routine that merges the muon collections into a view container.

Definition at line 124 of file MuonLRTMergingAlg.cxx.

126 {
127 // loop over muons, accept them and add them into association tool
128 for(const xAOD::Muon* muon : muonCol){
129 // add muon into output
130 if (writeMuon.at(muon->index())){
131 outputCol->push_back(muon);
132 }
133 }
134 return StatusCode::SUCCESS;
135 }
value_type push_back(value_type pElem)
Add an element to the end of the collection.

◆ mergeMuon() [2/2]

StatusCode CP::MuonLRTMergingAlg::mergeMuon ( const xAOD::MuonContainer & muonCol,
const std::vector< bool > & muonIsGood,
xAOD::MuonContainer * outputCol ) const
private

A routine that merges the muon collections.

Definition at line 137 of file MuonLRTMergingAlg.cxx.

139 {
140 // loop over muons, accept them and add them into association tool
141 static const SG::Decorator<ElementLink<xAOD::MuonContainer>> originalMuonLink("originalMuonLink");
142 for(const xAOD::Muon* muon : muonCol){
143 // add muon into output
144 if (writeMuon.at(muon->index())){
145 auto newMuon = std::make_unique<xAOD::Muon>(*muon);
146 ElementLink<xAOD::MuonContainer> myLink;
147 myLink.toIndexedElement(muonCol, muon->index());
148 originalMuonLink(*newMuon) = myLink;
149 setOriginalObjectLink(*muon, *newMuon);
150 static const SG::Accessor <char> isLRT("isLRT");
151 isLRT(*newMuon) = isLRT(*muon);
152 outputCol->push_back(std::move(newMuon));
153 }
154 }
155 return StatusCode::SUCCESS;
156 }
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
bool setOriginalObjectLink(const IParticle &original, IParticle &copy)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

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, 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}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_createViewCollection

Gaudi::Property<bool> CP::MuonLRTMergingAlg::m_createViewCollection {this, "CreateViewCollection", true}
private

flag to create a view collection rather than building deep-copies (true by default)

option to create a view collection and not deep-copy muons

Definition at line 54 of file MuonLRTMergingAlg.h.

54{this, "CreateViewCollection", true};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 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_lrtIsLRTKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> CP::MuonLRTMergingAlg::m_lrtIsLRTKey { this, "LRTIsLRTKey", m_lrtMuonLocation, "isLRT" }
private

Definition at line 79 of file MuonLRTMergingAlg.h.

80{ this, "LRTIsLRTKey", m_lrtMuonLocation, "isLRT" };

◆ m_lrtMuonLocation

SG::ReadHandleKey<xAOD::MuonContainer> CP::MuonLRTMergingAlg::m_lrtMuonLocation {this, "LRTMuonLocation","MuonsLRT", "LRT muons to merge"}
private

LRT muon collection to be merged.

Definition at line 47 of file MuonLRTMergingAlg.h.

47{this, "LRTMuonLocation","MuonsLRT", "LRT muons to merge"};

◆ m_ORstrategy

Gaudi::Property<int> CP::MuonLRTMergingAlg::m_ORstrategy {this, "overlapStrategy", CP::IMuonLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default, 1 = write all muons and decorate with overlap type)"}
private

allows to pass an overlap removal strategy to the underlying removal tool, without manually configuring said tool.

Advantageous in certain analysis frameworks.

Definition at line 59 of file MuonLRTMergingAlg.h.

59{this, "overlapStrategy", CP::IMuonLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default, 1 = write all muons and decorate with overlap type)"};

◆ m_outMuonLocation

SG::WriteHandleKey<xAOD::MuonContainer> CP::MuonLRTMergingAlg::m_outMuonLocation {this, "OutputMuonLocation", "StdWithLRTMuons", "name of the muon container to write"}
private

Combined muon collection.

Definition at line 49 of file MuonLRTMergingAlg.h.

49{this, "OutputMuonLocation", "StdWithLRTMuons", "name of the muon container to write"};

◆ m_outMuonViewLocation

SG::WriteHandleKey<ConstDataVector<xAOD::MuonContainer> > CP::MuonLRTMergingAlg::m_outMuonViewLocation
private

Combined muon view collection, set from m_outMuonLocation in initialize().

Definition at line 51 of file MuonLRTMergingAlg.h.

◆ m_overlapRemovalTool

ToolHandle<CP::IMuonLRTOverlapRemovalTool> CP::MuonLRTMergingAlg::m_overlapRemovalTool {this, "overlapRemovalTool", "", "tool to determine overlaps between regular and LRT muons"}
private

Definition at line 55 of file MuonLRTMergingAlg.h.

55{this, "overlapRemovalTool", "", "tool to determine overlaps between regular and LRT muons"};

◆ m_promptIsLRTKey

SG::WriteDecorHandleKey<xAOD::MuonContainer> CP::MuonLRTMergingAlg::m_promptIsLRTKey { this, "PromptIsLRTKey", m_promptMuonLocation, "isLRT" }
private

Definition at line 77 of file MuonLRTMergingAlg.h.

78{ this, "PromptIsLRTKey", m_promptMuonLocation, "isLRT" };

◆ m_promptMuonLocation

SG::ReadHandleKey<xAOD::MuonContainer> CP::MuonLRTMergingAlg::m_promptMuonLocation {this, "PromptMuonLocation","Muons", "Prompt muons to merge"}
private

Private data:

handles for interacting with the event storage

Prompt muon collection to be merged

Definition at line 45 of file MuonLRTMergingAlg.h.

45{this, "PromptMuonLocation","Muons", "Prompt muons to merge"};

◆ m_useRun3WP

Gaudi::Property<bool> CP::MuonLRTMergingAlg::m_useRun3WP {this, "UseRun3WP", false, "Switch to toggle the run 2 & run 3 geometry for the muon ID working points used in the prompt-LRT overlap resolution. Set to true for run 3 and false for run 2."}
private

Definition at line 60 of file MuonLRTMergingAlg.h.

60{this, "UseRun3WP", false, "Switch to toggle the run 2 & run 3 geometry for the muon ID working points used in the prompt-LRT overlap resolution. Set to true for run 3 and false for run 2."};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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