ATLAS Offline Software
Loading...
Searching...
No Matches
MdtDriftCircleOnTrackCnv_p2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: MdtDriftCircleOnTrackCnv_p2.cxx
8//
9//-----------------------------------------------------------------------------
10
15
16#include <iostream>
17
20 Muon::MdtDriftCircleOnTrack *transObj, MsgStream &log )
21{
23 m_elCnv.persToTrans(&persObj->m_prdLink,&rio,log);
24
25 Trk::LocalParameters localParams;
26 fillTransFromPStore( &m_localParCnv, persObj->m_localParams, &localParams, log );
27
28 Trk::ErrorMatrix dummy;
29 Amg::MatrixX localCovariance;
30 fillTransFromPStore( &m_errorMxCnv, persObj->m_localErrMat, &dummy, log );
31 EigenHelpers::vectorToEigenMatrix(dummy.values, localCovariance, "MdtDriftCircleOnTrackCnv_p2");
32
33
34
35 *transObj = Muon::MdtDriftCircleOnTrack (rio,
36 std::move(localParams),
37 std::move(localCovariance),
38 Identifier(persObj->m_id),
39 nullptr, // detEl,
40 persObj->m_driftTime,
41 static_cast<Trk::DriftCircleStatus>( persObj->m_status ),
42 persObj->m_positionAlongWire,
43 persObj->m_localAngle,
45 // Attempt to call supertool to fill in detElements
46 m_eventCnvTool->recreateRIO_OnTrack(transObj);
47
48}
49
52 Muon::MdtDriftCircleOnTrack_p2 *persObj, MsgStream &log)
53{
54 // Prepare ELs
57 m_eventCnvTool->prepareRIO_OnTrackLink(transObj, key, index);
59 m_elCnv.transToPers(&eltmp, &persObj->m_prdLink,log);
60
61 persObj->m_id = transObj->identify().get_identifier32().get_compact();
62 persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log );
64 EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "MdtDriftCircleOnTrackCnv_p2");
65 persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log );
66
67
68 persObj->m_status = static_cast<unsigned int>( transObj->status() );
69 persObj->m_localAngle = transObj->localAngle() ;
70 persObj->m_positionAlongWire = transObj->positionAlongWire() ;
71 persObj->m_driftTime = transObj->driftTime() ;
72 persObj->m_muonDriftCircleErrorStrategy = transObj->errorStrategy().getBits().to_ulong();
73}
74
ElementLink< Muon::MdtPrepDataContainer > ElementLinkToIDC_MDT_Container
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
void persToTrans(const Muon ::MdtDriftCircleOnTrack_p2 *persObj, Muon ::MdtDriftCircleOnTrack *transObj, MsgStream &log)
ElementLinkCnv_p3< ElementLinkToIDC_MDT_Container > m_elCnv
void transToPers(const Muon ::MdtDriftCircleOnTrack *transObj, Muon ::MdtDriftCircleOnTrack_p2 *persObj, MsgStream &log)
Version 2 of the persistent class representing the transient class Muon::MdtDriftCircleOnTrack.
float m_localAngle
This angle is the position of the point of closest approach in cylindrical coordinates,...
float m_driftTime
This is the drift time that was used to calibrate the hit.
unsigned int m_status
Status of Mdt - in transient world this is the Trk::DriftCircleStatus enum.
float m_positionAlongWire
This is the position of the point of closest approach, in the local z coord (i.e.
Identifier32::value_type m_id
base RIO_OnTrack_p1 info
unsigned int m_muonDriftCircleErrorStrategy
Records information about the 'strategy' used by Muon::MdtDriftCircleOnTrackCreator to make this obje...
ElementLinkInt_p3 m_prdLink
Link to PRD.
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
const MuonDriftCircleErrorStrategy & errorStrategy() const
Get information about the creation strategy used by Muon::MdtDriftCircleOnTrackCreator when making th...
Trk::DriftCircleStatus status() const
Returns the status of the drift radius calibration.
double localAngle() const
Returns the local angle, as determined by the extrapolation used when creating this Trk::RIO_OnTrack.
double driftTime() const
Returns the value of the drift time used to obtain the drift radius.
double positionAlongWire() const
Returns the position along the wire, as determined by the extrapolation used when creating this Trk::...
const MuonDriftCircleErrorStrategyInput & getBits() const
std::vector< float > values
std::string ELKey_t
Key and index types used for an EL to IdentifiableContainer.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Identifier identify() const
return the identifier -extends MeasurementBase
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
static void eigenMatrixToVector(VECTOR &vec, COVARIANCE &cov, const char *)
DriftCircleStatus
Enumerates the 'status' of the wire on which the tracks passed (based on the TRT_Side enum,...
Definition index.py:1