ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
virtual ~SCT_Amp ()=default
 Destructor. More...
 
virtual StatusCode initialize () override
 AlgTool initialize. More...
 
virtual StatusCode finalize () override
 AlgTool finalize. More...
 
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 More...
 
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. More...
 
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 More...
 
FloatProperty m_CrossFactor2sides {this, "CrossFactor2sides", 0.1, "Loss of charge to neighbour strip constant"}
 Cross factor 2 side. More...
 
FloatProperty m_CrossFactorBack {this, "CrossFactorBack", 0.07, "Loss of charge to back plane constant"}
 cross factor More...
 
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. More...
 
float m_NormConstNeigh {0.}
 Normalisation factor for the neighbour strip signal response. More...
 

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 }

◆ 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 }

◆ finalize()

StatusCode SCT_Amp::finalize ( )
overridevirtual

AlgTool finalize.

Definition at line 59 of file SCT_Amp.cxx.

59  {
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 }

◆ initialize()

StatusCode SCT_Amp::initialize ( )
overridevirtual

AlgTool initialize.

CHLEP Units

Definition at line 25 of file SCT_Amp.cxx.

25  {
26 
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 }

◆ 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.

◆ 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.

◆ m_dt

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

Definition at line 60 of file SCT_Amp.h.

◆ m_NormConstCentral

float SCT_Amp::m_NormConstCentral {0.}
private

Normalisation factor for the signal response.

Definition at line 63 of file SCT_Amp.h.

◆ 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.

◆ 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.

◆ m_tmax

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

Definition at line 59 of file SCT_Amp.h.

◆ m_tmin

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

Definition at line 58 of file SCT_Amp.h.


The documentation for this class was generated from the following files:
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
SCT_Amp::m_dt
FloatProperty m_dt
Definition: SCT_Amp.h:60
SCT_Amp::m_CrossFactorBack
FloatProperty m_CrossFactorBack
cross factor
Definition: SCT_Amp.h:56
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
initialize
void initialize()
Definition: run_EoverP.cxx:894
bin
Definition: BinsDiffFromStripMedian.h:43
ParticleTest.tp
tp
Definition: ParticleTest.py:25
SiCharge
Definition: SiCharge.h:25
SCT_Amp::response
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
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SCT_Amp::m_NormConstCentral
float m_NormConstCentral
Normalisation factor for the signal response.
Definition: SCT_Amp.h:63
SCT_Amp::m_CrossFactor2sides
FloatProperty m_CrossFactor2sides
Cross factor 2 side.
Definition: SCT_Amp.h:53
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
SCT_Amp::m_NormConstNeigh
float m_NormConstNeigh
Normalisation factor for the neighbour strip signal response.
Definition: SCT_Amp.h:66
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
charge
double charge(const T &p)
Definition: AtlasPID.h:538
SCT_Amp::m_tmin
FloatProperty m_tmin
Definition: SCT_Amp.h:58
SCT_Amp::m_tmax
FloatProperty m_tmax
Definition: SCT_Amp.h:59
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_Amp::m_PeakTime
FloatProperty m_PeakTime
signal peak time
Definition: SCT_Amp.h:50
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130