ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
SCT3_RawDataCnv_p4.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
#include "
SCT3_RawDataCnv_p4.h
"
6
7
#include "
MsgUtil.h
"
8
9
#include "
InDetEventAthenaPool/SCT3_RawData_p4.h
"
10
#include "
InDetIdentifier/SCT_ID.h
"
11
#include "
InDetRawData/SCT3_RawData.h
"
12
13
#include <vector>
14
15
void
16
SCT3_RawDataCnv_p4::persToTrans
(
const
SCT3_RawData_p4
* persObj,
SCT3_RawData
* transObj, MsgStream& log)
17
{
18
MSG_DEBUG
(log,
"SCT3_RawDataCnv_p4::persToTrans called"
);
19
20
// Convert unsigned short to unsigned int
21
// P: Bits 0-10 for group size, Bits 11-13 for time bin
22
// T: Bits 0-10 for group size, Bits 22-24 for time bin
23
unsigned
int
word =
static_cast<
unsigned
int
>
(persObj->
m_word
);
24
word = ((word & 0x7FF) | (((word >> 11) & 0x7) << 22));
25
26
// Convert row and strip numbers to strip Identifeir using wafer Identifer
27
Identifier
stripId =
m_sctId
->strip_id(
m_waferId
,
28
persObj->
getRow
(),
29
persObj->
getStrip
());
30
31
*transObj =
SCT3_RawData
(stripId, word, std::vector<int>());
32
}
33
34
void
35
SCT3_RawDataCnv_p4::transToPers
(
const
SCT3_RawData
* transObj,
SCT3_RawData_p4
* persObj, MsgStream& log)
36
{
37
MSG_DEBUG
(log,
"SCT3_RawDataCnv_p4::transToPers called"
);
38
39
// Set row and strip numbers
40
persObj->
setRowStrip
(
m_sctId
->row(transObj->
identify
()),
m_sctId
->strip(transObj->
identify
()));
41
42
// Convert unsigned int to unsigned short
43
// T: Bits 0-10 for group size, Bits 22-24 for time bin
44
// P: Bits 0-10 for group size, Bits 11-13 for time bin
45
unsigned
int
word = transObj->
getWord
();
46
word = ((word & 0x7FF) | (((word >> 22) & 0x7) << 11));
47
persObj->
m_word
=
static_cast<
unsigned
short
>
(word);
48
}
MsgUtil.h
MSG_DEBUG
#define MSG_DEBUG(log, x)
Definition
MsgUtil.h:16
SCT3_RawDataCnv_p4.h
SCT3_RawData.h
SCT3_RawData_p4.h
SCT_ID.h
This is an Identifier helper class for the SCT subdetector.
InDetRawData::identify
virtual Identifier identify() const override final
Definition
InDetRawData.h:41
InDetRawData::getWord
unsigned int getWord() const
Definition
InDetRawData.h:47
SCT3_RawDataCnv_p4::m_sctId
const SCT_ID * m_sctId
Definition
SCT3_RawDataCnv_p4.h:29
SCT3_RawDataCnv_p4::m_waferId
Identifier m_waferId
Definition
SCT3_RawDataCnv_p4.h:30
SCT3_RawDataCnv_p4::transToPers
virtual void transToPers(const SCT3_RawData *transObj, SCT3_RawData_p4 *persObj, MsgStream &log)
Definition
SCT3_RawDataCnv_p4.cxx:35
SCT3_RawDataCnv_p4::persToTrans
virtual void persToTrans(const SCT3_RawData_p4 *persObj, SCT3_RawData *transObj, MsgStream &log)
Definition
SCT3_RawDataCnv_p4.cxx:16
SCT3_RawData_p4
S.Oda, Oct 2018 replace unsigned int by unsigned short for for the presampling samples for Overlay MC...
Definition
SCT3_RawData_p4.h:14
SCT3_RawData_p4::getStrip
int getStrip() const
Definition
SCT3_RawData_p4.h:32
SCT3_RawData_p4::setRowStrip
void setRowStrip(const int row, const int strip)
Definition
SCT3_RawData_p4.h:23
SCT3_RawData_p4::getRow
int getRow() const
Definition
SCT3_RawData_p4.h:28
SCT3_RawData_p4::m_word
unsigned short m_word
Definition
SCT3_RawData_p4.h:21
SCT3_RawData
Definition
SCT3_RawData.h:24
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0