ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSegmentCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12
13void MuonSegmentCnv_p1::persToTrans( const Muon::MuonSegment_p1 *persObj, Muon::MuonSegment *transObj, MsgStream &log )
14{
15 Amg::Vector2D locSegPos;
16 locSegPos.setZero();
17
18 Trk::LocalDirection localDirection;
19 m_localDirCnv.persToTrans(&persObj->m_localDirection,&localDirection,log);
20
21 ITPConverterFor<Trk::Surface> *associatedSurfaceCnv(nullptr);
22 Trk::Surface* temp = createTransFromPStore( &associatedSurfaceCnv, persObj->m_associatedSurface, log );
23 Trk::PlaneSurface* associatedSurface =
24 dynamic_cast<Trk::PlaneSurface*>(temp);
25 if(!associatedSurface) throw std::runtime_error( "MuonSegmentCnv_p1::persToTrans : Cannot get associated surface!" );
26
27
28 *transObj = Muon::MuonSegment (locSegPos,
29 localDirection,
30 Amg::MatrixX(), // locErr,
31 associatedSurface,
33 nullptr, // qual
35 );
36 fillTransFromPStore( &m_segmentCnv, persObj->m_segment, transObj, log );
37 transObj->setT0Error (persObj->m_t0, persObj->m_t0Error);
38 transObj->recalculateCache();
39}
40
41
42void MuonSegmentCnv_p1::transToPers( const Muon::MuonSegment */*transObj*/, Muon::MuonSegment_p1 */*persObj*/, MsgStream &/*log*/ )
43{
44 throw std::runtime_error( "MuonSegmentCnv_p1::transToPers is deprecated!" );
45}
Derived DataVector<T>.
Definition DataVector.h:795
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
SegmentCnv_p1 * m_segmentCnv
LocalDirectionCnv_p1 m_localDirCnv
void persToTrans(const Muon ::MuonSegment_p1 *persObj, Muon::MuonSegment *transObj, MsgStream &log)
void transToPers(const Muon ::MuonSegment *transObj, Muon::MuonSegment_p1 *persObj, MsgStream &log)
Trk::LocalDirection_p1 m_localDirection
This is the common class for 3D segments used in the muon spectrometer.
void recalculateCache()
recalculate the cache
void setT0Error(float t0, float t0Error)
set the fitted time and error on the time
represents the three-dimensional global direction with respect to a planar surface frame.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Abstract Base Class for tracking surfaces.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D