ATLAS Offline Software
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 
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 
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 
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
MdtPrepDataCnv_p2.h
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Muon::MdtPrepData_p2::m_status
int m_status
Corresponds to Muon::MdtDriftCircleStatus, which currently has only two defined values.
Definition: MdtPrepData_p2.h:38
MdtPrepDataCnv_p2::persToTrans
void persToTrans(const Muon::MdtPrepData_p2 *persObj, Muon::MdtPrepData *transObj, MsgStream &log)
Definition: MdtPrepDataCnv_p2.cxx:41
Muon::MdtDriftCircleStatus
MdtDriftCircleStatus
Enum to represent the 'status' of Mdt measurements e.g.
Definition: MdtDriftCircleStatus.h:25
Muon::MdtPrepData_p2::m_adc
int m_adc
Definition: MdtPrepData_p2.h:36
MdtPrepData.h
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:146
Muon::MdtPrepData_p2::m_tdc
int m_tdc
Definition: MdtPrepData_p2.h:35
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
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
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
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
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
MdtPrepDataCnv_p2::transToPers
void transToPers(const Muon::MdtPrepData *transObj, Muon::MdtPrepData_p2 *persObj, MsgStream &log)
Definition: MdtPrepDataCnv_p2.cxx:50
Muon::MdtPrepData_p2::m_errorMat
float m_errorMat
1-d ErrorMatrix in the base class.
Definition: MdtPrepData_p2.h:30
Muon::MdtPrepData_p2::m_driftRadius
float m_driftRadius
Equivalent to localPosition (locX) in the base class.
Definition: MdtPrepData_p2.h:29
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::MdtPrepData::status
MdtDriftCircleStatus status() const
Returns the status of the measurement.
Definition: MdtPrepData.h:147
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:141
Identifier
Definition: IdentifierFieldParser.cxx:14