ATLAS Offline Software
Loading...
Searching...
No Matches
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//----------------------------------------------------------------------
18 StatusCode sc{AthAlgTool::initialize()};
19 m_PeakTime.setValue(m_PeakTime.value() * Gaudi::Units::ns);
21 return sc;
22}
23
24//----------------------------------------------------------------------
25// Amplifier impulse response is now CR-RC^3
26//----------------------------------------------------------------------
27float ITkStripAmp::response(const list_t& /*Charges*/, const float /*timeOfThreshold*/) const {
28 float resp{1.0f};
29 return resp;
30}
31
32void 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// ----------------------------------------------------------------------
55float ITkStripAmp::crosstalk(const list_t& /*Charges*/, const float /*timeOfThreshold*/) const {
56 float resp{1};
57 return resp;
58}
59
60void 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
double charge(const T &p)
Definition AtlasPID.h:997
static Double_t sc
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.
virtual StatusCode initialize() override
AlgTool initialize.
virtual float response(const list_t &Charges, const float timeOverThreshold) const override
FloatProperty m_PeakTime
signal peak time
Definition ITkStripAmp.h:38
float m_NormConstCentral
Definition ITkStripAmp.h:39