10 #include "CLHEP/Random/RandGaussZiggurat.h"
11 #include "CLHEP/Random/RandFlat.h"
12 #include "CLHEP/Random/RandomEngine.h"
25 m_pElectronicsNoise(electronicsnoise)
94 const double pXeLT[160] = {
95 0.039062, 0.117617, 0.197695, 0.296573, 0.419494, 0.557328, 0.698813, 0.826937, 0.927195, 0.984970,
96 0.994847, 0.956566, 0.877094, 0.767477, 0.641157, 0.510111, 0.385189, 0.273973, 0.180531, 0.105891,
97 0.049175, 0.007925, -0.021127, -0.040969, -0.054005, -0.062364, -0.067278, -0.069242, -0.068776, -0.066547,
98 -0.062738, -0.057634, -0.051691, -0.045232, -0.038621, -0.032235, -0.026218, -0.020790, -0.016104, -0.012117,
99 -0.008966, -0.006491, -0.004585, -0.003105, -0.002121, -0.001400, -0.000890, -0.000544, -0.000332, -0.000202,
100 -0.000084, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
101 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
102 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
103 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
104 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
105 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
108 const double pXeHT[160] = {
109 0.027700, 0.083200, 0.138700, 0.191900, 0.259700, 0.340300, 0.432000, 0.531200, 0.632900, 0.731400,
110 0.820500, 0.894900, 0.950600, 0.985600, 1.000000, 0.995700, 0.975800, 0.943900, 0.903700, 0.857900,
111 0.808500, 0.756500, 0.702400, 0.646200, 0.588000, 0.527900, 0.466600, 0.405000, 0.344100, 0.285200,
112 0.229400, 0.177700, 0.131000, 0.089700, 0.054000, 0.024000, -0.000800, -0.020600, -0.036000, -0.047600,
113 -0.055800, -0.061400, -0.064700, -0.066200, -0.066200, -0.065200, -0.063300, -0.060700, -0.057700, -0.054400,
114 -0.050800, -0.047200, -0.043500, -0.039800, -0.036200, -0.032800, -0.029400, -0.026300, -0.023300, -0.020600,
115 -0.018000, -0.015700, -0.013600, -0.011700, -0.010000, -0.008500, -0.007200, -0.006000, -0.005000, -0.004200,
116 -0.003400, -0.002800, -0.002300, -0.001900, -0.001500, -0.001200, -0.001000, 0.0, 0.0, 0.0,
117 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
118 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
119 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
120 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
123 const double pKrLT[160] = {
124 0.061537, 0.182727, 0.297239, 0.412757, 0.538228, 0.663099, 0.776969, 0.875428, 0.944050, 0.984161,
125 0.993044, 0.966288, 0.913313, 0.856057, 0.794949, 0.730736, 0.666524, 0.602311, 0.536858, 0.471147,
126 0.406935, 0.342722, 0.286429, 0.232919, 0.180758, 0.134739, 0.093536, 0.054859, 0.021586, -0.003114,
127 -0.020773, -0.032170, -0.040197, -0.046147, -0.050428, -0.052697, -0.054131, -0.054672, -0.054255, -0.052971,
128 -0.051862, -0.050965, -0.050133, -0.049063, -0.047992, -0.046922, -0.045852, -0.044782, -0.043711, -0.042365,
129 -0.040850, -0.039084, -0.036943, -0.034803, -0.032809, -0.030865, -0.028922, -0.026979, -0.025035, -0.023092,
130 -0.021149, -0.019206, -0.017262, -0.015759, -0.014533, -0.013345, -0.011740, -0.010638, -0.009568, -0.008497,
131 -0.007427, -0.006357, -0.005287, -0.004217, -0.003146, -0.002076, -0.001006, 0.0, 0.0, 0.0,
132 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
133 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
134 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
135 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
138 const double pKrHT[160] = {
139 0.027700, 0.083200, 0.138700, 0.191900, 0.259700, 0.340300, 0.432000, 0.531200, 0.632900, 0.731400,
140 0.820500, 0.894900, 0.950600, 0.985600, 1.000000, 0.995700, 0.975800, 0.943900, 0.903700, 0.857900,
141 0.808500, 0.756500, 0.702400, 0.646200, 0.588000, 0.527900, 0.466600, 0.405000, 0.344100, 0.285200,
142 0.229400, 0.177700, 0.131000, 0.089700, 0.054000, 0.024000, -0.000800, -0.020600, -0.036000, -0.047600,
143 -0.055800, -0.061400, -0.064700, -0.066200, -0.066200, -0.065200, -0.063300, -0.060700, -0.057700, -0.054400,
144 -0.050800, -0.047200, -0.043500, -0.039800, -0.036200, -0.032800, -0.029400, -0.026300, -0.023300, -0.020600,
145 -0.018000, -0.015700, -0.013600, -0.011700, -0.010000, -0.008500, -0.007200, -0.006000, -0.005000, -0.004200,
146 -0.003400, -0.002800, -0.002300, -0.001900, -0.001500, -0.001200, -0.001000, 0.0, 0.0, 0.0,
147 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
148 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
149 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
150 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
153 const double pArLT[160] = {
154 0.058594, 0.175781, 0.292969, 0.410156, 0.527344, 0.644531, 0.769031, 0.886891, 0.966388, 0.994571,
155 0.965874, 0.883619, 0.759288, 0.609766, 0.453430, 0.306347, 0.179643, 0.078588, 0.003274, -0.049719,
156 -0.085434, -0.108986, -0.124645, -0.135499, -0.143531, -0.149880, -0.155123, -0.159518, -0.163151, -0.166033,
157 -0.168147, -0.169472, -0.169992, -0.169700, -0.168600, -0.166709, -0.164053, -0.160669, -0.156605, -0.151916,
158 -0.146664, -0.140919, -0.134753, -0.128243, -0.121465, -0.114497, -0.107413, -0.100288, -0.093189, -0.086179,
159 -0.079316, -0.072652, -0.066231, -0.060089, -0.054257, -0.048757, -0.043606, -0.038813, -0.034382, -0.030312,
160 -0.026596, -0.023224, -0.020183, -0.017457, -0.015234, -0.014063, -0.012891, -0.011719, -0.010547, -0.009375,
161 -0.008203, -0.007031, -0.005859, -0.004688, -0.003516, -0.002344, -0.001172, 0.0, 0.0, 0.0,
162 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
163 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
164 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
165 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
168 const double pArHT[160] = {
169 0.027700, 0.083200, 0.138700, 0.191900, 0.259700, 0.340300, 0.432000, 0.531200, 0.632900, 0.731400,
170 0.820500, 0.894900, 0.950600, 0.985600, 1.000000, 0.995700, 0.975800, 0.943900, 0.903700, 0.857900,
171 0.808500, 0.756500, 0.702400, 0.646200, 0.588000, 0.527900, 0.466600, 0.405000, 0.344100, 0.285200,
172 0.229400, 0.177700, 0.131000, 0.089700, 0.054000, 0.024000, -0.000800, -0.020600, -0.036000, -0.047600,
173 -0.055800, -0.061400, -0.064700, -0.066200, -0.066200, -0.065200, -0.063300, -0.060700, -0.057700, -0.054400,
174 -0.050800, -0.047200, -0.043500, -0.039800, -0.036200, -0.032800, -0.029400, -0.026300, -0.023300, -0.020600,
175 -0.018000, -0.015700, -0.013600, -0.011700, -0.010000, -0.008500, -0.007200, -0.006000, -0.005000, -0.004200,
176 -0.003400, -0.002800, -0.002300, -0.001900, -0.001500, -0.001200, -0.001000, 0.0, 0.0, 0.0,
177 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
178 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
179 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
180 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
190 vpXeLT.at(
k)=pXeLT[
k]; vpXeHT.at(
k)=pXeHT[
k];
191 vpKrLT.at(
k)=pKrLT[
k]; vpKrHT.at(
k)=pKrHT[
k];
192 vpArLT.at(
k)=pArLT[
k]; vpArHT.at(
k)=pArHT[
k];
207 const double& noiseamplitude,
209 CLHEP::HepRandomEngine* rndmEngine,
210 CLHEP::HepRandomEngine* elecNoiseRndmEngine,
222 if (deposits.empty() && noiseamplitude<std::numeric_limits<double>::epsilon()) {
226 if ( lowthreshold < 0 ) {
229 if ( highthreshold < 0 ) {
234 if ( low_threshold_fluctuation > 0 ) {
235 lowthreshold = lowthreshold*CLHEP::RandGaussZiggurat::shoot(rndmEngine, 1.0, low_threshold_fluctuation );
238 if ( high_threshold_fluctuation > 0 ) {
239 highthreshold = highthreshold*CLHEP::RandGaussZiggurat::shoot(rndmEngine, 1.0, high_threshold_fluctuation );
252 const unsigned int numberOfDeposits(deposits.size());
253 for (
unsigned int i(0);
i < numberOfDeposits; ++
i) {
296 ATH_MSG_DEBUG(
"ACH666: Flagging digits as MC (for overlay)");
344 int lowThresholdBins(0);
345 int highThresholdBins(0);
347 int lowThresholdAdditionalBins(0);
348 int highThresholdAdditionalBins(0);
353 if (lowThresholdBins == 0)
361 else if (lowThresholdBins > 0)
367 lowThresholdAdditionalBins = 0;
371 if (lowThresholdAdditionalBins == 0)
384 --lowThresholdAdditionalBins;
385 if (lowThresholdAdditionalBins == 0)
400 if (highThresholdBins == 0)
408 else if (highThresholdBins > 0)
414 highThresholdAdditionalBins = 0;
418 if (highThresholdAdditionalBins == 0)
431 --highThresholdAdditionalBins;
432 if (highThresholdAdditionalBins == 0)
457 const unsigned one(1);
460 for (
i = 0;
i < 24; ++
i)
463 for (
k = 0;
k < 4; ++
k)
473 for (
i = 0;
i < 3; ++
i)
476 for (
k = 0;
k < 32; ++
k)
491 double highthreshold(0.);
498 ATH_MSG_WARNING(
"TRTDigitization::TRTElectronicsProcessing - getRegion is zero!");
501 return highthreshold;
518 ATH_MSG_WARNING(
"TRTDigitization::TRTElectronicsProcessing - getRegion is zero!");
522 if (!t0Shift)
return;
539 if (
i-t0Shift<0)
break;
563 ATH_MSG_WARNING(
"TRTDigitization::TRTElectronicsProcessing - getRegion is zero!");
567 if (!t0Shift)
return;
584 if (
i-t0Shift<0)
break;