ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonEventTPCnv
src
MuonPrepRawData
CscPrepDataCnv_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: CscPrepDataCnv_p2.cxx
8
//
9
//-----------------------------------------------------------------------------
10
11
#include "
MuonPrepRawData/CscPrepData.h
"
12
#include "
MuonEventTPCnv/MuonPrepRawData/CscPrepDataCnv_p2.h
"
13
14
Muon::CscPrepData
15
CscPrepDataCnv_p2::createCscPrepData
(
const
Muon::CscPrepData_p2
*persObj,
16
const
Identifier
& clusId,
17
const
MuonGM::CscReadoutElement
* detEl,
18
MsgStream & log )
19
{
20
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"CscPrepDataCnv_p2::persToTrans"
<<
endmsg
;
21
22
Amg::Vector2D
localPos;
23
localPos[
Trk::locX
] = persObj->
m_locX
;
24
localPos[
Trk::locY
] = 0.0;
25
26
std::vector<Identifier> rdoList(1);
27
rdoList[0]=clusId;
28
29
auto
cmat =
Amg::MatrixX
(1,1);
30
cmat(0,0) =
static_cast<
double
>
(persObj->
m_errorMat
);
31
32
Muon::CscPrepData
data (clusId,
33
0,
// idDE,
34
localPos,
35
std::move(rdoList),
36
std::move(cmat),
37
detEl,
38
persObj->
m_charge
,
39
persObj->
m_time
,
40
static_cast<
Muon::CscClusterStatus
>
((persObj->
m_status
)&0xFF),
// First 8 bits reserved for ClusterStatus.
41
static_cast<
Muon::CscTimeStatus
>
((persObj->
m_status
)>>8)
42
);
43
return
data;
44
}
45
46
void
CscPrepDataCnv_p2::
47
persToTrans
(
const
Muon::CscPrepData_p2
*persObj,
Muon::CscPrepData
*transObj,MsgStream & log )
48
{
49
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"CscPrepDataCnv_p2::persToTrans"
<<
endmsg
;
50
51
*transObj =
createCscPrepData
(persObj,
52
transObj->
identify
(),
53
transObj->
detectorElement
(),
54
log);
55
}
56
57
void
CscPrepDataCnv_p2::
58
transToPers
(
const
Muon::CscPrepData
*transObj,
Muon::CscPrepData_p2
*persObj, MsgStream & log)
59
{
60
if
(log.level() <= MSG::DEBUG) log << MSG::DEBUG <<
"CscPrepDataCnv_p2::transToPers"
<<
endmsg
;
61
persObj->
m_locX
= transObj->
localPosition
()[
Trk::locX
];
62
persObj->
m_errorMat
= transObj->
localCovariance
()(0,0);
63
64
//CscPrepData - specific
65
persObj->
m_charge
= transObj->
charge
();
66
persObj->
m_time
= transObj->
time
();
67
persObj->
m_status
= (transObj->
timeStatus
()<<8);
// First 8 bits reserved for ClusterStatus.
68
persObj->
m_status
+= transObj->
status
();
69
}
70
71
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CscPrepDataCnv_p2.h
CscPrepData.h
CscPrepDataCnv_p2::transToPers
void transToPers(const Muon::CscPrepData *transObj, Muon::CscPrepData_p2 *persObj, MsgStream &log)
Definition
CscPrepDataCnv_p2.cxx:58
CscPrepDataCnv_p2::persToTrans
void persToTrans(const Muon::CscPrepData_p2 *persObj, Muon::CscPrepData *transObj, MsgStream &log)
Definition
CscPrepDataCnv_p2.cxx:47
CscPrepDataCnv_p2::createCscPrepData
static Muon::CscPrepData createCscPrepData(const Muon::CscPrepData_p2 *persObj, const Identifier &clusId, const MuonGM::CscReadoutElement *detEl, MsgStream &log)
Definition
CscPrepDataCnv_p2.cxx:15
MuonGM::CscReadoutElement
Definition
CscReadoutElement.h:56
Muon::CscPrepData_p2
We don't write out (from Trk::PrepRawData) m_indexAndHash (can be recomputed), m_clusId (can be recom...
Definition
CscPrepData_p2.h:25
Muon::CscPrepData_p2::m_time
float m_time
Definition
CscPrepData_p2.h:40
Muon::CscPrepData_p2::m_errorMat
float m_errorMat
1-d ErrorMatrix in the base class.
Definition
CscPrepData_p2.h:34
Muon::CscPrepData_p2::m_locX
float m_locX
Equivalent to localPosition (locX) in the base class.
Definition
CscPrepData_p2.h:33
Muon::CscPrepData_p2::m_status
int m_status
in here we pack both the transient values m_status and m_timeStatus (introduced in MuonPrepRawData-03...
Definition
CscPrepData_p2.h:41
Muon::CscPrepData_p2::m_charge
int m_charge
Definition
CscPrepData_p2.h:39
Muon::CscPrepData
Class representing clusters from the CSC.
Definition
CscPrepData.h:39
Muon::CscPrepData::timeStatus
CscTimeStatus timeStatus() const
Returns the Csc time status flag.
Definition
CscPrepData.h:167
Muon::CscPrepData::detectorElement
virtual const MuonGM::CscReadoutElement * detectorElement() const override final
Return the detector element corresponding to this PRD.
Definition
CscPrepData.h:147
Muon::CscPrepData::time
double time() const
Returns the time.
Definition
CscPrepData.h:157
Muon::CscPrepData::charge
int charge() const
Returns the charge.
Definition
CscPrepData.h:152
Muon::CscPrepData::status
CscClusterStatus status() const
Returns the Csc status (position measurement) flag.
Definition
CscPrepData.h:162
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
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
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon::CscClusterStatus
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
Definition
CscClusterStatus.h:23
Muon::CscTimeStatus
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...
Definition
CscTimeStatus.h:24
Trk::locY
@ locY
local cartesian
Definition
ParamDefs.h:38
Trk::locX
@ locX
Definition
ParamDefs.h:37
Generated on
for ATLAS Offline Software by
1.17.0