ATLAS Offline Software
Loading...
Searching...
No Matches
RpcClusterOnTrackCnv_p3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: RpcClusterOnTrackCnv_p3.cxx
8//
9//-----------------------------------------------------------------------------
10
14
15
18 Muon::RpcClusterOnTrack *transObj, MsgStream &log )
19{
20 Trk::LocalParameters localParams;
21 fillTransFromPStore( &m_localParCnv, persObj->m_localParams, &localParams, log );
22
23 Trk::ErrorMatrix dummy;
24 Amg::MatrixX localCovariance;
25 fillTransFromPStore( &m_errorMxCnv, persObj->m_localErrMat, &dummy, log );
26 EigenHelpers::vectorToEigenMatrix(dummy.values, localCovariance, "RpcClusterOnTrackCnv_p3");
27
29 m_elCnv.persToTrans(&persObj->m_prdLink,&rio,log);
30
31 *transObj = Muon::RpcClusterOnTrack (rio,
32 std::move(localParams),
33 std::move(localCovariance),
34 Identifier(persObj->m_id),
35 nullptr, // detEL
36 persObj->m_positionAlongStrip,
37 persObj->m_time
38 );
39
40 // Attempt to call supertool to fill in detElements
41 m_eventCnvTool->recreateRIO_OnTrack(transObj);
42 if (transObj->detectorElement()==nullptr)
43 log << MSG::WARNING<<"Unable to reset DetEl for this RIO_OnTrack, "
44 << "probably because of a problem with the Identifier/IdentifierHash : ("
45 << transObj->identify()<<"/"<<transObj->idDE()<<endmsg;
46}
47
48
51 Muon::RpcClusterOnTrack_p3 *persObj, MsgStream &log )
52{
53 // Prepare ELs
56 m_eventCnvTool->prepareRIO_OnTrackLink(transObj, key, index);
58
59 m_elCnv.transToPers(&eltmp,&persObj->m_prdLink,log);
60 persObj->m_positionAlongStrip = transObj->positionAlongStrip();
61 persObj->m_time = transObj->time();
62 persObj->m_id = transObj->identify().get_identifier32().get_compact();
63 persObj->m_localParams = toPersistent( &m_localParCnv, &transObj->localParameters(), log );
65 EigenHelpers::eigenMatrixToVector(pMat.values, transObj->localCovariance(), "RpcClusterOnTrackCnv_p3");
66 persObj->m_localErrMat = toPersistent( &m_errorMxCnv, &pMat, log );
67}
68
69
#define endmsg
ElementLink< Muon::RpcPrepDataContainer > ElementLinkToIDC_RPC_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.
virtual double positionAlongStrip() const
virtual IdentifierHash idDE() const override
Returns an invalid hash.
Version 1 of the persistent class representing the transient class Muon::RpcClusterOnTrack.
ElementLinkInt_p3 m_prdLink
Link to PRD.
float m_positionAlongStrip
position along strip (double in transient world)
Identifier32::value_type m_id
base RIO_OnTrack_p1 info
Class to represent calibrated clusters formed from RPC strips.
virtual const MuonGM::RpcReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
float time() const
Return the time (ns)
void persToTrans(const Muon ::RpcClusterOnTrack_p3 *persObj, Muon ::RpcClusterOnTrack *transObj, MsgStream &log)
void transToPers(const Muon ::RpcClusterOnTrack *transObj, Muon ::RpcClusterOnTrack_p3 *persObj, MsgStream &log)
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
LocalParametersCnv_p1 * m_localParCnv
ElementLinkCnv_p3< ElementLinkToIDC_RPC_Container > m_elCnv
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 *)
Definition index.py:1