|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/MsgStream.h"
10 #include "Identifier/Identifier.h"
13 #include "CLHEP/Units/SystemOfUnits.h"
20 #define MAXINT 2147483000
21 #define MAXINT2 -2147483000
25 const std::string&
name,
48 return StatusCode::SUCCESS;
53 const std::vector<float>& ramps,
58 bool CubicFailed=
false;
70 if( maxSample>=
digit->samples().size() )
86 const float invT[3][3]
92 if ( (maxSample) <= 1 )
101 it0 = (maxSample) - 1;
106 float A[3] = {0, 0, 0};
109 for (
int ia = 0; ia < 3; ia++)
110 for (
int it = 0;
it < 3;
it++)
111 A[ia] += invT[ia][
it] * (
digit->samples()[it0+
it] - (pedestal));
114 if ( not ( CubicFailed = (
A[2] == 0 ) ) ) {
115 dtmax = -1.0 *
A[1] / 2.0 /
A[2];
116 if ( ! ( CubicFailed = ( dtmax < 0 || dtmax > 2 ) ) ) {
119 for(
int ia = 0; ia < 3; ia++)
120 ADCPeak +=
A[ia] *
pow(dtmax, ia);
126 const float invT[4][4]
128 { -1.83333, 3, -1.5, 0.333333},
130 {-0.166666, 0.5, -0.5, 0.166666} };
133 if ( (maxSample) <= 1 )
140 it0 = (
digit->samples()[(maxSample)-2] >
digit->samples()[(maxSample)+2] )
146 float A[4] = {0, 0, 0, 0};
150 for (
int ia = 0; ia < 4; ia++)
151 for (
int it = 0;
it < 4;
it++)
152 A[ia] += invT[ia][
it] * (
digit->samples()[it0+
it] - (pedestal));
155 disc =
A[2]*
A[2] - 3*
A[1]*
A[3];
156 if ( ! ( CubicFailed = ( disc < 0 ||
A[3] == 0 ) ) ) {
157 dtmax = (-
A[2]-std::sqrt(disc))/(
A[3]*3);
158 if ( ! ( CubicFailed = ( dtmax < 0 || dtmax > 3 ) ) ) {
160 for(
int ia = 0; ia < 4; ia++)
161 ADCPeak +=
A[ia] *
pow(dtmax, ia);
174 for(
unsigned int i=0;
i<ramps.size();
i++)
186 iprovenance = iprovenance & 0x3FFF;
188 const float fMAXINT =
static_cast<float>(
MAXINT);
189 const float fMAXINT2 =
static_cast<float>(
MAXINT2);
199 #if __GNUC__ >= 11 && __GNUC__ <= 13
200 # pragma GCC diagnostic push
201 # pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
204 #if __GNUC__ >= 11 && __GNUC__ <= 13
205 # pragma GCC diagnostic pop
def retrieve(aClass, aKey=None)
bool is_lar_fcal(Identifier id) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void setErrorString(unsigned int nerr, const std::string &s)
Returns various counters from the LArRawChannel building.
void incrementErrorCount(unsigned int nerr)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
int curr_shiftTimeSamples
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper class for offline cell identifiers.
unsigned int curr_maxsample
unsigned int curr_nsamples
unsigned int returnBitPattern() const
unsigned int qualityBitPattern
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper