ATLAS Offline Software
InnerDetector
InDetDetDescr
TRT_ReadoutGeometry
src
TRT_BarrelCode.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TRT_ReadoutGeometry/TRT_BarrelCode.h
"
6
#include <string>
7
#include <sstream>
8
9
namespace
InDetDD
{
10
//
11
// Mask
12
//
13
const
int
TRT_BarrelCode::Z_MASK
= 0x00000001;
// lowest six bits
14
const
int
TRT_BarrelCode::MODULE_MASK
= 0x00000003;
// lowest two
15
const
int
TRT_BarrelCode::PHI_MASK
= 0x0000001F;
// lowest five
16
const
int
TRT_BarrelCode::STRAWLAYER_MASK
= 0x0000001F;
// lowest five
17
18
//
19
// Shifts
20
//
21
const
int
TRT_BarrelCode::Z_SHIFT
= 0;
22
const
int
TRT_BarrelCode::MODULE_SHIFT
= 1;
23
const
int
TRT_BarrelCode::PHI_SHIFT
= 3;
24
const
int
TRT_BarrelCode::STRAWLAYER_SHIFT
= 8;
25
26
27
TRT_BarrelCode::TRT_BarrelCode
()
28
{
29
m_key
= 0;
30
}
31
32
TRT_BarrelCode::TRT_BarrelCode
(
unsigned
isPos,
unsigned
moduleIndex,
unsigned
phiIndex
,
unsigned
strawLayerIndex)
33
:
34
m_key ((( isPos & Z_MASK ) << Z_SHIFT) |
35
(( moduleIndex & MODULE_MASK ) << MODULE_SHIFT) |
36
((
phiIndex
& PHI_MASK ) << PHI_SHIFT) |
37
(( strawLayerIndex & STRAWLAYER_MASK ) << STRAWLAYER_SHIFT))
38
{
39
}
40
41
std::string
TRT_BarrelCode::getName
()
const
{
42
std::ostringstream
outputStream
;
43
outputStream
<<
this
;
44
return
outputStream
.str();
45
}
46
47
}
InDetDD::TRT_BarrelCode::STRAWLAYER_SHIFT
static const int STRAWLAYER_SHIFT
Definition:
TRT_BarrelCode.h:77
InDetDD::TRT_BarrelCode::PHI_SHIFT
static const int PHI_SHIFT
Definition:
TRT_BarrelCode.h:76
InDetDD::TRT_BarrelCode::TRT_BarrelCode
TRT_BarrelCode()
Definition:
TRT_BarrelCode.cxx:27
InDetDD::TRT_BarrelCode::m_key
unsigned short int m_key
Definition:
TRT_BarrelCode.h:66
RunGeantinoStepRecordingITk.outputStream
outputStream
Definition:
RunGeantinoStepRecordingITk.py:126
InDetDD::TRT_BarrelCode::MODULE_SHIFT
static const int MODULE_SHIFT
Definition:
TRT_BarrelCode.h:75
InDetDD::TRT_BarrelCode::PHI_MASK
static const int PHI_MASK
Definition:
TRT_BarrelCode.h:70
InDetDD::TRT_BarrelCode::STRAWLAYER_MASK
static const int STRAWLAYER_MASK
Definition:
TRT_BarrelCode.h:71
InDetDD::TRT_BarrelCode::getName
std::string getName() const
Definition:
TRT_BarrelCode.cxx:41
InDetDD::TRT_BarrelCode::Z_SHIFT
static const int Z_SHIFT
Definition:
TRT_BarrelCode.h:74
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition:
EtaPhiLUT.cxx:23
InDetDD
Message Stream Member.
Definition:
FakeTrackBuilder.h:8
InDetDD::TRT_BarrelCode::Z_MASK
static const int Z_MASK
Definition:
TRT_BarrelCode.h:68
TRT_BarrelCode.h
InDetDD::TRT_BarrelCode::MODULE_MASK
static const int MODULE_MASK
Definition:
TRT_BarrelCode.h:69
Generated on Thu Jan 2 2025 21:20:52 for ATLAS Offline Software by
1.8.18