ATLAS Offline Software
TgcPrepDataCnv_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: TgcPrepDataCnv_p2.cxx
8 //
9 //-----------------------------------------------------------------------------
10 
13 
17  const Identifier& id,
18  const MuonGM::TgcReadoutElement* detEl,
19  MsgStream & )
20 {
21  Amg::Vector2D localPos;
22  localPos[Trk::locX] = persObj->m_locX;
23  localPos[Trk::locY] = 0.0;
24 
25  std::vector<Identifier> rdoList(1);
26  rdoList[0]=id;
27 
28  auto cmat = Amg::MatrixX(1,1);
29  cmat(0,0) = static_cast<double>(persObj->m_errorMat);
30 
32  0,
33  localPos,
34  std::move(rdoList),
35  std::move(cmat),
36  detEl);
37  return data;
38 }
39 
41 persToTrans( const Muon::TgcPrepData_p2 *persObj, Muon::TgcPrepData *transObj,MsgStream & log )
42 {
43  *transObj = createTgcPrepData (persObj,
44  transObj->identify(),
45  transObj->detectorElement(),
46  log);
47 }
48 
50 transToPers( const Muon::TgcPrepData *transObj, Muon::TgcPrepData_p2 *persObj, MsgStream & )
51 {
52  //log << MSG::DEBUG << "TgcPrepDataCnv_p2::transToPers" << endmsg;
53  persObj->m_locX = transObj->localPosition().x();
54  persObj->m_errorMat = transObj->localCovariance()(0,0);
55 }
56 
57 
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
TgcPrepDataCnv_p2::createTgcPrepData
static Muon::TgcPrepData createTgcPrepData(const Muon::TgcPrepData_p2 *persObj, const Identifier &id, const MuonGM::TgcReadoutElement *detEl, MsgStream &log)
Definition: TgcPrepDataCnv_p2.cxx:16
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
TgcPrepDataCnv_p2::persToTrans
void persToTrans(const Muon::TgcPrepData_p2 *persObj, Muon::TgcPrepData *transObj, MsgStream &log)
Definition: TgcPrepDataCnv_p2.cxx:41
Muon::TgcPrepData_p2::m_locX
float m_locX
Equivalent to localPosition (locX) in the base class.
Definition: TgcPrepData_p2.h:33
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
TgcPrepDataCnv_p2::transToPers
void transToPers(const Muon::TgcPrepData *transObj, Muon::TgcPrepData_p2 *persObj, MsgStream &log)
Definition: TgcPrepDataCnv_p2.cxx:50
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Muon::TgcPrepData::detectorElement
virtual const MuonGM::TgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD The pointer will be zero if the det el is not ...
Definition: TgcPrepData.h:120
TgcPrepData.h
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
TgcPrepDataCnv_p2.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::TgcPrepData
Class to represent TGC measurements.
Definition: TgcPrepData.h:32
Muon::TgcPrepData_p2
We don't write out (from Trk::PrepRawData) m_indexAndHash (can be recomputed), m_clusId (can be recom...
Definition: TgcPrepData_p2.h:25
Muon::TgcPrepData_p2::m_errorMat
float m_errorMat
1-d ErrorMatrix in the base class.
Definition: TgcPrepData_p2.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14