ATLAS Offline Software
Loading...
Searching...
No Matches
InnerDetector
InDetDigitization
StripDigitization
src
ITkStripAmp.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ITkStripAmp.h
"
6
7
//STD includes
8
#include <cmath>
9
#include <fstream>
10
#include "GaudiKernel/SystemOfUnits.h"
11
12
13
14
//----------------------------------------------------------------------
15
// Initialize
16
//----------------------------------------------------------------------
17
StatusCode
ITkStripAmp::initialize
() {
18
StatusCode
sc
{AthAlgTool::initialize()};
19
m_PeakTime
.setValue(
m_PeakTime
.value() * Gaudi::Units::ns);
20
m_NormConstCentral
= 1.0;
21
return
sc
;
22
}
23
24
//----------------------------------------------------------------------
25
// Amplifier impulse response is now CR-RC^3
26
//----------------------------------------------------------------------
27
float
ITkStripAmp::response
(
const
list_t&
/*Charges*/
,
const
float
/*timeOfThreshold*/
)
const
{
28
float
resp{1.0f};
29
return
resp;
30
}
31
32
void
ITkStripAmp::response
(
const
list_t& Charges,
const
float
time, std::vector<float>&
response
)
const
{
33
auto
bin_max{std::ssize(
response
)};
34
std::fill(
response
.begin(),
response
.end(), 0.0);
35
float
tp{
m_PeakTime
/3.0f};
// for CR-RC^3
36
for
(
const
SiCharge
&
charge
: Charges) {
37
float
ch{
static_cast<
float
>
(
charge
.charge())};
38
float
ch_time{
static_cast<
float
>
(
charge
.time())};
39
auto
bin_end{bin_max-1};
40
for
(
int
bin
{-1};
bin
<bin_end; ++
bin
) {
41
float
bin_time{time +
bin
*25};
//25, fix me
42
float
tC{bin_time - ch_time};
43
if
(tC > 0.0f) {
44
tC/=tp;
//to avoid doing it four times
45
response
[
bin
+1] += ch*tC*tC*tC*std::exp(-tC);
//faster than pow
46
}
47
}
48
}
49
for
(
int
bin
{0};
bin
<bin_max; ++
bin
)
response
[
bin
] =
response
[
bin
]*
m_NormConstCentral
;
50
}
51
52
// ----------------------------------------------------------------------
53
// Crosstalk on the neighbour strip
54
// ----------------------------------------------------------------------
55
float
ITkStripAmp::crosstalk
(
const
list_t&
/*Charges*/
,
const
float
/*timeOfThreshold*/
)
const
{
56
float
resp{1};
57
return
resp;
58
}
59
60
void
ITkStripAmp::crosstalk
(
const
list_t&
/*Charges*/
,
const
float
/*timeOfThreshold*/
, std::vector<float>&
response
)
const
{
61
std::fill(
response
.begin(),
response
.end(), 1.0);
62
}
63
charge
double charge(const T &p)
Definition
AtlasPID.h:997
ITkStripAmp.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
ITkStripAmp::crosstalk
virtual float crosstalk(const list_t &Charges, const float timeOverThreshold) const override
Neighbour strip cross talk response strip to a list of charges with times.
Definition
ITkStripAmp.cxx:55
ITkStripAmp::initialize
virtual StatusCode initialize() override
AlgTool initialize.
Definition
ITkStripAmp.cxx:17
ITkStripAmp::response
virtual float response(const list_t &Charges, const float timeOverThreshold) const override
Definition
ITkStripAmp.cxx:27
ITkStripAmp::m_PeakTime
FloatProperty m_PeakTime
signal peak time
Definition
ITkStripAmp.h:38
ITkStripAmp::m_NormConstCentral
float m_NormConstCentral
Definition
ITkStripAmp.h:39
SiCharge
Definition
SiCharge.h:25
bin
Definition
BinsDiffFromStripMedian.h:43
Generated on
for ATLAS Offline Software by
1.14.0