ATLAS Offline Software
InnerDetector
InDetDetDescr
TRT_ReadoutGeometry
src
TRT_EndcapCode.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_EndcapCode.h
"
6
#include <string>
7
#include <sstream>
8
9
namespace
InDetDD
{
10
11
//
12
// Mask
13
//
14
const
int
TRT_EndcapCode::Z_MASK
= 0x00000001;
// lowest six bits
15
const
int
TRT_EndcapCode::WHEEL_MASK
= 0x0000001F;
// lowest five
16
const
int
TRT_EndcapCode::STRAWLAYER_MASK
= 0x0000001F;
// lowest five
17
const
int
TRT_EndcapCode::PHIPOS_MASK
= 0x0000001F;
18
19
//
20
// Shifts
21
//
22
const
int
TRT_EndcapCode::Z_SHIFT
= 0;
23
const
int
TRT_EndcapCode::WHEEL_SHIFT
= 1;
24
const
int
TRT_EndcapCode::STRAWLAYER_SHIFT
= 6;
25
const
int
TRT_EndcapCode::PHIPOS_SHIFT
= 11;
26
27
TRT_EndcapCode::TRT_EndcapCode
()
28
{
29
m_key
= 0;
30
}
31
32
TRT_EndcapCode::TRT_EndcapCode
(
unsigned
isPos,
unsigned
wheelIndex,
unsigned
strawLayerIndex,
unsigned
int
phiIndex
)
33
:
34
m_key ((( isPos & Z_MASK ) << Z_SHIFT) |
35
(( wheelIndex & WHEEL_MASK ) << WHEEL_SHIFT) |
36
(( strawLayerIndex & STRAWLAYER_MASK ) << STRAWLAYER_SHIFT) |
37
((
phiIndex
& PHIPOS_MASK ) << PHIPOS_SHIFT))
38
{
39
}
40
41
TRT_EndcapCode::TRT_EndcapCode
(
const
TRT_EndcapCode
&right)
42
{
43
m_key
= right.
getKey
();
44
}
45
46
47
48
49
50
51
52
TRT_EndcapCode
&
TRT_EndcapCode::operator=
(
const
TRT_EndcapCode
&right)
53
{
54
if
(
this
!= &right){
55
m_key
= right.
getKey
();
56
}
57
return
*
this
;
58
}
59
60
61
62
std::string
TRT_EndcapCode::getName
()
const
{
63
std::ostringstream
outputStream
;
64
outputStream
<<
this
;
65
return
outputStream
.str();
66
}
67
68
}
InDetDD::TRT_EndcapCode::PHIPOS_MASK
static const int PHIPOS_MASK
Definition:
TRT_EndcapCode.h:68
InDetDD::TRT_EndcapCode::WHEEL_MASK
static const int WHEEL_MASK
Definition:
TRT_EndcapCode.h:66
InDetDD::TRT_EndcapCode::operator=
TRT_EndcapCode & operator=(const TRT_EndcapCode &right)
Definition:
TRT_EndcapCode.cxx:52
RunGeantinoStepRecordingITk.outputStream
outputStream
Definition:
RunGeantinoStepRecordingITk.py:126
InDetDD::TRT_EndcapCode::PHIPOS_SHIFT
static const int PHIPOS_SHIFT
Definition:
TRT_EndcapCode.h:73
TRT_EndcapCode.h
InDetDD::TRT_EndcapCode
Definition:
TRT_EndcapCode.h:27
InDetDD::TRT_EndcapCode::Z_MASK
static const int Z_MASK
Definition:
TRT_EndcapCode.h:65
InDetDD::TRT_EndcapCode::getName
std::string getName() const
Definition:
TRT_EndcapCode.cxx:62
InDetDD::TRT_EndcapCode::m_key
unsigned short int m_key
Definition:
TRT_EndcapCode.h:63
InDetDD::TRT_EndcapCode::STRAWLAYER_SHIFT
static const int STRAWLAYER_SHIFT
Definition:
TRT_EndcapCode.h:72
InDetDD::TRT_EndcapCode::Z_SHIFT
static const int Z_SHIFT
Definition:
TRT_EndcapCode.h:70
InDetDD::TRT_EndcapCode::TRT_EndcapCode
TRT_EndcapCode()
Definition:
TRT_EndcapCode.cxx:27
InDetDD::TRT_EndcapCode::WHEEL_SHIFT
static const int WHEEL_SHIFT
Definition:
TRT_EndcapCode.h:71
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_EndcapCode::getKey
unsigned int getKey() const
Definition:
TRT_EndcapCode.h:100
InDetDD::TRT_EndcapCode::STRAWLAYER_MASK
static const int STRAWLAYER_MASK
Definition:
TRT_EndcapCode.h:67
Generated on Sun Dec 22 2024 21:21:39 for ATLAS Offline Software by
1.8.18