ATLAS Offline Software
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 
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
TRT_DriftCircleCnv_p2::persToTrans
void persToTrans(const InDet::TRT_DriftCircle_p2 *persObj, InDet::TRT_DriftCircle *transObj, MsgStream &log)
Definition: TRT_DriftCircleCnv_p2.cxx:44
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
InDet::TRT_DriftCircle_p2::m_locPos
float m_locPos
Definition: TRT_DriftCircle_p2.h:27
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
ParamDefs.h
InDet::TRT_DriftCircle
Definition: TRT_DriftCircle.h:32
TRT_DriftCircleCnv_p2::transToPers
void transToPers(const InDet::TRT_DriftCircle *transObj, InDet::TRT_DriftCircle_p2 *persObj, MsgStream &log)
Definition: TRT_DriftCircleCnv_p2.cxx:55
InDet::TRT_DriftCircle_p2::m_errMat
float m_errMat
Definition: TRT_DriftCircle_p2.h:28
TRT_DriftCircleCnv_p2.h
TRT_DriftCircle.h
EventPrimitives.h
InDet::TRT_DriftCircle_p2
Definition: TRT_DriftCircle_p2.h:20
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
InDet::TRT_DriftCircle_p2::m_TRTdata
unsigned int m_TRTdata
Definition: TRT_DriftCircle_p2.h:29
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
InDet::TRT_DriftCircle::getWord
unsigned int getWord() const
returns the TRT dataword
TRT_DriftCircleCnv_p2::createTRT_DriftCircle
InDet::TRT_DriftCircle createTRT_DriftCircle(const InDet::TRT_DriftCircle_p2 *persObj, Identifier clusId, std::vector< Identifier > &&rdoList, const InDetDD::TRT_BaseElement *detEl, MsgStream &log)
Definition: TRT_DriftCircleCnv_p2.cxx:19
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57
Identifier
Definition: IdentifierFieldParser.cxx:14