ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
MuonIdentification
MuonCombinedDecorationAlgs
src
MuonRpcTimingDecorAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONCOMBINEDDECORALGS_MUONRPCTIMINGDECORALG_H
6
#define MUONCOMBINEDDECORALGS_MUONRPCTIMINGDECORALG_H
7
8
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
9
#include "GaudiKernel/ToolHandle.h"
10
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
11
#include "
xAODMuon/MuonContainer.h
"
12
#include "
StoreGate/ReadHandleKey.h
"
13
#include "
StoreGate/WriteDecorHandleKey.h
"
14
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
15
#include "
MuonRecHelperTools/IMuonEDMHelperSvc.h
"
16
#include "
StoreGate/WriteDecorHandle.h
"
17
/*
18
Algorithm to decorate the Rpc position and timing to the Muon particle
19
*/
20
21
class
MuonRpcTimingDecorAlg
:
public
AthReentrantAlgorithm
{
22
public
:
23
MuonRpcTimingDecorAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
24
~MuonRpcTimingDecorAlg
() =
default
;
25
26
virtual
StatusCode
initialize
()
override
;
27
virtual
StatusCode
execute
(
const
EventContext& ctx)
const override
;
28
private
:
29
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
30
ServiceHandle<Muon::IMuonEDMHelperSvc>
m_edmHelperSvc
{
this
,
"edmHelper"
,
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc"
,
31
"Handle to the service providing the IMuonEDMHelperSvc interface"
};
32
33
SG::ReadHandleKey<xAOD::MuonContainer>
m_MuonContainer
{
this
,
"MuonContainer"
,
"Muons"
,
"Muon container"
};
34
35
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_idKey
{
this
,
"IdKey"
,
m_MuonContainer
,
"rpcHitIdentifier"
,
"rpcHitIdentifier decoration key"
};
36
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_posXKey
{
this
,
"PosXkey"
,
m_MuonContainer
,
"rpcHitPositionX"
,
"rpcHitPositionX decoration key"
};
37
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_posYKey
{
this
,
"PosYkey"
,
m_MuonContainer
,
"rpcHitPositionY"
,
"rpcHitPositionY decoration key"
};
38
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_posZKey
{
this
,
"PosZkey"
,
m_MuonContainer
,
"rpcHitPositionZ"
,
"rpcHitPositionZ decoration key"
};
39
SG::WriteDecorHandleKey<xAOD::MuonContainer>
m_timeKey
{
this
,
"TimeKey"
,
m_MuonContainer
,
"rpcHitTime"
,
"rpcHitTime decoration key"
};
40
41
struct
RpcInfo
{
42
RpcInfo
(
const
Amg::Vector3D
& pos_,
43
const
float
time_,
44
const
unsigned
int
id_):
45
pos
{pos_},
time
{time_},
id
{id_}{}
46
Amg::Vector3D
pos
{0.,0.,0.};
47
float
time
{0.f};
48
unsigned
int
id
{0};
49
};
50
void
getRpcTiming
(
const
xAOD::TrackParticle
* tp, std::vector<RpcInfo>& info)
const
;
51
52
template
<
typename
T>
void
insert
(
const
std::vector<RpcInfo>& info,
53
const
xAOD::Muon
* muon,
54
SG::WriteDecorHandle
<
xAOD::MuonContainer
,std::vector<T>>& decor,
55
std::function<T(
const
RpcInfo&)>func)
const
;
56
};
57
#endif
AthReentrantAlgorithm.h
MuonContainer.h
IMuonEDMHelperSvc.h
IMuonIdHelperSvc.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteDecorHandle.h
Handle class for adding a decoration to an object.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
MuonRpcTimingDecorAlg::~MuonRpcTimingDecorAlg
~MuonRpcTimingDecorAlg()=default
MuonRpcTimingDecorAlg::m_timeKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_timeKey
Definition
MuonRpcTimingDecorAlg.h:39
MuonRpcTimingDecorAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
MuonRpcTimingDecorAlg.h:29
MuonRpcTimingDecorAlg::m_idKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_idKey
Definition
MuonRpcTimingDecorAlg.h:35
MuonRpcTimingDecorAlg::MuonRpcTimingDecorAlg
MuonRpcTimingDecorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MuonRpcTimingDecorAlg.cxx:16
MuonRpcTimingDecorAlg::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition
MuonRpcTimingDecorAlg.h:30
MuonRpcTimingDecorAlg::m_MuonContainer
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainer
Definition
MuonRpcTimingDecorAlg.h:33
MuonRpcTimingDecorAlg::initialize
virtual StatusCode initialize() override
Definition
MuonRpcTimingDecorAlg.cxx:19
MuonRpcTimingDecorAlg::m_posZKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_posZKey
Definition
MuonRpcTimingDecorAlg.h:38
MuonRpcTimingDecorAlg::getRpcTiming
void getRpcTiming(const xAOD::TrackParticle *tp, std::vector< RpcInfo > &info) const
Definition
MuonRpcTimingDecorAlg.cxx:53
MuonRpcTimingDecorAlg::m_posXKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_posXKey
Definition
MuonRpcTimingDecorAlg.h:36
MuonRpcTimingDecorAlg::insert
void insert(const std::vector< RpcInfo > &info, const xAOD::Muon *muon, SG::WriteDecorHandle< xAOD::MuonContainer, std::vector< T > > &decor, std::function< T(const RpcInfo &)>func) const
Definition
MuonRpcTimingDecorAlg.cxx:80
MuonRpcTimingDecorAlg::m_posYKey
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_posYKey
Definition
MuonRpcTimingDecorAlg.h:37
MuonRpcTimingDecorAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition
MuonRpcTimingDecorAlg.cxx:29
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
ServiceHandle
Definition
ClusterMakerTool.h:36
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition
Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
xAOD::MuonContainer
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Definition
Event/xAOD/xAODMuon/xAODMuon/MuonContainer.h:14
MuonRpcTimingDecorAlg::RpcInfo::id
unsigned int id
Definition
MuonRpcTimingDecorAlg.h:48
MuonRpcTimingDecorAlg::RpcInfo::RpcInfo
RpcInfo(const Amg::Vector3D &pos_, const float time_, const unsigned int id_)
Definition
MuonRpcTimingDecorAlg.h:42
MuonRpcTimingDecorAlg::RpcInfo::pos
Amg::Vector3D pos
Definition
MuonRpcTimingDecorAlg.h:46
MuonRpcTimingDecorAlg::RpcInfo::time
float time
Definition
MuonRpcTimingDecorAlg.h:47
Generated on
for ATLAS Offline Software by
1.17.0