ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArRawConditions
LArRawConditions
LArWFParams.h
Go to the documentation of this file.
1
//Dear emacs, this is -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
8
#ifndef LARWFPARAMS_H
9
#define LARWFPARAMS_H
10
11
#include "
LArIdentifier/LArOnlineID.h
"
12
#include "
CaloIdentifier/CaloGain.h
"
13
14
#include "
LArRawConditions/LArCaliPulseParamsComplete.h
"
15
#include "
LArRawConditions/LArDetCellParamsComplete.h
"
16
#include "
LArRawConditions/LArPhysCaliTdiffComplete.h
"
17
#include "
LArRawConditions/LArTdriftComplete.h
"
18
19
class
LArWFParams
20
{
21
22
public
:
23
25
LArWFParams
();
26
28
29
LArWFParams
(
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
30
double
taur
,
double
tshaper
,
double
ampli,
double
tdiff
);
31
LArWFParams
(
unsigned
flag,
32
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
33
double
taur
,
double
tshaper
,
double
ampli,
double
tdiff
);
34
37
38
LArWFParams
(
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
double
taur
,
39
double
tshaper
,
double
ampli);
40
LArWFParams
(
unsigned
flag,
41
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
42
double
taur
,
double
tshaper
,
double
ampli);
43
47
48
LArWFParams
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
49
const
LArCaliPulseParamsComplete
& caliPar,
50
const
LArDetCellParamsComplete
& detPar,
51
const
LArPhysCaliTdiffComplete&
tdiff
,
52
const
LArTdriftComplete
&
tdrift
);
53
// set methods
54
55
void
setFlag
(
unsigned
flag);
56
57
void
setTcal
(
double
tcal
);
58
void
setFstep
(
double
fstep
);
59
void
setTdrift
(
double
tdrift
);
// change of Tdrift value
60
void
setOmega0
(
double
omega0
);
61
void
setTaur
(
double
taur
);
62
void
setTshaper
(
double
tsh);
63
void
setAmplitude
(
double
ampli);
64
void
setTdiff
(
double
tdiff
);
65
66
void
setValid
();
67
void
setBad
();
68
71
72
bool
set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
73
const
LArCaliPulseParamsComplete
& caliPar);
74
bool
set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
75
const
LArDetCellParamsComplete
& detPar);
76
bool
set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
77
const
LArPhysCaliTdiffComplete&
tdiff
);
78
bool
set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
79
const
LArTdriftComplete
&
tdrift
);
80
81
// get methods
82
83
unsigned
int
getFlag
()
const
;
84
double
tcal
()
const
;
// exp time constant in calib pulse
85
double
fstep
()
const
;
// asymptotic value of calib pulse (fraction of peak)
86
double
tdrift
()
const
;
// drift time
87
double
omega0
()
const
;
// resonance angular frequency ( = 1/sqrt(LC) )
88
double
taur
()
const
;
// resonance damping factor ( = rC )
89
double
tshaper
()
const
;
// shaper time constant
90
double
amplitude
()
const
;
// usable for Mphys/Mcal
91
double
tdiff
()
const
;
// time difference between phys and calib pulses
92
bool
isValid
()
const
;
93
94
private
:
95
//Parameters needed for Physics prediction:
96
unsigned
int
m_flag
;
/* tell method used for parameters extraction */
97
double
m_Tcal
;
98
double
m_Fstep
;
99
double
m_Tdrift
;
100
double
m_Omega0
;
101
double
m_Taur
;
102
double
m_Tshaper
;
103
double
m_Amplitude
;
104
double
m_Tdiff
;
105
bool
m_isValid
;
106
public
:
107
108
};
109
111
// Inline definitions
113
114
inline
115
LArWFParams::LArWFParams
()
116
:
117
m_flag
(0),
118
m_Tcal
(0),
119
m_Fstep
(0),
120
m_Tdrift
(0),
121
m_Omega0
(0),
122
m_Taur
(0),
123
m_Tshaper
(0),
124
m_Amplitude
(0),
125
m_Tdiff
(0),
126
m_isValid
(false) {}
127
128
inline
129
LArWFParams::LArWFParams
(
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
130
double
taur
,
double
tshaper
,
double
ampli,
131
double
tdiff
)
132
:
133
m_flag
(0),
134
m_Tcal
(
tcal
),
135
m_Fstep
(
fstep
),
136
m_Tdrift
(
tdrift
),
137
m_Omega0
(
omega0
),
138
m_Taur
(
taur
),
139
m_Tshaper
(
tshaper
),
140
m_Amplitude
(ampli),
141
m_Tdiff
(
tdiff
),
142
m_isValid
(true) {}
143
144
inline
145
LArWFParams::LArWFParams
(
unsigned
flag,
146
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
147
double
taur
,
double
tshaper
,
double
ampli,
148
double
tdiff
)
149
:
150
m_flag
(flag),
151
m_Tcal
(
tcal
),
152
m_Fstep
(
fstep
),
153
m_Tdrift
(
tdrift
),
154
m_Omega0
(
omega0
),
155
m_Taur
(
taur
),
156
m_Tshaper
(
tshaper
),
157
m_Amplitude
(ampli),
158
m_Tdiff
(
tdiff
),
159
m_isValid
(true) {}
160
161
inline
162
LArWFParams::LArWFParams
(
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
163
double
taur
,
double
tshaper
,
double
ampli)
164
:
165
m_flag
(0),
166
m_Tcal
(
tcal
),
167
m_Fstep
(
fstep
),
168
m_Tdrift
(
tdrift
),
169
m_Omega0
(
omega0
),
170
m_Taur
(
taur
),
171
m_Tshaper
(
tshaper
),
172
m_Amplitude
(ampli),
173
m_Tdiff
(0),
174
m_isValid
(true) {}
175
176
inline
177
LArWFParams::LArWFParams
(
unsigned
flag,
178
double
tcal
,
double
fstep
,
double
tdrift
,
double
omega0
,
179
double
taur
,
double
tshaper
,
double
ampli)
180
:
181
m_flag
(flag),
182
m_Tcal
(
tcal
),
183
m_Fstep
(
fstep
),
184
m_Tdrift
(
tdrift
),
185
m_Omega0
(
omega0
),
186
m_Taur
(
taur
),
187
m_Tshaper
(
tshaper
),
188
m_Amplitude
(ampli),
189
m_Tdiff
(0),
190
m_isValid
(true) {}
191
192
inline
193
LArWFParams::LArWFParams
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
194
const
LArCaliPulseParamsComplete
& caliPar,
195
const
LArDetCellParamsComplete
& detPar,
196
const
LArPhysCaliTdiffComplete&
tdiff
,
197
const
LArTdriftComplete
&
tdrift
)
198
{
199
m_flag
= 0;
200
m_Amplitude
= 0;
201
m_isValid
= true ;
202
int
igain = (int)gain ;
203
204
m_Tshaper
= 15 ;
205
206
if
( (
m_Tcal
=caliPar.
Tcal
(chID,igain)) == (
float
)
ILArCaliPulseParams::ERRORCODE
)
207
m_isValid
= false ;
208
if
( (
m_Fstep
=caliPar.
Fstep
(chID,igain)) == (
float
)
ILArCaliPulseParams::ERRORCODE
)
209
m_isValid
= false ;
210
211
if
( (
m_Omega0
=detPar.
Omega0
(chID,igain)) == (
float
)
ILArDetCellParams::ERRORCODE
)
212
m_isValid
= false ;
213
if
( (
m_Taur
=detPar.
Taur
(chID,igain)) == (
float
)
ILArDetCellParams::ERRORCODE
)
214
m_isValid
= false ;
215
216
if
( (
m_Tdiff
=
tdiff
.Tdiff(chID,igain)) == (
float
)
ILArPhysCaliTdiff::ERRORCODE
)
217
m_isValid
= false ;
218
219
if
( (
m_Tdrift
=
tdrift
.Tdrift(chID)) == (
float
)
ILArTdrift::ERRORCODE
)
220
m_isValid
= false ;
221
222
}
223
224
inline
void
LArWFParams::setFlag
(
unsigned
flag) {
m_flag
= flag ; }
225
226
inline
void
LArWFParams::setTcal
(
double
tcal
) {
m_Tcal
=
tcal
; }
227
inline
void
LArWFParams::setFstep
(
double
fstep
) {
m_Fstep
=
fstep
; }
228
inline
void
LArWFParams::setTdrift
(
double
tdrift
) {
m_Tdrift
=
tdrift
; }
229
inline
void
LArWFParams::setOmega0
(
double
omega0
) {
m_Omega0
=
omega0
; }
230
inline
void
LArWFParams::setTaur
(
double
taur
) {
m_Taur
=
taur
; }
231
inline
void
LArWFParams::setTshaper
(
double
tsh) {
m_Tshaper
= tsh ; }
232
inline
void
LArWFParams::setAmplitude
(
double
ampli) {
m_Amplitude
= ampli ; }
233
inline
void
LArWFParams::setTdiff
(
double
tdiff
) {
m_Tdiff
=
tdiff
; }
234
235
inline
void
LArWFParams::setValid
() {
m_isValid
= true ; }
236
inline
void
LArWFParams::setBad
() {
m_isValid
= false ; }
237
238
inline
bool
LArWFParams::set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
239
const
LArCaliPulseParamsComplete
& caliPar) {
240
m_Tcal
= caliPar.
Tcal
(chID, (
int
)gain) ;
241
m_Fstep
= caliPar.
Fstep
(chID,(
int
)gain) ;
242
return
(
m_Tcal
!=
ILArCaliPulseParams::ERRORCODE
&&
243
m_Fstep
!=
ILArCaliPulseParams::ERRORCODE
) ;
244
}
245
246
inline
bool
LArWFParams::set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
247
const
LArDetCellParamsComplete
& detPar) {
248
m_Omega0
= detPar.
Omega0
(chID, (
int
)gain) ;
249
m_Fstep
= detPar.
Taur
(chID,(
int
)gain) ;
250
return
(
m_Omega0
!=
ILArDetCellParams::ERRORCODE
&&
251
m_Taur
!=
ILArDetCellParams::ERRORCODE
) ;
252
}
253
254
inline
bool
LArWFParams::set
(
HWIdentifier
chID,
CaloGain::CaloGain
gain,
255
const
LArPhysCaliTdiffComplete&
tdiff
) {
256
m_Tdiff
=
tdiff
.Tdiff(chID, (
int
)gain) ;
257
return
(
m_Tdiff
!=
ILArPhysCaliTdiff::ERRORCODE
) ;
258
}
259
260
inline
bool
LArWFParams::set
(
HWIdentifier
chID,
CaloGain::CaloGain
/*gain*/
,
261
const
LArTdriftComplete
&
tdrift
) {
262
m_Tdrift
=
tdrift
.Tdrift(chID) ;
263
return
(
m_Tdrift
!=
ILArTdrift::ERRORCODE
) ;
264
}
265
266
inline
unsigned
int
LArWFParams::getFlag
()
const
{
return
m_flag
; }
267
inline
double
LArWFParams::tcal
()
const
{
return
m_Tcal
; }
268
inline
double
LArWFParams::fstep
()
const
{
return
m_Fstep
; }
269
inline
double
LArWFParams::tdrift
()
const
{
return
m_Tdrift
; }
270
inline
double
LArWFParams::omega0
()
const
{
return
m_Omega0
; }
271
inline
double
LArWFParams::taur
()
const
{
return
m_Taur
; }
272
inline
double
LArWFParams::tshaper
()
const
{
return
m_Tshaper
; }
273
inline
double
LArWFParams::amplitude
()
const
{
return
m_Amplitude
; }
274
inline
double
LArWFParams::tdiff
()
const
{
return
m_Tdiff
; }
275
inline
bool
LArWFParams::isValid
()
const
{
return
m_isValid
; }
276
277
278
#endif
CaloGain.h
LArCaliPulseParamsComplete.h
LArDetCellParamsComplete.h
LArOnlineID.h
LArPhysCaliTdiffComplete.h
LArTdriftComplete.h
HWIdentifier
Definition
HWIdentifier.h:13
ILArCaliPulseParams::ERRORCODE
@ ERRORCODE
Definition
ILArCaliPulseParams.h:32
ILArDetCellParams::ERRORCODE
@ ERRORCODE
Definition
ILArDetCellParams.h:29
ILArPhysCaliTdiff::ERRORCODE
@ ERRORCODE
Definition
ILArPhysCaliTdiff.h:29
ILArTdrift::ERRORCODE
@ ERRORCODE
Definition
ILArTdrift.h:27
LArCaliPulseParamsComplete
This class implements the ILArCaliPulseParams interface.
Definition
LArCaliPulseParamsComplete.h:29
LArCaliPulseParamsComplete::Tcal
virtual const float & Tcal(const HWIdentifier &CellID, int gain) const
Definition
LArCaliPulseParamsComplete.cxx:50
LArCaliPulseParamsComplete::Fstep
virtual const float & Fstep(const HWIdentifier &CellID, int gain) const
Definition
LArCaliPulseParamsComplete.cxx:56
LArDetCellParamsComplete
This class implements the ILArDetCellParams interface.
Definition
LArDetCellParamsComplete.h:26
LArDetCellParamsComplete::Omega0
virtual const float & Omega0(const HWIdentifier &CellID, int gain) const
Definition
LArDetCellParamsComplete.cxx:25
LArDetCellParamsComplete::Taur
virtual const float & Taur(const HWIdentifier &CellID, int gain) const
Definition
LArDetCellParamsComplete.cxx:31
LArTdriftComplete
This class implements the ILArTdrift interface.
Definition
LArTdriftComplete.h:24
LArWFParams::amplitude
double amplitude() const
Definition
LArWFParams.h:273
LArWFParams::LArWFParams
LArWFParams()
default constructor: empty, "invalid" parameters set:
Definition
LArWFParams.h:115
LArWFParams::setTaur
void setTaur(double taur)
Definition
LArWFParams.h:230
LArWFParams::setBad
void setBad()
Definition
LArWFParams.h:236
LArWFParams::omega0
double omega0() const
Definition
LArWFParams.h:270
LArWFParams::m_Amplitude
double m_Amplitude
Definition
LArWFParams.h:103
LArWFParams::m_Tdrift
double m_Tdrift
Definition
LArWFParams.h:99
LArWFParams::m_isValid
bool m_isValid
Definition
LArWFParams.h:105
LArWFParams::setFstep
void setFstep(double fstep)
Definition
LArWFParams.h:227
LArWFParams::m_Tdiff
double m_Tdiff
Definition
LArWFParams.h:104
LArWFParams::getFlag
unsigned int getFlag() const
Definition
LArWFParams.h:266
LArWFParams::tdiff
double tdiff() const
Definition
LArWFParams.h:274
LArWFParams::m_Fstep
double m_Fstep
Definition
LArWFParams.h:98
LArWFParams::setValid
void setValid()
Definition
LArWFParams.h:235
LArWFParams::tdrift
double tdrift() const
Definition
LArWFParams.h:269
LArWFParams::tshaper
double tshaper() const
Definition
LArWFParams.h:272
LArWFParams::setTdrift
void setTdrift(double tdrift)
Definition
LArWFParams.h:228
LArWFParams::setTcal
void setTcal(double tcal)
Definition
LArWFParams.h:226
LArWFParams::setOmega0
void setOmega0(double omega0)
Definition
LArWFParams.h:229
LArWFParams::fstep
double fstep() const
Definition
LArWFParams.h:268
LArWFParams::m_Tcal
double m_Tcal
Definition
LArWFParams.h:97
LArWFParams::m_flag
unsigned int m_flag
Definition
LArWFParams.h:96
LArWFParams::setFlag
void setFlag(unsigned flag)
Definition
LArWFParams.h:224
LArWFParams::setTshaper
void setTshaper(double tsh)
Definition
LArWFParams.h:231
LArWFParams::tcal
double tcal() const
Definition
LArWFParams.h:267
LArWFParams::setTdiff
void setTdiff(double tdiff)
Definition
LArWFParams.h:233
LArWFParams::m_Taur
double m_Taur
Definition
LArWFParams.h:101
LArWFParams::setAmplitude
void setAmplitude(double ampli)
Definition
LArWFParams.h:232
LArWFParams::taur
double taur() const
Definition
LArWFParams.h:271
LArWFParams::m_Tshaper
double m_Tshaper
Definition
LArWFParams.h:102
LArWFParams::set
bool set(HWIdentifier chID, CaloGain::CaloGain gain, const LArCaliPulseParamsComplete &caliPar)
the followings pick up values from smaller Complete structures, return value is false if parameters w...
Definition
LArWFParams.h:238
LArWFParams::m_Omega0
double m_Omega0
Definition
LArWFParams.h:100
LArWFParams::isValid
bool isValid() const
Definition
LArWFParams.h:275
CaloGain::CaloGain
CaloGain
Definition
CaloGain.h:11
Generated on
for ATLAS Offline Software by
1.17.0