ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonRPC_CnvTools
src
NRPC_RawDataProviderTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONRPCCNVTOOLS_MUONNRPCRAWDATAPROVIDERTOOL_H
6
#define MUONRPCCNVTOOLS_MUONNRPCRAWDATAPROVIDERTOOL_H
7
8
#include <set>
9
10
#include "
AthenaBaseComps/AthAlgTool.h
"
11
#include "
ByteStreamCnvSvcBase/IROBDataProviderSvc.h
"
12
#include "GaudiKernel/ServiceHandle.h"
13
#include "GaudiKernel/ToolHandle.h"
14
#include "
MuonCablingData/RpcCablingMap.h
"
15
#include "
MuonIdHelpers/IMuonIdHelperSvc.h
"
16
#include "
StoreGate/ReadCondHandleKey.h
"
17
#include "
xAODMuonRDO/NRPCRDOContainer.h
"
18
#include "eformat/Issue.h"
19
#include "eformat/SourceIdentifier.h"
20
21
#include "
MuonCnvToolInterfaces/IMuonRawDataProviderTool.h
"
22
23
25
// Each ROB contains 6 e-links -> each e-link collects data from 3 TDCs (18 TDCs per ROB)
26
// 1 ROB -> 1 Sector of BIS78
27
//
28
// Bytestream definitions (32 bits words)
29
// word1 -> Number of words from e-link (3 TDCs): 6 (for empty) + 1 per hit
30
// word2 -> e-link ID
31
// word3 -> BCID
32
// word4 -> L1ID + Counter from event counter reset
33
// word5 -> hits (1 per word)
34
// (...)
35
// word(N-1) -> Trailer a0 + counters of hits in BCID+0, BCID+1, BCID+2
36
// word(N) -> counters of hits in BCID+3, BCID+4, BCID+5, BCID+6
37
//
38
//-------------------------------------------------------------------------------------------
39
//
40
// -- BCID decoding (word3)
41
// -- some inversions needed as follows, each letter represents 4 bits:
42
// word: ab|cd|ef|gh
43
// correct word: gh|ef|cd|ab
44
// BCID: g|he|fc|da (last 4 bits "b" not used)
45
//
46
//
47
// -- HITS decoding (word5 and following, when non empty)
48
// -- some inversions needed as follows, each letter represents 4 bits:
49
// word: ab|cd|ef|gh
50
// correct word: gh|ef|cd|ab
51
// TDC: gh
52
// Channel: ef
53
// Time over threshold: cd * 0.4 = ToT (ns)
54
// BCID-hit: a (last 4 bits of real BCID of the hit, may be different from the nominal BCID)
55
// time: b * 1.6 = time (ns)
56
//
58
59
60
namespace
Muon
{
61
62
class
NRPC_RawDataProviderTool
:
public
extends<AthAlgTool, IMuonRawDataProviderTool> {
63
public
:
64
using
base_class::base_class;
66
virtual
~NRPC_RawDataProviderTool
() =
default
;
67
69
virtual
StatusCode
initialize
()
override
;
70
71
72
virtual
StatusCode
convert
(
const
EventContext& ctx)
const override
;
73
virtual
StatusCode
convert
(
const
std::vector<IdentifierHash>& HashVec,
74
const
EventContext& ctx)
const override
;
75
virtual
StatusCode
convert
(
const
std::vector<uint32_t>& robIds,
76
const
EventContext& ctx)
const override
;
78
virtual
StatusCode
convertIntoContainer
(
const
ROBFragmentList& vecRobs,
79
const
EventContext& ctx)
const
;
80
81
virtual
StatusCode
fillCollections
(
const
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
& robFrag,
xAOD::NRPCRDOContainer
& rdoIdc)
const
;
82
83
private
:
84
typedef
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
BS
;
85
86
SG::WriteHandleKey<xAOD::NRPCRDOContainer>
m_rdoContainerKey
{
this
,
"NrpcRdoKey"
,
"NRPCRDO"
,
"WriteHandleKey for Output AOD::NRPCRDOContainer"
};
87
88
ServiceHandle<Muon::IMuonIdHelperSvc>
m_idHelperSvc
{
this
,
"MuonIdHelperSvc"
,
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"
};
89
90
// Rob Data Provider handle
91
ServiceHandle<IROBDataProviderSvc>
m_robDataProvider
{
this
,
"ROBDataProviderSvc"
,
"ROBDataProviderSvc"
};
92
93
SG::ReadCondHandleKey<RpcCablingMap>
m_readKey
{
this
,
"ReadKey"
,
"MuonNRPC_CablingMap"
,
"Key of MuonNRPC_CablingMap"
};
94
};
95
}
// namespace Muon
96
97
#endif
AthAlgTool.h
IMuonIdHelperSvc.h
IMuonRawDataProviderTool.h
IROBDataProviderSvc.h
NRPCRDOContainer.h
ReadCondHandleKey.h
RpcCablingMap.h
Muon::NRPC_RawDataProviderTool
Definition
NRPC_RawDataProviderTool.h:62
Muon::NRPC_RawDataProviderTool::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition
NRPC_RawDataProviderTool.cxx:11
Muon::NRPC_RawDataProviderTool::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Definition
NRPC_RawDataProviderTool.h:91
Muon::NRPC_RawDataProviderTool::fillCollections
virtual StatusCode fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, xAOD::NRPCRDOContainer &rdoIdc) const
Definition
NRPC_RawDataProviderTool.cxx:64
Muon::NRPC_RawDataProviderTool::m_rdoContainerKey
SG::WriteHandleKey< xAOD::NRPCRDOContainer > m_rdoContainerKey
Definition
NRPC_RawDataProviderTool.h:86
Muon::NRPC_RawDataProviderTool::BS
OFFLINE_FRAGMENTS_NAMESPACE::PointerType BS
Definition
NRPC_RawDataProviderTool.h:84
Muon::NRPC_RawDataProviderTool::~NRPC_RawDataProviderTool
virtual ~NRPC_RawDataProviderTool()=default
default destructor
Muon::NRPC_RawDataProviderTool::convert
virtual StatusCode convert(const EventContext &ctx) const override
for the entire event
Definition
NRPC_RawDataProviderTool.cxx:42
Muon::NRPC_RawDataProviderTool::m_readKey
SG::ReadCondHandleKey< RpcCablingMap > m_readKey
Definition
NRPC_RawDataProviderTool.h:93
Muon::NRPC_RawDataProviderTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition
NRPC_RawDataProviderTool.h:88
Muon::NRPC_RawDataProviderTool::convertIntoContainer
virtual StatusCode convertIntoContainer(const ROBFragmentList &vecRobs, const EventContext &ctx) const
Convert method.
Definition
NRPC_RawDataProviderTool.cxx:21
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
ServiceHandle
Definition
ClusterMakerTool.h:36
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
OFFLINE_FRAGMENTS_NAMESPACE::PointerType
const DataType * PointerType
Definition
RawEvent.h:25
OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment
eformat::ROBFragment< PointerType > ROBFragment
Definition
RawEvent.h:27
xAOD::NRPCRDOContainer
NRPCRDOContainer_v1 NRPCRDOContainer
Define the version of the NRPC RDO container.
Definition
NRPCRDOContainer.h:14
Generated on
for ATLAS Offline Software by
1.17.0