CMS 3D CMS Logo

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