ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_Amp Class Reference

Header file for SCT_Amp Class. More...

#include <SCT_Amp.h>

Inheritance diagram for SCT_Amp:
Collaboration diagram for SCT_Amp:

Public Member Functions

 SCT_Amp (const std::string &type, const std::string &name, const IInterface *parent)
 constructor
virtual ~SCT_Amp ()=default
 Destructor.
virtual StatusCode initialize () override
 AlgTool initialize.
virtual StatusCode finalize () override
 AlgTool finalize.
virtual float response (const list_t &Charges, const float timeOverThreshold) const override
 main purpose: CR-RC^3 response to a list of charges with times
virtual void response (const list_t &Charges, const float timeOverThreshold, std::vector< float > &resp) const override
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 void crosstalk (const list_t &Charges, const float timeOverThreshold, std::vector< float > &resp) const override

Private Attributes

FloatProperty m_PeakTime {this, "PeakTime", 21., "Front End Electronics peaking time"}
 signal peak time
FloatProperty m_CrossFactor2sides {this, "CrossFactor2sides", 0.1, "Loss of charge to neighbour strip constant"}
 Cross factor 2 side.
FloatProperty m_CrossFactorBack {this, "CrossFactorBack", 0.07, "Loss of charge to back plane constant"}
 cross factor
FloatProperty m_tmin {this, "Tmin", -25.0}
FloatProperty m_tmax {this, "Tmax", 150.0}
FloatProperty m_dt {this, "deltaT", 1.0}
float m_NormConstCentral {0.}
 Normalisation factor for the signal response.
float m_NormConstNeigh {0.}
 Normalisation factor for the neighbour strip signal response.

Detailed Description

Header file for SCT_Amp Class.

A class to model an SCT amplifier and shaper. Gives a CRRC response to a list of charges with times. Also calculates average input and output for diagnostic purposes. Questions/comments to Szymo.nosp@m.n.Ga.nosp@m.domsk.nosp@m.i@ce.nosp@m.rn.ch Name changed from SCTpreamp (misleading) on 09.05.01.

Author
Szymo.nosp@m.n.Ga.nosp@m.domsk.nosp@m.i@ce.nosp@m.rn.ch, Awati.nosp@m.f.Be.nosp@m.lymam.nosp@m.@cer.nosp@m.n.ch, David.nosp@m.e.Co.nosp@m.stanz.nosp@m.o@ce.nosp@m.rn.ch, tgcor.nosp@m.nel@.nosp@m.nikhe.nosp@m.f.nl, Grant.nosp@m..Gor.nosp@m.fine@.nosp@m.cern.nosp@m..ch, Paul..nosp@m.Bell.nosp@m.@cern.nosp@m..ch, Jorge.nosp@m.n.Da.nosp@m.lmau@.nosp@m.cern.nosp@m..ch, 23/08/2007 - Kondo.nosp@m..Gna.nosp@m.nvo@c.nosp@m.ern..nosp@m.ch
  • Conversion of the SCT_Amp code AlgTool

Definition at line 27 of file SCT_Amp.h.

Constructor & Destructor Documentation

◆ SCT_Amp()

SCT_Amp::SCT_Amp ( const std::string & type,
const std::string & name,
const IInterface * parent )

constructor

Definition at line 17 of file SCT_Amp.cxx.

18 : base_class(type, name, parent)
19{
20}

◆ ~SCT_Amp()

virtual SCT_Amp::~SCT_Amp ( )
virtualdefault

Destructor.

Member Function Documentation

◆ crosstalk() [1/2]

float SCT_Amp::crosstalk ( const list_t & Charges,
const float timeOverThreshold ) const
overridevirtual

Neighbour strip cross talk response strip to a list of charges with times.

Definition at line 109 of file SCT_Amp.cxx.

109 {
110 float resp{0};
111 float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
112 for (const SiCharge& charge: Charges) {
113 float ch{static_cast<float>(charge.charge())};
114 float tC{static_cast<float>(timeOfThreshold - charge.time())};
115 if (tC > 0.0) {
116 tC/=tp; //to avoid doing it four times
117 resp += ch*tC*tC*std::exp(-tC)*(3.0-tC); //faster than pow
118 }
119 }
120 return resp*m_NormConstNeigh;
121}
double charge(const T &p)
Definition AtlasPID.h:997
float m_NormConstNeigh
Normalisation factor for the neighbour strip signal response.
Definition SCT_Amp.h:66
FloatProperty m_PeakTime
signal peak time
Definition SCT_Amp.h:50

◆ crosstalk() [2/2]

void SCT_Amp::crosstalk ( const list_t & Charges,
const float timeOverThreshold,
std::vector< float > & resp ) const
overridevirtual

Definition at line 123 of file SCT_Amp.cxx.

123 {
124 short bin_max{static_cast<short>(response.size())};
125 std::fill(response.begin(), response.end(), 0.0);
126 float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
127 for (const SiCharge& charge: Charges) {
128 float ch{static_cast<float>(charge.charge())};
129 float ch_time{static_cast<float>(charge.time())};
130 short bin_end{static_cast<short>(bin_max-1)};
131 for (short bin{-1}; bin<bin_end; ++bin) {
132 float bin_timeOfThreshold{timeOfThreshold + bin*25}; // 25, fix me
133 float tC{bin_timeOfThreshold - ch_time};
134 if (tC > 0.0) {
135 tC/=tp; //to avoid doing it four times
136 response[bin+1] += ch*tC*tC*std::exp(-tC)*(3.0-tC); //faster than pow
137 }
138 }
139 }
140 for (short bin{0}; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstNeigh;
141}
virtual float response(const list_t &Charges, const float timeOverThreshold) const override
main purpose: CR-RC^3 response to a list of charges with times
Definition SCT_Amp.cxx:72

◆ finalize()

StatusCode SCT_Amp::finalize ( )
overridevirtual

AlgTool finalize.

Definition at line 59 of file SCT_Amp.cxx.

59 {
60 StatusCode sc{AthAlgTool::finalize()};
61 if (sc.isFailure()) {
62 ATH_MSG_FATAL("SCT_Amp::finalize() failed");
63 return sc;
64 }
65 ATH_MSG_DEBUG("SCT_Amp::finalize()");
66 return sc;
67}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ initialize()

StatusCode SCT_Amp::initialize ( )
overridevirtual

AlgTool initialize.

CHLEP Units

Definition at line 25 of file SCT_Amp.cxx.

25 {
26
27 StatusCode sc{AthAlgTool::initialize()};
28 if (sc.isFailure()) {
29 ATH_MSG_FATAL("SCT_Amp::initialize() failed");
30 return sc;
31 }
32 ATH_MSG_DEBUG("SCT_Amp::initialize()");
33
35 m_PeakTime.setValue(m_PeakTime.value() * CLHEP::ns);
36 m_dt.setValue(m_dt.value() * CLHEP::ns);
37 m_tmin.setValue(m_tmin.value() * CLHEP::ns);
38 m_tmax.setValue(m_tmax.value() * CLHEP::ns);
39
41 m_NormConstNeigh = exp(3.0-sqrt(3.0))/(6*(2.0*sqrt(3.0)-3.0));
43
44#ifdef SCT_DIG_DEBUG
45 ATH_MSG_INFO("\tAmp created, PeakTime = " << m_PeakTime);
46 ATH_MSG_INFO("\tResponse will be CR-RC^3 with tp = " << m_PeakTime/3.0);
47 ATH_MSG_INFO("\tCoupling to both neighbours = " << m_CrossFactor2sides);
48 ATH_MSG_INFO("\tCoupling to backplane = " << m_CrossFactorBack);
49 ATH_MSG_INFO("\tNormalization for central " << m_NormConstCentral);
50 ATH_MSG_INFO("\tNormalization for neighbour " << m_NormConstNeigh);
51#endif
52
53 return sc;
54}
#define ATH_MSG_INFO(x)
FloatProperty m_tmax
Definition SCT_Amp.h:59
FloatProperty m_tmin
Definition SCT_Amp.h:58
FloatProperty m_CrossFactor2sides
Cross factor 2 side.
Definition SCT_Amp.h:53
FloatProperty m_dt
Definition SCT_Amp.h:60
FloatProperty m_CrossFactorBack
cross factor
Definition SCT_Amp.h:56
float m_NormConstCentral
Normalisation factor for the signal response.
Definition SCT_Amp.h:63

◆ response() [1/2]

float SCT_Amp::response ( const list_t & Charges,
const float timeOverThreshold ) const
overridevirtual

main purpose: CR-RC^3 response to a list of charges with times

Definition at line 72 of file SCT_Amp.cxx.

72 {
73 float resp{0.0};
74 float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
75 for (const SiCharge& charge: Charges) {
76 float ch{static_cast<float>(charge.charge())};
77 float tC{static_cast<float>(timeOfThreshold - charge.time())};
78 if (tC > 0.0) {
79 tC/=tp; //to avoid doing it four times
80 resp += ch*tC*tC*tC*std::exp(-tC); //faster than pow
81 }
82 }
83 return resp*m_NormConstCentral;
84}

◆ response() [2/2]

void SCT_Amp::response ( const list_t & Charges,
const float timeOverThreshold,
std::vector< float > & resp ) const
overridevirtual

Definition at line 86 of file SCT_Amp.cxx.

86 {
87 short bin_max{static_cast<short>(response.size())};
88 std::fill(response.begin(), response.end(), 0.0);
89 float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
90 for (const SiCharge& charge: Charges) {
91 float ch{static_cast<float>(charge.charge())};
92 float ch_time{static_cast<float>(charge.time())};
93 short bin_end{static_cast<short>(bin_max-1)};
94 for (short bin{-1}; bin<bin_end; ++bin) {
95 float bin_timeOfThreshold{timeOfThreshold + bin*25};//25, fix me
96 float tC{bin_timeOfThreshold - ch_time};
97 if (tC > 0.0) {
98 tC/=tp; //to avoid doing it four times
99 response[bin+1] += ch*tC*tC*tC*std::exp(-tC); //faster than pow
100 }
101 }
102 }
103 for (short bin{0}; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstCentral;
104}

Member Data Documentation

◆ m_CrossFactor2sides

FloatProperty SCT_Amp::m_CrossFactor2sides {this, "CrossFactor2sides", 0.1, "Loss of charge to neighbour strip constant"}
private

Cross factor 2 side.

Definition at line 53 of file SCT_Amp.h.

53{this, "CrossFactor2sides", 0.1, "Loss of charge to neighbour strip constant"};

◆ m_CrossFactorBack

FloatProperty SCT_Amp::m_CrossFactorBack {this, "CrossFactorBack", 0.07, "Loss of charge to back plane constant"}
private

cross factor

Definition at line 56 of file SCT_Amp.h.

56{this, "CrossFactorBack", 0.07, "Loss of charge to back plane constant"};

◆ m_dt

FloatProperty SCT_Amp::m_dt {this, "deltaT", 1.0}
private

Definition at line 60 of file SCT_Amp.h.

60{this, "deltaT", 1.0};

◆ m_NormConstCentral

float SCT_Amp::m_NormConstCentral {0.}
private

Normalisation factor for the signal response.

Definition at line 63 of file SCT_Amp.h.

63{0.};

◆ m_NormConstNeigh

float SCT_Amp::m_NormConstNeigh {0.}
private

Normalisation factor for the neighbour strip signal response.

Definition at line 66 of file SCT_Amp.h.

66{0.};

◆ m_PeakTime

FloatProperty SCT_Amp::m_PeakTime {this, "PeakTime", 21., "Front End Electronics peaking time"}
private

signal peak time

Definition at line 50 of file SCT_Amp.h.

50{this, "PeakTime", 21., "Front End Electronics peaking time"};

◆ m_tmax

FloatProperty SCT_Amp::m_tmax {this, "Tmax", 150.0}
private

Definition at line 59 of file SCT_Amp.h.

59{this, "Tmax", 150.0};

◆ m_tmin

FloatProperty SCT_Amp::m_tmin {this, "Tmin", -25.0}
private

Definition at line 58 of file SCT_Amp.h.

58{this, "Tmin", -25.0};

The documentation for this class was generated from the following files: