ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DriftCircleCnv_p2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5//-----------------------------------------------------------------------------
6//
7// file: TRT_DriftCircleCnv_p2.cxx
8//
9//-----------------------------------------------------------------------------
10
15
16#include <memory>
17
20 Identifier clusId,
21 std::vector<Identifier>&& rdoList,
22 const InDetDD::TRT_BaseElement* detEl,
23 MsgStream &/*log*/)
24{
25 Amg::Vector2D localPos;
26 localPos[Trk::locX] = persObj->m_locPos;
27 localPos[Trk::locY] = 0;
28
29 auto cmat = Amg::MatrixX(1,1);
30 (cmat)(0,0) = static_cast<double>(persObj->m_errMat);
31
32 InDet::TRT_DriftCircle dc (clusId,
33 localPos,
34 std::move(rdoList),
35 std::move(cmat),
36 detEl,
37 persObj->m_TRTdata
38 );
39
40 return dc;
41}
42
43
45 InDet::TRT_DriftCircle *transObj,
46 MsgStream &log)
47{
48 *transObj = createTRT_DriftCircle (persObj,
49 Identifier(),
50 std::vector<Identifier>(),
51 nullptr,
52 log);
53}
54
57 MsgStream &/*log*/)
58{
59 //Save the TRT word
60 persObj->m_TRTdata = transObj->getWord();
61
62// Save bare minimum info to recreate the base class
63// persObj->m_id = (unsigned int) transObj->m_clusId;
64 persObj->m_locPos = transObj->localPosition()[Trk::locX];
65 persObj->m_errMat = (transObj->localCovariance())(0,0);
66
67}
68
Virtual base class of TRT readout elements.
unsigned int getWord() const
returns the TRT dataword
InDet::TRT_DriftCircle createTRT_DriftCircle(const InDet::TRT_DriftCircle_p2 *persObj, Identifier clusId, std::vector< Identifier > &&rdoList, const InDetDD::TRT_BaseElement *detEl, MsgStream &log)
void persToTrans(const InDet::TRT_DriftCircle_p2 *persObj, InDet::TRT_DriftCircle *transObj, MsgStream &log)
void transToPers(const InDet::TRT_DriftCircle *transObj, InDet::TRT_DriftCircle_p2 *persObj, MsgStream &log)
const Amg::Vector2D & localPosition() const
return the local position reference
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
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37