ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonEventTPCnv
src
MuonPrepRawData
MdtPrepDataCnv_p2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//-----------------------------------------------------------------------------
6
//
7
// file: MdtPrepDataCnv_p2.cxx
8
//
9
//-----------------------------------------------------------------------------
10
11
#include "
MuonPrepRawData/MdtPrepData.h
"
12
#include "
MuonEventTPCnv/MuonPrepRawData/MdtPrepDataCnv_p2.h
"
13
14
Muon::MdtPrepData
15
MdtPrepDataCnv_p2::
16
createMdtPrepData
(
const
Muon::MdtPrepData_p2
*persObj,
17
const
Identifier
&
id
,
18
const
MuonGM::MdtReadoutElement
* detEl,
19
MsgStream & )
20
{
21
Amg::Vector2D
localPos;
22
localPos[
Trk::locX
] = persObj->
m_driftRadius
;
23
localPos[
Trk::locY
] = 0.0;
24
25
26
auto
cmat =
Amg::MatrixX
(1,1);
27
cmat(0,0) =
static_cast<
double
>
(persObj->
m_errorMat
);
28
29
Muon::MdtPrepData
data(
id
,
30
localPos,
31
std::move(cmat),
32
detEl,
33
persObj->
m_tdc
,
34
persObj->
m_adc
,
35
static_cast<
Muon::MdtDriftCircleStatus
>
(persObj->
m_status
));
36
37
return
data;
38
}
39
40
void
MdtPrepDataCnv_p2::
41
persToTrans
(
const
Muon::MdtPrepData_p2
*persObj,
Muon::MdtPrepData
*transObj,MsgStream & log )
42
{
43
*transObj =
createMdtPrepData
(persObj,
44
transObj->
identify
(),
45
transObj->
detectorElement
(),
46
log);
47
}
48
49
void
MdtPrepDataCnv_p2::
50
transToPers
(
const
Muon::MdtPrepData
*transObj,
Muon::MdtPrepData_p2
*persObj, MsgStream & )
51
{
52
//log << MSG::DEBUG << "MdtPrepDataCnv_p2::transToPers" << endmsg;
53
persObj->
m_driftRadius
= transObj->
localPosition
()[
Trk::locX
];
54
persObj->
m_errorMat
= transObj->
localCovariance
()(0,0);
55
persObj->
m_tdc
= transObj->
tdc
();
56
persObj->
m_adc
= transObj->
adc
();
57
persObj->
m_status
= transObj->
status
();
58
}
59
60
MdtPrepDataCnv_p2.h
MdtPrepData.h
MdtPrepDataCnv_p2::persToTrans
void persToTrans(const Muon::MdtPrepData_p2 *persObj, Muon::MdtPrepData *transObj, MsgStream &log)
Definition
MdtPrepDataCnv_p2.cxx:41
MdtPrepDataCnv_p2::transToPers
void transToPers(const Muon::MdtPrepData *transObj, Muon::MdtPrepData_p2 *persObj, MsgStream &log)
Definition
MdtPrepDataCnv_p2.cxx:50
MdtPrepDataCnv_p2::createMdtPrepData
static Muon::MdtPrepData createMdtPrepData(const Muon::MdtPrepData_p2 *persObj, const Identifier &id, const MuonGM::MdtReadoutElement *detEl, MsgStream &log)
Definition
MdtPrepDataCnv_p2.cxx:16
MuonGM::MdtReadoutElement
Definition
MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Muon::MdtPrepData_p2
Persistent representation of the transient Muon::MdtPrepData class.
Definition
MdtPrepData_p2.h:24
Muon::MdtPrepData_p2::m_status
int m_status
Corresponds to Muon::MdtDriftCircleStatus, which currently has only two defined values.
Definition
MdtPrepData_p2.h:38
Muon::MdtPrepData_p2::m_tdc
int m_tdc
Definition
MdtPrepData_p2.h:35
Muon::MdtPrepData_p2::m_driftRadius
float m_driftRadius
Equivalent to localPosition (locX) in the base class.
Definition
MdtPrepData_p2.h:29
Muon::MdtPrepData_p2::m_adc
int m_adc
Definition
MdtPrepData_p2.h:36
Muon::MdtPrepData_p2::m_errorMat
float m_errorMat
1-d ErrorMatrix in the base class.
Definition
MdtPrepData_p2.h:30
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition
MdtPrepData.h:33
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250).
Definition
MdtPrepData.h:146
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition
MdtPrepData.h:141
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition
MdtPrepData.h:147
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition
MdtPrepData.h:145
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition
EventPrimitives.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition
MdtDriftCircleStatus.h:25
Trk::locY
@ locY
local cartesian
Definition
ParamDefs.h:38
Trk::locX
@ locX
Definition
ParamDefs.h:37
Generated on
for ATLAS Offline Software by
1.17.0