ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonSTGC_CnvTools
src
STGC_RDO_Decoder.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 MUONBYTESTREAMSTGCRDODECODER_H
6
#define MUONBYTESTREAMSTGCRDODECODER_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
10
#include "
MuonRDO/STGC_RawData.h
"
11
#include "
MuonDigitContainer/sTgcDigit.h
"
12
#include "
MuonIdHelpers/sTgcIdHelper.h
"
13
14
#include "
MuonSTGC_CnvTools/ISTGC_RDO_Decoder.h
"
15
#include "
NSWCalibTools/INSWCalibTool.h
"
16
17
#include <inttypes.h>
18
#include <vector>
19
20
class
NswCalibDbTimeChargeData
;
21
22
namespace
Muon
{
23
// Decoder class for conversion from STGC RDOs to STGC digits
24
// Stefano Rosati - CERN Jan 2004
25
// Adapted for STGCs from Alexandre Laurier - June 2019
26
27
class
STGC_RDO_Decoder
:
public
AthAlgTool
,
virtual
public
ISTGC_RDO_Decoder
{
28
29
public
:
30
31
STGC_RDO_Decoder
(
const
std::string&
type
,
const
std::string& name,
32
const
IInterface* parent ) ;
33
34
virtual
StatusCode
initialize
()
override
;
35
36
sTgcDigit
*
getDigit
(
const
EventContext& ctx,
const
Muon::STGC_RawData
* data)
const override
;
37
38
private
:
39
40
const
sTgcIdHelper
*
m_stgcIdHelper
;
41
ToolHandle<Muon::INSWCalibTool>
m_calibTool
{
this
,
"CalibrationTool"
,
""
};
42
43
};
44
45
}
46
47
inline
sTgcDigit
*
Muon::STGC_RDO_Decoder::getDigit
(
const
EventContext& ctx,
const
Muon::STGC_RawData
* data)
const
48
{
49
// unit conversion
50
Identifier
Id = data->identify();
51
int
tdo = data->tdo();
52
int
pdo = data->charge();
53
uint16_t
bcTag
= data->bcTag();
54
bool
isDead = data->isDead();
55
// MM_RawData has time and charge in counts, need physical units
56
float
charge
{0.}, time{0.};
57
m_calibTool
->tdoToTime (ctx, data->timeAndChargeInCounts(), tdo, Id, time ,
bcTag
);
58
m_calibTool
->pdoToCharge(ctx, data->timeAndChargeInCounts(), pdo, Id,
charge
);
59
60
sTgcDigit
* stgcDigit =
new
sTgcDigit
(Id,
bcTag
,time,
charge
,isDead,
true
);
61
62
return
stgcDigit;
63
}
64
65
#endif
AthAlgTool.h
charge
double charge(const T &p)
Definition
AtlasPID.h:1003
INSWCalibTool.h
ISTGC_RDO_Decoder.h
STGC_RawData.h
bcTag
unsigned bcTag(unsigned bcBitMap)
Definition
TgcByteStreamData.h:357
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
Muon::ISTGC_RDO_Decoder
Definition
ISTGC_RDO_Decoder.h:18
Muon::STGC_RDO_Decoder::initialize
virtual StatusCode initialize() override
Definition
STGC_RDO_Decoder.cxx:16
Muon::STGC_RDO_Decoder::STGC_RDO_Decoder
STGC_RDO_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition
STGC_RDO_Decoder.cxx:9
Muon::STGC_RDO_Decoder::m_calibTool
ToolHandle< Muon::INSWCalibTool > m_calibTool
Definition
STGC_RDO_Decoder.h:41
Muon::STGC_RDO_Decoder::getDigit
sTgcDigit * getDigit(const EventContext &ctx, const Muon::STGC_RawData *data) const override
Definition
STGC_RDO_Decoder.h:47
Muon::STGC_RDO_Decoder::m_stgcIdHelper
const sTgcIdHelper * m_stgcIdHelper
Definition
STGC_RDO_Decoder.h:40
Muon::STGC_RawData
Definition
STGC_RawData.h:15
NswCalibDbTimeChargeData
Definition
NswCalibDbTimeChargeData.h:25
sTgcDigit
Definition
sTgcDigit.h:20
sTgcIdHelper
Definition
sTgcIdHelper.h:55
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
sTgcDigit.h
sTgcIdHelper.h
type
Generated on
for ATLAS Offline Software by
1.17.0