ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
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
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
41persToTrans( 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
50transToPers( 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
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
void persToTrans(const Muon::MdtPrepData_p2 *persObj, Muon::MdtPrepData *transObj, MsgStream &log)
void transToPers(const Muon::MdtPrepData *transObj, Muon::MdtPrepData_p2 *persObj, MsgStream &log)
static Muon::MdtPrepData createMdtPrepData(const Muon::MdtPrepData_p2 *persObj, const Identifier &id, const MuonGM::MdtReadoutElement *detEl, MsgStream &log)
Persistent representation of the transient Muon::MdtPrepData class.
int m_status
Corresponds to Muon::MdtDriftCircleStatus, which currently has only two defined values.
float m_driftRadius
Equivalent to localPosition (locX) in the base class.
float m_errorMat
1-d ErrorMatrix in the base class.
Class to represent measurements from the Monitored Drift Tubes.
Definition MdtPrepData.h:33
int adc() const
Returns the ADC (typically range is 0 to 250)
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
MdtDriftCircleStatus status() const
Returns the status of the measurement.
int tdc() const
Returns the TDC (typically range is 0 to 2500).
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37