ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonEventTPCnv
src
MuonSegment
MuonSegmentCnv_p2.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
#include "
MuonSegment/MuonSegment.h
"
7
#include "
MuonEventTPCnv/MuonSegment/MuonSegmentCnv_p2.h
"
8
#include "
TrkSurfaces/Surface.h
"
9
#include "
TrkSurfaces/PlaneSurface.h
"
10
#include "
TrkEventCnvTools/DetElementSurface.h
"
11
#include "
TrkEventPrimitives/LocalDirection.h
"
12
13
14
void
MuonSegmentCnv_p2::persToTrans
(
const
Muon::MuonSegment_p1
*persObj,
Muon::MuonSegment
*transObj, MsgStream &log )
15
{
16
Amg::Vector2D
locSegPos;
17
locSegPos.setZero();
18
19
Trk::LocalDirection
localDirection;
20
m_localDirCnv
.persToTrans(&persObj->
m_localDirection
,&localDirection,log);
21
22
Trk::PlaneSurface
* associatedSurface =
23
static_cast<
Trk::PlaneSurface
*
>
(this->
createTransFromPStore
( &
m_surfCnv
, persObj->
m_associatedSurface
, log ));
24
25
*transObj =
Muon::MuonSegment
(locSegPos,
26
localDirection,
27
Amg::MatrixX
(),
// locErr,
28
associatedSurface,
29
DataVector<const Trk::MeasurementBase>
{},
// cmeas,
30
nullptr
,
// qual
31
Trk::Segment::AuthorUnknown
32
);
33
fillTransFromPStore
( &
m_segmentCnv
, persObj->
m_segment
, transObj, log );
34
transObj->
setT0Error
(persObj->
m_t0
, persObj->
m_t0Error
);
35
transObj->
recalculateCache
();
36
}
37
38
39
void
MuonSegmentCnv_p2::transToPers
(
const
Muon::MuonSegment
*transObj,
Muon::MuonSegment_p1
*persObj, MsgStream &log )
40
{
41
persObj->
m_segment
=
baseToPersistent
( &
m_segmentCnv
, transObj, log );
42
m_localDirCnv
.transToPers(&transObj->
localDirection
(),&persObj->
m_localDirection
,log);
43
44
m_surfCnv
=
nullptr
;
45
if
(transObj->
associatedSurface
().
isFree
() )
// if this is a free surface, write it out 'as is'
46
persObj->
m_associatedSurface
=
toPersistent
(&
m_surfCnv
, &transObj->
associatedSurface
(), log);
47
else
{
// else, make it into a DetElementSurface, to allow the correct convertor to be called
48
Trk::DetElementSurface
surf( transObj->
associatedSurface
());
49
persObj->
m_associatedSurface
=
toPersistent
(&
m_surfCnv
, &surf, log);
50
}
51
52
persObj->
m_t0
= transObj->
time
();
53
persObj->
m_t0Error
= transObj->
errorTime
();
54
55
}
DetElementSurface.h
LocalDirection.h
MuonSegmentCnv_p2.h
MuonSegment.h
PlaneSurface.h
Surface.h
DataVector
Derived DataVector<T>.
Definition
DataVector.h:795
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition
TPConverter.h:97
ITPConverterFor< TRANS_BASE >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Definition
TPConverter.h:172
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Definition
TPConverter.h:145
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
MuonSegmentCnv_p2::m_localDirCnv
LocalDirectionCnv_p1 m_localDirCnv
Definition
MuonSegmentCnv_p2.h:40
MuonSegmentCnv_p2::persToTrans
void persToTrans(const Muon ::MuonSegment_p1 *persObj, Muon::MuonSegment *transObj, MsgStream &log)
Definition
MuonSegmentCnv_p2.cxx:14
MuonSegmentCnv_p2::transToPers
void transToPers(const Muon ::MuonSegment *transObj, Muon::MuonSegment_p1 *persObj, MsgStream &log)
Definition
MuonSegmentCnv_p2.cxx:39
MuonSegmentCnv_p2::m_segmentCnv
SegmentCnv_p1 * m_segmentCnv
Definition
MuonSegmentCnv_p2.h:39
MuonSegmentCnv_p2::m_surfCnv
ITPConverterFor< Trk::Surface > * m_surfCnv
Definition
MuonSegmentCnv_p2.h:41
Muon::MuonSegment_p1
Definition
MuonSegment_p1.h:20
Muon::MuonSegment_p1::m_localDirection
Trk::LocalDirection_p1 m_localDirection
Definition
MuonSegment_p1.h:26
Muon::MuonSegment_p1::m_associatedSurface
TPObjRef m_associatedSurface
Definition
MuonSegment_p1.h:27
Muon::MuonSegment_p1::m_segment
TPObjRef m_segment
Definition
MuonSegment_p1.h:24
Muon::MuonSegment_p1::m_t0
float m_t0
Definition
MuonSegment_p1.h:28
Muon::MuonSegment_p1::m_t0Error
float m_t0Error
Definition
MuonSegment_p1.h:29
Muon::MuonSegment
This is the common class for 3D segments used in the muon spectrometer.
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Muon::MuonSegment::recalculateCache
void recalculateCache()
recalculate the cache
Definition
MuonSegment.cxx:109
Muon::MuonSegment::localDirection
const Trk::LocalDirection & localDirection() const
local direction
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:169
Muon::MuonSegment::setT0Error
void setT0Error(float t0, float t0Error)
set the fitted time and error on the time
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:205
Muon::MuonSegment::associatedSurface
virtual const Trk::PlaneSurface & associatedSurface() const override final
returns the surface for the local to global transformation
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:175
Trk::DetElementSurface
Definition
DetElementSurface.h:32
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition
LocalDirection.h:81
Trk::PlaneSurface
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Definition
PlaneSurface.h:64
Trk::Segment::AuthorUnknown
@ AuthorUnknown
Definition
Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:64
Trk::SpaceTimePointBase::errorTime
float errorTime() const
access to the error on the measured time
Definition
SpaceTimePointBase.h:50
Trk::SpaceTimePointBase::time
float time() const
access to the measured time
Definition
SpaceTimePointBase.h:47
Trk::Surface::isFree
bool isFree() const
Returns 'true' if this surface is 'free', i.e.
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition
EventPrimitives.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
Generated on
for ATLAS Offline Software by
1.17.0