|
ATLAS Offline Software
|
Go to the documentation of this file.
22 :
EL::AnaAlgorithm(
name, svcLoc ){
47 return StatusCode::SUCCESS;
52 const EventContext& ctx = Gaudi::Hive::currentContext();
55 auto outputViewCol = std::make_unique<ConstDataVector<xAOD::MuonContainer>>(
SG::VIEW_ELEMENTS);
56 auto outputCol = std::make_unique<xAOD::MuonContainer>();
58 std::unique_ptr<xAOD::MuonAuxContainer> outputAuxCol;
60 outputAuxCol = std::make_unique<xAOD::MuonAuxContainer>();
61 outputCol->setStore(outputAuxCol.get());
69 return StatusCode::FAILURE;
73 return StatusCode::FAILURE;
77 std::vector<bool> writePromptMuon;
78 std::vector<bool> writeLRTMuon;
88 outputViewCol->reserve(promptCol->size() + lrtCol->size());
92 outputCol->reserve(promptCol->size() + lrtCol->size());
103 ATH_CHECK(h_write.
record(std::move(outputCol), std::move(outputAuxCol)));
106 return StatusCode::SUCCESS;
115 const std::vector<bool> & writeMuon,
118 if(muonCol.
empty()) {
return StatusCode::SUCCESS;}
122 if (writeMuon.at(
muon->index())){
126 return StatusCode::SUCCESS;
130 const std::vector<bool> & writeMuon,
133 if(muonCol.
empty()) {
return StatusCode::SUCCESS;}
137 if (writeMuon.at(
muon->index())){
141 originalMuonLink(*newMuon) = myLink;
145 return StatusCode::SUCCESS;
ToolHandle< CP::IMuonLRTOverlapRemovalTool > m_overlapRemovalTool
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
SG::ReadHandleKey< xAOD::MuonContainer > m_lrtMuonLocation
Vector of muon collections to be merged.
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
Gaudi::Property< int > m_ORstrategy
allows to pass an overlap removal strategy to the underlying removal tool, without manually configuri...
SG::WriteHandleKey< xAOD::MuonContainer > m_outMuonLocation
Vector of muon collections to be merged.
Select isolated Photons, Electrons and Muons.
StatusCode initialize() override
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Helper class to provide type-safe access to aux data.
MuonLRTMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
::StatusCode StatusCode
StatusCode definition for legacy code.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode execute() override
ElementLink implementation for ROOT usage.
Muon_v1 Muon
Reference the current persistent version:
value_type push_back(value_type pElem)
Add an element to the end of the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
DataVector adapter that acts like it holds const pointers.
StatusCode mergeMuon(const xAOD::MuonContainer &muonCol, const std::vector< bool > &muonIsGood, ConstDataVector< xAOD::MuonContainer > *outputCol) const
Private methods:
Gaudi::Property< bool > m_useRun3WP
SG::ReadHandleKey< xAOD::MuonContainer > m_promptMuonLocation
Private data:
Gaudi::Property< bool > m_createViewCollection
Combined muon collection.
bool empty() const noexcept
Returns true if the collection is empty.