ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetRawEvent
InDetSimData
InDetSimData
TRT_SimHelper.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
InDetSimData helper for TRT
7
This is based on the G3/RD-event. The digitization packages may permit or
8
require more possibilities
9
------------------------------
10
ATLAS Collaboration
11
***************************************************************************/
12
13
// $Id: TRT_SimHelper.h,v 1.2 2003-02-21 13:39:01 candlin Exp $
14
15
#ifndef INDETRAWUTILS_TRT_SIMHELPER_H
16
# define INDETRAWUTILS_TRT_SIMHELPER_H
17
18
//<<<<<< INCLUDES >>>>>>
19
#include "
InDetSimData/InDetSimData.h
"
20
//<<<<<< PUBLIC DEFINES >>>>>>
21
//<<<<<< PUBLIC CONSTANTS >>>>>>
22
//<<<<<< PUBLIC TYPES >>>>>>
23
//<<<<<< PUBLIC VARIABLES >>>>>>
24
//<<<<<< PUBLIC FUNCTIONS >>>>>>
25
//<<<<<< CLASS DECLARATIONS >>>>>>
26
27
class
TRT_SimHelper
28
{
29
public
:
30
// methods to set characteristics of a new object
31
static
void
aboveTR_Thresh
(
InDetSimData
& sdo,
bool
flag);
32
static
void
deadChannel
(
InDetSimData
& sdo,
bool
flag);
33
static
void
rodData
(
InDetSimData
& sdo,
bool
flag);
34
// check to know if time is ok for rod data
35
static
void
validStraw
(
InDetSimData
& sdo,
bool
flag);
36
// An invalid straw may have a valid hit - time is zero, but
37
// is_above_TR_thresh may be set
38
static
void
hasHit
(
InDetSimData
& sdo,
bool
flag);
39
40
// methods for clients
41
static
bool
isAboveTR_Thresh
(
const
InDetSimData
& sdo);
42
static
bool
isDeadChannel
(
const
InDetSimData
& sdo);
43
static
bool
isRodData
(
const
InDetSimData
& sdo);
44
static
bool
isValidStraw
(
const
InDetSimData
& sdo);
45
static
bool
HasHit
(
const
InDetSimData
& sdo);
46
// Probably useful at some point:
47
// static bool isRejected(const InDetSimData& sdo,
48
// bool rejectOutOfBunch,
49
// bool rejectUnconnected,
50
// bool rejectBelowThreshold,
51
// bool rejectDisabled,
52
// bool rejectLostInReadout,
53
// bool rejectNotTrack,
54
// bool rejectExtraNoise,
55
// bool rejectBadTOT);
56
private
:
57
enum
58
{
59
ABTR_SET
= 0x1,
ABTR_CLEAR
= 0xfffffffe,
60
DEAD_SET
= 0x2,
DEAD_CLEAR
= 0xfffffffd,
61
ROD_SET
= 0x4,
ROD_CLEAR
= 0xfffffffb,
62
VALID_SET
= 0x8,
VALID_CLEAR
= 0xfffffff7,
63
HIT_SET
= 0x10,
HIT_CLEAR
= 0xffffffef
64
};
65
};
66
67
68
69
70
inline
void
TRT_SimHelper::aboveTR_Thresh
(
InDetSimData
& sdo,
bool
flag)
71
{
72
if
(flag)
73
{
74
sdo.
m_word
|=
ABTR_SET
;
75
}
76
else
77
{
78
sdo.
m_word
&=
ABTR_CLEAR
;
79
};
80
}
81
82
inline
void
TRT_SimHelper::deadChannel
(
InDetSimData
& sdo,
bool
flag)
83
{
84
if
(flag)
85
{
86
sdo.
m_word
|=
DEAD_SET
;
87
}
88
else
89
{
90
sdo.
m_word
&=
DEAD_CLEAR
;
91
};
92
}
93
94
inline
void
TRT_SimHelper::rodData
(
InDetSimData
& sdo,
bool
flag)
95
{
96
if
(flag)
97
{
98
sdo.
m_word
|=
ROD_SET
;
99
}
100
else
101
{
102
sdo.
m_word
&=
ROD_CLEAR
;
103
};
104
}
105
106
inline
void
TRT_SimHelper::validStraw
(
InDetSimData
& sdo,
bool
flag)
107
{
108
109
if
(flag)
110
{
111
sdo.
m_word
|=
VALID_SET
;
112
}
113
else
114
{
115
sdo.
m_word
&=
VALID_CLEAR
;
116
};
117
}
118
inline
void
TRT_SimHelper::hasHit
(
InDetSimData
& sdo,
bool
flag)
119
{
120
121
if
(flag)
122
{
123
sdo.
m_word
|=
HIT_SET
;
124
}
125
else
126
{
127
sdo.
m_word
&=
HIT_CLEAR
;
128
};
129
}
130
131
132
133
inline
bool
TRT_SimHelper::isAboveTR_Thresh
(
const
InDetSimData
& sdo)
134
{
135
return
(sdo.
m_word
&
ABTR_SET
) != 0;
136
}
137
138
inline
bool
TRT_SimHelper::isDeadChannel
(
const
InDetSimData
& sdo)
139
{
140
return
(sdo.
m_word
&
DEAD_SET
) != 0;
141
}
142
143
inline
bool
TRT_SimHelper::isRodData
(
const
InDetSimData
& sdo)
144
{
145
return
(sdo.
m_word
&
ROD_SET
) != 0;
146
}
147
148
inline
bool
TRT_SimHelper::isValidStraw
(
const
InDetSimData
& sdo)
149
{
150
return
(sdo.
m_word
&
VALID_SET
) != 0;
151
}
152
inline
bool
TRT_SimHelper::HasHit
(
const
InDetSimData
& sdo)
153
{
154
return
(sdo.
m_word
&
HIT_SET
) != 0;
155
}
156
//inline bool TRT_SimHelper::isRejected(const InDetSimData& sdo,
157
// bool rejectOutOfBunch,
158
// bool rejectUnconnected,
159
// bool rejectBelowThreshold,
160
// bool rejectDisabled,
161
// bool rejectLostInReadout,
162
// bool rejectNotTrack,
163
// bool rejectExtraNoise,
164
// bool rejectBadTOT)
165
//{
166
// rejectOutOfBunch not implemented
167
// rejectUnconnected not implemented
168
// if (rejectBelowThreshold && isBelowThreshold(sdo) && !isNoise(sdo))
169
// return true; // as in previous PixelDigitTDR_Cnv
170
// if (rejectDisabled && isDisabled(sdo)) return true;
171
// rejectLostInReadout not implemented
172
// if (rejectBadTOT && hasBadTOT(sdo)) return true;
173
// rejectNotTrack not implemented
174
// if (rejectExtraNoise && isNoise(sdo) && isBelowThreshold(sdo))
175
// return true;
176
// return false;
177
//}
178
179
//<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
180
//<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
181
182
#endif
// INDETRAWUTILS_TRT_SIMHELPER_H
183
InDetSimData.h
InDetSimData
Definition
InDetSimData.h:42
InDetSimData::m_word
int m_word
Definition
InDetSimData.h:64
TRT_SimHelper
Definition
TRT_SimHelper.h:28
TRT_SimHelper::aboveTR_Thresh
static void aboveTR_Thresh(InDetSimData &sdo, bool flag)
Definition
TRT_SimHelper.h:70
TRT_SimHelper::ABTR_CLEAR
@ ABTR_CLEAR
Definition
TRT_SimHelper.h:59
TRT_SimHelper::DEAD_CLEAR
@ DEAD_CLEAR
Definition
TRT_SimHelper.h:60
TRT_SimHelper::VALID_CLEAR
@ VALID_CLEAR
Definition
TRT_SimHelper.h:62
TRT_SimHelper::HIT_SET
@ HIT_SET
Definition
TRT_SimHelper.h:63
TRT_SimHelper::ROD_CLEAR
@ ROD_CLEAR
Definition
TRT_SimHelper.h:61
TRT_SimHelper::VALID_SET
@ VALID_SET
Definition
TRT_SimHelper.h:62
TRT_SimHelper::ROD_SET
@ ROD_SET
Definition
TRT_SimHelper.h:61
TRT_SimHelper::ABTR_SET
@ ABTR_SET
Definition
TRT_SimHelper.h:59
TRT_SimHelper::HIT_CLEAR
@ HIT_CLEAR
Definition
TRT_SimHelper.h:63
TRT_SimHelper::DEAD_SET
@ DEAD_SET
Definition
TRT_SimHelper.h:60
TRT_SimHelper::rodData
static void rodData(InDetSimData &sdo, bool flag)
Definition
TRT_SimHelper.h:94
TRT_SimHelper::HasHit
static bool HasHit(const InDetSimData &sdo)
Definition
TRT_SimHelper.h:152
TRT_SimHelper::deadChannel
static void deadChannel(InDetSimData &sdo, bool flag)
Definition
TRT_SimHelper.h:82
TRT_SimHelper::isDeadChannel
static bool isDeadChannel(const InDetSimData &sdo)
Definition
TRT_SimHelper.h:138
TRT_SimHelper::isAboveTR_Thresh
static bool isAboveTR_Thresh(const InDetSimData &sdo)
Definition
TRT_SimHelper.h:133
TRT_SimHelper::isValidStraw
static bool isValidStraw(const InDetSimData &sdo)
Definition
TRT_SimHelper.h:148
TRT_SimHelper::validStraw
static void validStraw(InDetSimData &sdo, bool flag)
Definition
TRT_SimHelper.h:106
TRT_SimHelper::hasHit
static void hasHit(InDetSimData &sdo, bool flag)
Definition
TRT_SimHelper.h:118
TRT_SimHelper::isRodData
static bool isRodData(const InDetSimData &sdo)
Definition
TRT_SimHelper.h:143
Generated on
for ATLAS Offline Software by
1.17.0