![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
18 const std::string&
name,
19 ISvcLocator* pSvcLocator ) :
28 ATH_CHECK( m_offlineTrkParticlesName.initialize(
29 not m_offlineTrkParticlesName.key().empty() ) );
32 ATH_CHECK( m_muonsName.initialize( not m_muonsName.key().empty() ) );
36 *
this, m_offlineTrkParticlesName,
37 m_prefix.value(), m_decor_mu_names, m_decor_mu );
39 if( m_decor_mu.size() != NDecorations ) {
41 return StatusCode::FAILURE;
44 return StatusCode::SUCCESS;
56 ATH_MSG_ERROR(
"Failed to retrieve track particles container" );
57 return StatusCode::FAILURE;
64 return StatusCode::FAILURE;
67 std::vector< IDTPM::OptionalDecoration<xAOD::TrackParticleContainer, ElementMuonLink_t> >
70 if( mu_decor.empty() ) {
72 return StatusCode::FAILURE;
80 return StatusCode::SUCCESS;
101 *(
muon->combinedTrackParticleLink() ) :
102 *(
muon->inDetTrackParticleLink() );
106 return StatusCode::FAILURE;
109 if( muTrack == &
track ) {
114 ATH_MSG_DEBUG(
"Found matched muon (pt=" <<
muon->pt() <<
"). Decorating track." );
139 return StatusCode::SUCCESS;
144 return StatusCode::SUCCESS;
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Algorithm to decorate offline tracks with the corresponding offline muon object (if required for trig...
void decorateOrRejectQuietly(const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
Safe method to fill the decoration if decor flag is true.
std::vector< OptionalDecoration< T_Cont, T > > createDecoratorsIfNeeded(const T_Cont &container, const std::vector< WriteKeyAccessorPair< T_Cont, T > > &keys, const EventContext &ctx, bool verbose=false)
Like above - FIXME: maybe not needed.
virtual StatusCode execute(const EventContext &ctx) const override
An algorithm that can be simultaneously executed in multiple threads.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
void createDecoratorKeysAndAccessor(T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< WriteKeyAccessorPair< T_Cont, T > > &decor_out)
create a pair composed of a WriteDecorHandleKey to create a decorator handle and an accessor to check...
OfflineMuonDecoratorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Local includes.
const_pointer_type ptr()
Dereference the pointer.
StatusCode decorateMuonTrack(const xAOD::TrackParticle &track, std::vector< IDTPM::OptionalDecoration< xAOD::TrackParticleContainer, ElementMuonLink_t > > &mu_decor, const xAOD::MuonContainer &muons) const
Class describing a TrackParticle.
std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool > OptionalDecoration