CMS 3D CMS Logo

CSCStripAmpResponse.cc
Go to the documentation of this file.
1 
4 
5 #include <cmath>
6 #include <iostream>
7 
9  : theShapingTime(shapingTime), theTailShaping(tailShaping) {}
10 
12  // Local variables
13  double t1, t3, t5, t7, cat = 0.;
14 
15  // ! CSC Cathode amplifier-shaper response to single e-
16 
17  // Author: S. Durkin Oct. 13, 1995
18 
19  // Routine gives cathode amplifier response to a single drift electron
20  // Positive ion drift collection is included
21  // FLAGS: itp amplifier/shaper peaking time
22  // 10,20,30,40,50,60,70,80,90,100,150,200,250,300 nsec available
23  // itl amplifier tail cancellation
24  // 1 no tail cancellation
25  // 2 conservative tail cancellation
26  // 3 radical tail cancellation(some charge loss)
27 
28  // calculations were done using maple
29  // 4-pole semigaussian shaper is assumed
30 
31  // frequency 2tp/27/exp(-3)/(stp/3+1)**3
32  // |
33  // \/
34  // time (t/tp)**3/exp(-3)*exp(-3t/tp)
35 
36  // this time distribution was convoluted with positive ion
37  // drift formula
38 
39  // 1/(t0+t)*.05650 note:normalization estimated from K1
40  // Gatti N.I.M. 163,82(1979)
41  // where t0=2.1 nsec (GEM gas)
42 
43  // standard tail cancellation has lowest pole removed (exp approx)
44  // using 1 zero and 1 pole
45  // radical tail cancellation has lowest two poles removed (exp
46  // approx) using 2 zeros and 2 poles
47 
48  if (theTailShaping != 0 && theTailShaping != 1 && theTailShaping != 2) {
49  edm::LogError("CSCStripElectronicsSim") << "Bad TailShaping CSCStripElectronicsSim" << theTailShaping;
50  return 0.;
51  }
52 
53  switch (theShapingTime) {
54  /*
55  case 10:
56  // no tail cancellation, tp= 10,t0=2.1
57  if (theTailShaping == NONE) {
58  // Computing 2nd power
59  t5 = t * t;
60  t7 = exp(t * -.3);
61  cat = exp(t * -.06523809524) * .2100138871 + exp(t *
62  -.400952381) * 23.38590029 + exp(t * -.01333333333) *
63  .02085199407 + exp(t * -.002285714286) * .004416201989 +
64  t5 * .00345590637 * t * t7 - t5 * .1260070972 * t7 + t *
65  2.304266717 * t7 - t7 * 23.62118237;
66  }
67  // tail cancellation, tp= 10,t0=2.1
68  if (theTailShaping == CONSERVATIVE) {
69  // Computing 2nd power
70  t1 = t * t;
71  t3 = exp(t * -.3);
72  cat = t1 * .003469104089 * t * t3 - t1 * .1263548058 * t3 + t *
73  2.310721678 * t3 - t3 * 23.68962448 + exp(t *
74  -.01333333333) * .02323396152 + exp(t * -.400952381) *
75  23.45252892 + exp(t * -.06523809524) * .2138615931 +
76  exp( t * -.003418326524) * 1.274497241e-11;
77  }
78  // radical tail cancellation, tp= 10,t0=2.1
79  if (theTailShaping == RADICAL) {
80  // Computing 2nd power
81  t1 = t * t;
82  t3 = exp(t * -.3);
83  cat = t1 * .003561830965 * t * t3 - t1 * .1287358512 * t3 + t *
84  2.355429782 * t3 - t3 * 24.16270544 - exp(t *
85  -.0207962661) * 1.717680715e-10 + exp(t *
86  -.003418326524)
87  * 7.271661158e-12 + exp(t * -.400952381) * 23.91293094
88  + exp(t * -.06523809524) * .2497744869;
89  }
90  break;
91  case 20:
92  // no tail cancellation, tp= 20,t0=2.1
93  if (theTailShaping == NONE) {
94  // Computing 2nd power
95  t5 = t * t;
96  t7 = exp(t * -.15);
97  cat = exp(t * -.06523809524) * 1.544776642 + exp(t *
98  -.400952381) * .07655350666 + exp(t * -.01333333333) *
99  .0504563677 + exp(t * -.002285714286) * .009108935882 +
100  t5 * 1.849663895e-5 * t * t7 - t5 * .008530427568 * t7 -
101  t * .1199681494 * t7 - t7 * 1.680895453;
102  }
103  // tail cancellation, tp= 20,t0=2.1
104  if (theTailShaping == CONSERVATIVE) {
105  // Computing 2nd power
106  t1 = t * t;
107  t3 = exp(t * -.15);
108  cat = t1 * 1.863955948e-5 * t * t3 - t1 * .008593415697 * t3 -
109  t * .1217545504 * t3 - t3 * 1.706070522 + exp(t *
110  -.01333333333) * .05622010555 + exp(t * -.400952381) *
111  .07677161489 + exp(t * -.06523809524) * 1.573078801 +
112  exp(t * -.003418326524) * 2.669976603e-11;
113  }
114  // radical tail cancellation, tp= 20,t0=2.1
115  if (theTailShaping == RADICAL) {
116  // Computing 2nd power
117  t1 = t * t;
118  t3 = exp(t * -.15);
119  cat = t1 * 1.971619848e-5 * t * t3 - t1 * .009064781071 * t3 -
120  t * .1360836779 * t3 - t3 * 1.915518161 - exp(t *
121  -.0207962661) * 4.682061154e-10 + exp(t *
122  -.003418326524)
123  * 1.523358744e-11 + exp(t * -.400952381) * .07827873625
124  + exp(t * -.06523809524) * 1.837239425;
125  }
126  break;
127  */
128  case 30:
129  // no tail cancellation, tp= 30,t0=2.1
130  if (theTailShaping == NONE) {
131  // Computing 2nd power
132  t5 = t * t;
133  t7 = exp(t * -.1);
134  cat = exp(t * -.06523809524) * 16.18007335 + exp(t * -.400952381) * .01096643477 +
135  exp(t * -.01333333333) * .0924451733 + exp(t * -.002285714286) * .01409456303 -
136  t5 * 7.567748611e-5 * t * t7 - t5 * .01068701841 * t7 - t * .5685389492 * t7 - t7 * 16.29757952;
137  }
138  // tail cancellation, tp= 30,t0=2.1
139  if (theTailShaping == CONSERVATIVE) {
140  // Computing 2nd power
141  t1 = t * t;
142  t3 = exp(t * -.1);
143  cat = t1 * -7.656495508e-5 * t * t3 - t1 * .01083991133 * t3 - t * .5783722846 * t3 - t3 * 16.59051472 +
144  exp(t * -.01333333333) * .1030053814 + exp(t * -.400952381) * .01099767919 +
145  exp(t * -.06523809524) * 16.47651166 + exp(t * -.003418326524) * 4.197333487e-11;
146  }
147  // radical tail cancellation, tp= 30,t0=2.1
148  if (theTailShaping == RADICAL) {
149  // Computing 2nd power
150  t1 = t * t;
151  t3 = exp(t * -.1);
152  cat = t1 * -8.37792502e-5 * t * t3 - t1 * .0121345525 * t3 - t * .6655605456 * t3 - t3 * 19.25455777 -
153  exp(t * -.0207962661) * 9.823832281e-10 + exp(t * -.003418326524) * 2.394794269e-11 +
154  exp(t * -.400952381) * .01121357717 + exp(t * -.06523809524) * 19.2433442;
155  }
156  break;
157  /*
158  case 40:
159  // no tail cancellation, tp= 40,t0=2.1
160  if (theTailShaping == NONE) {
161  // Computing 2nd power
162  t5 = t * t;
163  t7 = exp(t * -.075);
164  cat = exp(t * -.06523809524) * 1097.590331 + exp(t *
165  -.400952381) * .003362201622 + exp(t * -.01333333333) *
166  .1521508944 + exp(t * -.002285714286) * .01939048554 -
167  t5 * 1.579570388e-4 * t * t7 - t5 * .05281648589 * t7 -
168  t * 10.72426897 * t7 - t7 * 1097.765235;
169  }
170  // tail cancellation, tp= 40,t0=2.1
171  if (theTailShaping == CONSERVATIVE) {
172  // Computing 2nd power
173  t1 = t * t;
174  t3 = exp(t * -.075);
175  cat = t1 * -1.604563386e-4 * t * t3 - t1 * .05375692904 * t3 -
176  t * 10.92023147 * t3 - t3 * 1117.872403 + exp(t *
177  -.01333333333) * .1695314135 + exp(t * -.400952381) *
178  .003371780853 + exp(t * -.06523809524) * 1117.6995 +
179  exp( t * -.003418326524) * 5.868522605e-11;
180  }
181  // radical tail cancellation, tp= 40,t0=2.1
182  if (theTailShaping == RADICAL) {
183  // Computing 2nd power
184  t1 = t * t;
185  t3 = exp(t * -.075);
186  cat = t1 * -1.825484488e-4 * t * t3 - t1 * .06238107065 * t3 -
187  t * 12.7419738 * t3 - t3 * 1305.393597 - exp(t *
188  -.0207962661) * 1.889428819e-9 + exp(t * -.003418326524)
189  * 3.348293469e-11 + exp(t * -.400952381) * .003437973064
190  + exp(t * -.06523809524) * 1305.390159;
191  }
192  break;
193  case 50:
194  // no tail cancellation, tp= 50,t0=2.1
195  if (theTailShaping == NONE) {
196  // Computing 2nd power
197  t5 = t * t;
198  t7 = exp(t * -.06);
199  cat = exp(t * -.06523809524) * 6778.833027 + exp(t *
200  -.400952381) * .001437922352 + exp(t * -.01333333333) *
201  .237530423 + exp(t * -.002285714286) * .02501521924 + t5
202  * 1.670506271e-4 * t * t7 - t5 * .09338148045 * t7 + t *
203  35.49613478 * t7 - t7 * 6779.097011;
204  }
205  // tail cancellation, tp= 50,t0=2.1
206  if (theTailShaping == CONSERVATIVE) {
207  // Computing 2nd power
208  t1 = t * t;
209  t3 = exp(t * -.06);
210  cat = t1 * 1.703945294e-4 * t * t3 - t1 * .09507342939 * t3 + t
211  * 36.14686596 * t3 - t3 * 6903.29548 + exp(t *
212  -.01333333333) * .2646640264 + exp(t * -.400952381) *
213  .001442019131 + exp(t * -.06523809524) * 6903.029373 +
214  exp(t * -.003418326524) * 7.696672009e-11;
215  }
216  // radical tail cancellation, tp= 50,t0=2.1
217  if (theTailShaping == RADICAL) {
218  // Computing 2nd power
219  t1 = t * t;
220  t3 = exp(t * -.06);
221  cat = t1 * 2.028313098e-4 * t * t3 - t1 * .1106897038 * t3 + t *
222  42.23121193 * t3 - t3 * 8062.228042 - exp(t *
223  -.0207962661) * 3.535147864e-9 + exp(t * -.003418326524)
224  * 4.391346571e-11 + exp(t * -.400952381) * .001470327741
225  + exp(t * -.06523809524) * 8062.226572;
226  }
227  break;
228  case 60:
229  // no tail cancellation, tp= 60,t0=2.1
230  if (theTailShaping == NONE) {
231  // Computing 2nd power
232  t5 = t * t;
233  t7 = exp(t * -.05);
234  cat = exp(t * -.06523809524) * 54.77495457 + exp(t *
235  -.400952381) * 7.412655802e-4 + exp(t * -.01333333333) *
236  .3606757184 + exp(t * -.002285714286) * .03098847247 +
237  t5 * 3.411745868e-5 * t * t7 - t5 * .006682738979 * t7 +
238  t * .8202227541 * t7 - t7 * 55.16736002;
239  }
240  // tail cancellation, tp= 60,t0=2.1
241  if (theTailShaping == CONSERVATIVE) {
242  // Computing 2nd power
243  t1 = t * t;
244  t3 = exp(t * -.05);
245  cat = t1 * 3.494700919e-5 * t * t3 - t1 * .006791801191 * t3 +
246  t * .8354834745 * t3 - t3 * 56.18111721 + exp(t *
247  -.01333333333) * .40187647 + exp(t * -.400952381) *
248  7.433775162e-4 + exp(t * -.06523809524) * 55.77849736 +
249  exp(t * -.003418326524) * 9.696210758e-11;
250  }
251  // radical tail cancellation, tp= 60,t0=2.1
252  if (theTailShaping == RADICAL) {
253  // Computing 2nd power
254  t1 = t * t;
255  t3 = exp(t * -.05);
256  cat = t1 * 4.387761992e-5 * t * t3 - t1 * .007610015855 * t3 +
257  t * .9929540112 * t3 - t3 * 65.14590792 - exp(t *
258  -.0207962661) * 6.643853476e-9 + exp(t * -.003418326524)
259  * 5.532186095e-11 + exp(t * -.400952381) * 7.57970932e-4
260  + exp(t * -.06523809524) * 65.14514995;
261  }
262  break;
263  case 70:
264  // no tail cancellation, tp= 70,t0=2.1
265  if (theTailShaping == NONE) {
266  // Computing 2nd power
267  t5 = t * t;
268  t7 = exp(t * -.04285714286);
269  cat = exp(t * -.06523809524) * 7.412251365 + exp(t *
270  -.400952381) * 4.306575393e-4 + exp(t * -.01333333333) *
271  .5403469187 + exp(t * -.002285714286) * .03733123063 +
272  t5 * 1.441232259e-5 * t * t7 - t5 * .002150258989 * t7 +
273  t * .1485797804 * t7 - t7 * 7.990360172;
274  }
275  // tail cancellation, tp= 70,t0=2.1
276  if (theTailShaping == CONSERVATIVE) {
277  // Computing 2nd power
278  t1 = t * t;
279  t3 = exp(t * -.04285714286);
280  cat = t1 * 1.48262187e-5 * t * t3 - t1 * .002180526664 * t3 + t
281  * .1513118077 * t3 - t3 * 8.150556465 + exp(t *
282  -.01333333333) * .6020718923 + exp(t * -.400952381) *
283  4.318845237e-4 + exp(t * -.06523809524) * 7.548052688 +
284  exp(t * -.003418326524) * 1.188301202e-10;
285  }
286  // radical tail cancellation, tp= 70,t0=2.1
287  if (theTailShaping == RADICAL) {
288  // Computing 2nd power
289  t1 = t * t;
290  t3 = exp(t * -.04285714286);
291  cat = t1 * 1.984175252e-5 * t * t3 - t1 * .00223612384 * t3 + t
292  * .1974584549 * t3 - t3 * 8.816006345 - exp(t *
293  -.0207962661) * 1.284819542e-8 + exp(t * -.003418326524)
294  * 6.779868504e-11 + exp(t * -.400952381) * 4.40362949e-4
295  + exp(t * -.06523809524) * 8.815565996;
296  }
297  break;
298  case 80:
299  // no tail cancellation, tp= 80,t0=2.1
300  if (theTailShaping == NONE) {
301  // Computing 2nd power
302  t5 = t * t;
303  t7 = exp(t * -.0375);
304  cat = exp(t * -.06523809524) * 2.104660307 + exp(t *
305  -.400952381) * 2.718693973e-4 + exp(t * -.01333333333) *
306  .806342238 + exp(t * -.002285714286) * .04406584799 + t5
307  * 7.444156851e-6 * t * t7 - t5 * .00109040647 * t7 + t *
308  .03743972817 * t7 - t7 * 2.955340262;
309  }
310  // tail cancellation, tp= 80,t0=2.1
311  if (theTailShaping == CONSERVATIVE) {
312  // Computing 2nd power
313  t1 = t * t;
314  t3 = exp(t * -.0375);
315  cat = t1 * 7.69154327e-6 * t * t3 - t1 * .001104867276 * t3 + t
316  * .0378353391 * t3 - t3 * 3.041945271 + exp(t *
317  -.01333333333) * .8984524213 + exp(t * -.400952381) *
318  2.726439789e-4 + exp(t * -.06523809524) * 2.143220205 +
319  exp(t * -.003418326524) * 1.42745537e-10;
320  }
321  // radical tail cancellation, tp= 80,t0=2.1
322  if (theTailShaping == RADICAL) {
323  // Computing 2nd power
324  t1 = t * t;
325  t3 = exp(t * -.0375);
326  cat = t1 * 1.112798871e-5 * t * t3 - t1 * 9.813148933e-4 * t3 +
327  t * .06953288418 * t3 - t3 * 2.503400292 - exp(t *
328  -.0207962661) * 2.618804719e-8 + exp(t * -.003418326524)
329  * 8.144365827e-11 + exp(t * -.400952381) *
330  2.779963161e-4 + exp(t * -.06523809524) * 2.50312232;
331  }
332  break;
333  case 90:
334  // no tail cancellation, tp= 90,t0=2.1
335  if (theTailShaping == NONE) {
336  // Computing 2nd power
337  t5 = t * t;
338  t7 = exp(t * -.03333333333);
339  cat = exp(t * -.06523809524) * .8445180788 + exp(t *
340  -.400952381) * 1.824319111e-4 + exp(t * -.01333333333) *
341  1.207282396 + exp(t * -.002285714286) * .051216146 + t5
342  * 4.216536082e-6 * t * t7 - t5 * 7.082920848e-4 * t7 + t
343  * .001275426356 * t7 - t7 * 2.103199053;
344  }
345  // tail cancellation, tp= 90,t0=2.1
346  if (theTailShaping == CONSERVATIVE) {
347  // Computing 2nd power
348  t1 = t * t;
349  t3 = exp(t * -.03333333333);
350  cat = t1 * 4.376178381e-6 * t * t3 - t1 * 7.190991486e-4 * t3 +
351  t * 6.011974229e-4 * t3 - t3 * 2.205366435 + exp(t *
352  -.01333333333) * 1.345192821 + exp(t * -.400952381) *
353  1.829516768e-4 + exp(t * -.06523809524) * .8599906622 +
354  exp(t * -.003418326524) * 1.68900989e-10;
355  }
356  // radical tail cancellation, tp= 90,t0=2.1
357  if (theTailShaping == RADICAL) {
358  // Computing 2nd power
359  t1 = t * t;
360  t3 = exp(t * -.03333333333);
361  cat = t1 * 6.981183555e-6 * t * t3 - t1 * 5.238041184e-4 * t3 +
362  t * .03211389084 * t3 - t3 * 1.004591827 - exp(t *
363  -.0207962661) * 5.795834545e-8 + exp(t * -.003418326524)
364  * 9.636668658e-11 + exp(t * -.400952381) *
365  1.865432436e-4 + exp(t * -.06523809524) * 1.004405341;
366  }
367  break;
368  */
369  case 100:
370  // no tail cancellation, tp=100,t0=2.1
371  if (theTailShaping == NONE) {
372  // Computing 2nd power
373  t5 = t * t;
374  t7 = exp(t * -.03);
375  cat = exp(t * -.06523809524) * .4137221868 + exp(t * -.400952381) * 1.282766787e-4 +
376  exp(t * -.01333333333) * 1.824993745 + exp(t * -.002285714286) * .05880752038 +
377  t5 * 2.491640871e-6 * t * t7 - t5 * 5.417458918e-4 * t7 - t * .01742000448 * t7 - t7 * 2.297651729;
378  }
379  // tail cancellation, tp=100,t0=2.1
380  if (theTailShaping == CONSERVATIVE) {
381  // Computing 2nd power
382  t1 = t * t;
383  t3 = exp(t * -.03);
384  cat = t1 * 2.597806608e-6 * t * t3 - t1 * 5.528471798e-4 * t3 - t * .0189975081 * t3 - t3 * 2.454897362 +
385  exp(t * -.01333333333) * 2.033466647 + exp(t * -.400952381) * 1.28642151e-4 +
386  exp(t * -.06523809524) * .4213020729 + exp(t * -.003418326524) * 1.975089906e-10;
387  }
388  // radical tail cancellation, tp=100,t0=2.1
389  if (theTailShaping == RADICAL) {
390  // Computing 2nd power
391  t1 = t * t;
392  t3 = exp(t * -.03);
393  cat = t1 * 4.704262123e-6 * t * t3 - t1 * 3.14519427e-4 * t3 + t * .01738754854 * t3 - t3 * .4921806115 -
394  exp(t * -.0207962661) * 1.454692205e-7 + exp(t * -.003418326524) * 1.126890204e-10 +
395  exp(t * -.400952381) * 1.311675549e-4 + exp(t * -.06523809524) * .4920495894;
396  }
397  break;
398  /*
399  case 150:
400  // no tail cancellation, tp=150,t0=2.1
401  if (theTailShaping == NONE) {
402  // Computing 2nd power
403  t5 = t * t;
404  t7 = exp(t * -.02);
405  cat = exp(t * -.06523809524) * .0451302243 + exp(t *
406  -.400952381) * 3.417148182e-5 + exp(t * -.01333333333) *
407  21.12261275 + exp(t * -.002285714286) * .1043948969 - t5
408  * 1.285903907e-7 * t * t7 - t5 * 5.344294733e-4 * t7 -
409  t * .1406120762 * t7 - t7 * 21.27217204;
410  }
411  // tail cancellation, tp=150,t0=2.1
412  if (theTailShaping == CONSERVATIVE) {
413  // Computing 2nd power
414  t1 = t * t;
415  t3 = exp(t * -.02);
416  cat = t1 * -1.373737668e-7 * t * t3 - t1 * 5.725228237e-4 * t3 -
417  t * .1548112258 * t3 - t3 * 23.58148492 + exp(t *
418  -.01333333333) * 23.5354936 + exp(t * -.400952381) *
419  3.426883961e-5 + exp(t * -.06523809524) * .04595706409 +
420  exp(t * -.003418326524) * 3.864816979e-10;
421  }
422  // radical tail cancellation, tp=150,t0=2.1
423  if (theTailShaping == RADICAL) {
424  // Computing 2nd power
425  t1 = t * t;
426  t3 = exp(t * -.02);
427  cat = t1 * 1.150149576e-6 * t * t3 - t1 * 5.745717877e-5 * t3 +
428  t * .00244082808 * t3 - t3 * .05294004164 - exp(t *
429  -.0207962661) * 7.693441476e-4 + exp(t * -.003418326524)
430  * 2.205076529e-10 + exp(t * -.400952381) *
431  3.494157914e-5 + exp(t * -.06523809524) * .05367444399;
432  }
433  break;
434  case 200:
435  // no tail cancellation, tp=200,t0=2.1
436  if (theTailShaping == NONE) {
437  // Computing 2nd power
438  t5 = t * t;
439  t7 = exp(t * -.015);
440  cat = exp(t * -.06523809524) * .01251802645 + exp(t *
441  -.400952381) * 1.36834457e-5 + exp(t * -.01333333333) *
442  2281.242177 + exp(t * -.002285714286) * .1659547829 - t5
443  * 1.421417147e-6 * t * t7 - t5 * .003198621512 * t7 - t
444  * 3.803546128 * t7 - t7 * 2281.420663;
445  }
446  // tail cancellation, tp=200,t0=2.1
447  if (theTailShaping == CONSERVATIVE) {
448  // Computing 2nd power
449  t1 = t * t;
450  t3 = exp(t * -.015);
451  cat = t1 * -1.560422488e-6 * t * t3 - t1 * .003547432409 * t3 -
452  t * 4.235743145 * t3 - t3 * 2541.846068 + exp(t *
453  -.01333333333) * 2541.833308 + exp(t * -.400952381) *
454  1.372243114e-5 + exp(t * -.06523809524) * .01274737169 +
455  exp(t * -.003418326524) * 6.850793727e-10;
456  }
457  // radical tail cancellation, tp=200,t0=2.1
458  if (theTailShaping == RADICAL) {
459  // Computing 2nd power
460  t1 = t * t;
461  t3 = exp(t * -.015);
462  cat = t1 * 4.486861205e-7 * t * t3 - t1 * 1.982974483e-5 * t3 +
463  t * 7.533435174e-4 * t3 - t3 * .01490186176 - exp(t *
464  -.0207962661) * 1.155963393e-7 + exp(t * -.003418326524)
465  * 3.908729581e-10 + exp(t * -.400952381) *
466  1.399181936e-5 + exp(t * -.06523809524) * .01488798515;
467  }
468  break;
469  case 250:
470  // no tail cancellation, tp=250,t0=2.1
471  if (theTailShaping == NONE) {
472  // Computing 2nd power
473  t5 = t * t;
474  t7 = exp(t * -.012);
475  cat = exp(t * -.06523809524) * .005082161364 + exp(t *
476  -.400952381) * 6.792264583e-6 + exp(t * -.01333333333) *
477  2851.552722 + exp(t * -.002285714286) * .2493354963 + t5
478  * 1.282866561e-6 * t * t7 - t5 * .002554194047 * t7 + t
479  * 3.799921386 * t7 - t7 * 2851.807146;
480  }
481  // tail cancellation, tp=250,t0=2.1
482  if (theTailShaping == CONSERVATIVE) {
483  // Computing 2nd power
484  t1 = t * t;
485  t3 = exp(t * -.012);
486  cat = t1 * 1.452179735e-6 * t * t3 - t1 * .0028321086 * t3 + t *
487  4.236667018 * t3 - t3 * 3177.296817 + exp(t *
488  -.01333333333) * 3177.291635 + exp(t * -.400952381) *
489  6.811616389e-6 + exp(t * -.06523809524) * .005175272648
490  + exp(t * -.003418326524) * 1.163611956e-9;
491  }
492  // radical tail cancellation, tp=250,t0=2.1
493  if (theTailShaping == RADICAL) {
494  // Computing 2nd power
495  t1 = t * t;
496  t3 = exp(t * -.012);
497  cat = t1 * 2.201206315e-7 * t * t3 - t1 * 9.091071906e-6 * t3 +
498  t * 3.244901734e-4 * t3 - t3 * .006051269645 - exp(t *
499  -.0207962661) * 1.115870681e-8 + exp(t * -.003418326524)
500  * 6.639003673e-10 + exp(t * -.400952381) *
501  6.945336809e-6 + exp(t * -.06523809524) * .006044334803;
502  }
503  break;
504  case 300:
505  // no tail cancellation, tp=300,t0=2.1
506  if (theTailShaping == NONE) {
507  // Computing 2nd power
508  t5 = t * t ;
509  t7 = exp(t * -.01);
510  cat = exp(t * -.06523809524) * .002537698188 + exp(t *
511  -.400952381) * 3.850890276e-6 + exp(t * -.01333333333) *
512  42.24522552 + exp(t * -.002285714286) * .3628281578 + t5
513  * 3.42649397e-7 * t * t7 - t5 * 2.496575507e-4 * t7 + t
514  * .1381601414 * t7 - t7 * 42.61059522;
515  }
516  // tail cancellation, tp=300,t0=2.1
517  if (theTailShaping == CONSERVATIVE) {
518  // Computing 2nd power
519  t1 = t * t;
520  t3 = exp(t * -.01);
521  cat = t1 * 4.016144767e-7 * t * t3 - t1 * 2.657431191e-4 * t3 +
522  t * .1570475462 * t3 - t3 * 47.07357524 + exp(t *
523  -.01333333333) * 47.07098718 + exp(t * -.400952381) *
524  3.861861828e-6 + exp(t * -.06523809524) * .002584191857
525  + exp(t * -.003418326524) * 1.946287754e-9;
526  }
527  // radical tail cancellation, tp=300,t0=2.1
528  if (theTailShaping == RADICAL) {
529  // Computing 2nd power
530  t1 = t * t;
531  t3 = exp(t * -.01);
532  cat = t1 * 1.239979555e-7 * t * t3 - t1 * 4.905476843e-6 * t3 +
533  t * 1.682559598e-4 * t3 - t3 * .00302208046 - exp(t *
534  -.0207962661) * 2.845569802e-9 + exp(t * -.003418326524)
535  * 1.110457097e-9 + exp(t * -.400952381) * 3.937674932e-6
536  + exp(t * -.06523809524) * .00301814452;
537  }
538  break;
539  */
540  default:
541  edm::LogError("CSCStripElectronicsSim") << "Bad shaping time CSCStripElectronicsSim " << theShapingTime;
542  break;
543  }
544  return cat;
545 }
MessageLogger.h
CSCStripAmpResponse.h
eostools.cat
def cat(path)
Definition: eostools.py:401
CSCStripAmpResponse::CONSERVATIVE
Definition: CSCStripAmpResponse.h:6
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
CSCStripAmpResponse::calculateAmpResponse
float calculateAmpResponse(float t) const
Definition: CSCStripAmpResponse.cc:11
OrderedSet.t
t
Definition: OrderedSet.py:90
RandomServiceHelper.t3
t3
Definition: RandomServiceHelper.py:258
edm::LogError
Definition: MessageLogger.h:183
muonCSCDigis_cfi.tailShaping
tailShaping
Definition: muonCSCDigis_cfi.py:44
CSCStripAmpResponse::CSCStripAmpResponse
CSCStripAmpResponse(int shapingTime, int tailShaping)
Definition: CSCStripAmpResponse.cc:8
CSCStripAmpResponse::RADICAL
Definition: CSCStripAmpResponse.h:6
CSCStripAmpResponse::theShapingTime
int theShapingTime
Definition: CSCStripAmpResponse.h:13
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
CSCStripAmpResponse::theTailShaping
int theTailShaping
Definition: CSCStripAmpResponse.h:14
muonCSCDigis_cfi.shapingTime
shapingTime
Definition: muonCSCDigis_cfi.py:15
CSCStripAmpResponse::NONE
Definition: CSCStripAmpResponse.h:6