CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/SimMuon/CSCDigitizer/src/CSCStripAmpResponse.cc

Go to the documentation of this file.
00001 
00002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00003 #include "SimMuon/CSCDigitizer/src/CSCStripAmpResponse.h"
00004 
00005 #include <iostream>
00006 #include <cmath>
00007 
00008 
00009 CSCStripAmpResponse::CSCStripAmpResponse(int shapingTime, int tailShaping)
00010 : theShapingTime(shapingTime),
00011   theTailShaping(tailShaping)
00012 {
00013 }
00014 
00015 
00016 float CSCStripAmpResponse::calculateAmpResponse(float t) const
00017 {
00018 
00019     // Local variables 
00020     double t1, t3, t5, t7, cat=0.;
00021 
00022 // ! CSC Cathode amplifier-shaper response to single e- 
00023 
00024 //     Author: S. Durkin Oct. 13, 1995 
00025 
00026 //     Routine gives cathode amplifier response to a single drift electron 
00027 //     Positive ion drift collection is included 
00028 //     FLAGS:      itp  amplifier/shaper peaking time 
00029 //     10,20,30,40,50,60,70,80,90,100,150,200,250,300 nsec available 
00030 //                 itl  amplifier tail cancellation 
00031 //                      1 no tail cancellation 
00032 //                      2 conservative tail cancellation 
00033 //                      3 radical tail cancellation(some charge loss) 
00034 
00035 //     calculations were done using maple 
00036 //     4-pole semigaussian shaper is assumed 
00037 
00038 //     frequency 2tp/27/exp(-3)/(stp/3+1)**3 
00039 //                           | 
00040 //                           \/ 
00041 //     time     (t/tp)**3/exp(-3)*exp(-3t/tp) 
00042 
00043 //     this time distribution was convoluted with positive ion 
00044 //     drift formula 
00045 
00046 //                1/(t0+t)*.05650     note:normalization estimated from K1 
00047 //                                         Gatti N.I.M. 163,82(1979) 
00048 //                where t0=2.1 nsec (GEM gas) 
00049 
00050 //            standard tail cancellation has lowest pole removed (exp approx) 
00051 //            using 1 zero and 1 pole 
00052 //            radical tail cancellation has lowest two poles removed (exp approx) 
00053 //            using 2 zeros and 2 poles 
00054 
00055     if(theTailShaping != 0 && theTailShaping != 1 && theTailShaping != 2) {
00056        edm::LogError("CSCStripElectronicsSim") << "Bad TailShaping CSCStripElectronicsSim"
00057             << theTailShaping;
00058         return 0.;
00059     }
00060 
00061     switch(theShapingTime) {
00062 /*
00063     case 10:
00064 // no tail cancellation, tp= 10,t0=2.1 
00065         if (theTailShaping == NONE) {
00066 // Computing 2nd power 
00067             t5 = t * t;
00068             t7 = exp(t * -.3);
00069             cat = exp(t * -.06523809524) * .2100138871 + exp(t * 
00070                     -.400952381) * 23.38590029 + exp(t * -.01333333333) * 
00071                     .02085199407 + exp(t * -.002285714286) * .004416201989 + 
00072                     t5 * .00345590637 * t * t7 - t5 * .1260070972 * t7 + t *
00073                      2.304266717 * t7 - t7 * 23.62118237;
00074         }
00075 //  tail cancellation, tp= 10,t0=2.1 
00076         if (theTailShaping == CONSERVATIVE) {
00077 // Computing 2nd power 
00078             t1 = t * t;
00079             t3 = exp(t * -.3);
00080             cat = t1 * .003469104089 * t * t3 - t1 * .1263548058 * t3 + t * 
00081                     2.310721678 * t3 - t3 * 23.68962448 + exp(t * 
00082                     -.01333333333) * .02323396152 + exp(t * -.400952381) * 
00083                     23.45252892 + exp(t * -.06523809524) * .2138615931 + exp(
00084                     t * -.003418326524) * 1.274497241e-11;
00085         }
00086 //  radical tail cancellation, tp= 10,t0=2.1 
00087         if (theTailShaping == RADICAL) {
00088 // Computing 2nd power 
00089             t1 = t * t;
00090             t3 = exp(t * -.3);
00091             cat = t1 * .003561830965 * t * t3 - t1 * .1287358512 * t3 + t * 
00092                     2.355429782 * t3 - t3 * 24.16270544 - exp(t * 
00093                     -.0207962661) * 1.717680715e-10 + exp(t * -.003418326524)
00094                      * 7.271661158e-12 + exp(t * -.400952381) * 23.91293094 
00095                     + exp(t * -.06523809524) * .2497744869;
00096         }
00097         break; 
00098     case 20:
00099 // no tail cancellation, tp= 20,t0=2.1 
00100         if (theTailShaping == NONE) {
00101 // Computing 2nd power 
00102             t5 = t * t;
00103             t7 = exp(t * -.15);
00104             cat = exp(t * -.06523809524) * 1.544776642 + exp(t * 
00105                     -.400952381) * .07655350666 + exp(t * -.01333333333) * 
00106                     .0504563677 + exp(t * -.002285714286) * .009108935882 + 
00107                     t5 * 1.849663895e-5 * t * t7 - t5 * .008530427568 * t7 - 
00108                     t * .1199681494 * t7 - t7 * 1.680895453;
00109         }
00110 //  tail cancellation, tp= 20,t0=2.1 
00111         if (theTailShaping == CONSERVATIVE) {
00112 // Computing 2nd power 
00113             t1 = t * t;
00114             t3 = exp(t * -.15);
00115             cat = t1 * 1.863955948e-5 * t * t3 - t1 * .008593415697 * t3 -
00116                     t * .1217545504 * t3 - t3 * 1.706070522 + exp(t * 
00117                     -.01333333333) * .05622010555 + exp(t * -.400952381) * 
00118                     .07677161489 + exp(t * -.06523809524) * 1.573078801 + 
00119                     exp(t * -.003418326524) * 2.669976603e-11;
00120         }
00121 //  radical tail cancellation, tp= 20,t0=2.1 
00122         if (theTailShaping == RADICAL) {
00123 // Computing 2nd power 
00124             t1 = t * t;
00125             t3 = exp(t * -.15);
00126             cat = t1 * 1.971619848e-5 * t * t3 - t1 * .009064781071 * t3 -
00127                     t * .1360836779 * t3 - t3 * 1.915518161 - exp(t * 
00128                     -.0207962661) * 4.682061154e-10 + exp(t * -.003418326524)
00129                      * 1.523358744e-11 + exp(t * -.400952381) * .07827873625 
00130                     + exp(t * -.06523809524) * 1.837239425;
00131         }
00132         break; 
00133 */
00134     case 30:
00135 // no tail cancellation, tp= 30,t0=2.1 
00136         if (theTailShaping == NONE) {
00137 // Computing 2nd power 
00138             t5 = t * t;
00139             t7 = exp(t * -.1);
00140             cat = exp(t * -.06523809524) * 16.18007335 + exp(t * 
00141                     -.400952381) * .01096643477 + exp(t * -.01333333333) * 
00142                     .0924451733 + exp(t * -.002285714286) * .01409456303 - 
00143                     t5 * 7.567748611e-5 * t * t7 - t5 * .01068701841 * t7 - 
00144                     t * .5685389492 * t7 - t7 * 16.29757952;
00145         }
00146 //  tail cancellation, tp= 30,t0=2.1 
00147         if (theTailShaping == CONSERVATIVE) {
00148 // Computing 2nd power 
00149             t1 = t * t;
00150             t3 = exp(t * -.1);
00151             cat = t1 * -7.656495508e-5 * t * t3 - t1 * .01083991133 * t3 - 
00152                     t * .5783722846 * t3 - t3 * 16.59051472 + exp(t * 
00153                     -.01333333333) * .1030053814 + exp(t * -.400952381) * 
00154                     .01099767919 + exp(t * -.06523809524) * 16.47651166 + 
00155                     exp(t * -.003418326524) * 4.197333487e-11;
00156         }
00157 //  radical tail cancellation, tp= 30,t0=2.1 
00158         if (theTailShaping == RADICAL) {
00159 // Computing 2nd power 
00160             t1 = t * t;
00161             t3 = exp(t * -.1);
00162             cat = t1 * -8.37792502e-5 * t * t3 - t1 * .0121345525 * t3 - t *
00163                      .6655605456 * t3 - t3 * 19.25455777 - exp(t * 
00164                     -.0207962661) * 9.823832281e-10 + exp(t * -.003418326524)
00165                      * 2.394794269e-11 + exp(t * -.400952381) * .01121357717 
00166                     + exp(t * -.06523809524) * 19.2433442;
00167         }
00168         break; 
00169 /*
00170     case 40:
00171 // no tail cancellation, tp= 40,t0=2.1 
00172         if (theTailShaping == NONE) {
00173 // Computing 2nd power 
00174             t5 = t * t;
00175             t7 = exp(t * -.075);
00176             cat = exp(t * -.06523809524) * 1097.590331 + exp(t * 
00177                     -.400952381) * .003362201622 + exp(t * -.01333333333) * 
00178                     .1521508944 + exp(t * -.002285714286) * .01939048554 - 
00179                     t5 * 1.579570388e-4 * t * t7 - t5 * .05281648589 * t7 -
00180                     t * 10.72426897 * t7 - t7 * 1097.765235;
00181         }
00182 //  tail cancellation, tp= 40,t0=2.1 
00183         if (theTailShaping == CONSERVATIVE) {
00184 // Computing 2nd power 
00185             t1 = t * t;
00186             t3 = exp(t * -.075);
00187             cat = t1 * -1.604563386e-4 * t * t3 - t1 * .05375692904 * t3 -
00188                     t * 10.92023147 * t3 - t3 * 1117.872403 + exp(t * 
00189                     -.01333333333) * .1695314135 + exp(t * -.400952381) * 
00190                     .003371780853 + exp(t * -.06523809524) * 1117.6995 + exp(
00191                     t * -.003418326524) * 5.868522605e-11;
00192         }
00193 //  radical tail cancellation, tp= 40,t0=2.1 
00194         if (theTailShaping == RADICAL) {
00195 // Computing 2nd power 
00196             t1 = t * t;
00197             t3 = exp(t * -.075);
00198             cat = t1 * -1.825484488e-4 * t * t3 - t1 * .06238107065 * t3 -
00199                     t * 12.7419738 * t3 - t3 * 1305.393597 - exp(t * 
00200                     -.0207962661) * 1.889428819e-9 + exp(t * -.003418326524) 
00201                     * 3.348293469e-11 + exp(t * -.400952381) * .003437973064 
00202                     + exp(t * -.06523809524) * 1305.390159;
00203         }
00204         break; 
00205     case 50:
00206 // no tail cancellation, tp= 50,t0=2.1 
00207         if (theTailShaping == NONE) {
00208 // Computing 2nd power 
00209             t5 = t * t;
00210             t7 = exp(t * -.06);
00211             cat = exp(t * -.06523809524) * 6778.833027 + exp(t * 
00212                     -.400952381) * .001437922352 + exp(t * -.01333333333) * 
00213                     .237530423 + exp(t * -.002285714286) * .02501521924 + t5 
00214                     * 1.670506271e-4 * t * t7 - t5 * .09338148045 * t7 + t *
00215                      35.49613478 * t7 - t7 * 6779.097011;
00216         }
00217 //  tail cancellation, tp= 50,t0=2.1 
00218         if (theTailShaping == CONSERVATIVE) {
00219 // Computing 2nd power 
00220             t1 = t * t;
00221             t3 = exp(t * -.06);
00222             cat = t1 * 1.703945294e-4 * t * t3 - t1 * .09507342939 * t3 + t 
00223                     * 36.14686596 * t3 - t3 * 6903.29548 + exp(t * 
00224                     -.01333333333) * .2646640264 + exp(t * -.400952381) * 
00225                     .001442019131 + exp(t * -.06523809524) * 6903.029373 + 
00226                     exp(t * -.003418326524) * 7.696672009e-11;
00227         }
00228 //  radical tail cancellation, tp= 50,t0=2.1 
00229         if (theTailShaping == RADICAL) {
00230 // Computing 2nd power 
00231             t1 = t * t;
00232             t3 = exp(t * -.06);
00233             cat = t1 * 2.028313098e-4 * t * t3 - t1 * .1106897038 * t3 + t *
00234                      42.23121193 * t3 - t3 * 8062.228042 - exp(t * 
00235                     -.0207962661) * 3.535147864e-9 + exp(t * -.003418326524) 
00236                     * 4.391346571e-11 + exp(t * -.400952381) * .001470327741 
00237                     + exp(t * -.06523809524) * 8062.226572;
00238         }
00239         break; 
00240     case 60:
00241 // no tail cancellation, tp= 60,t0=2.1 
00242         if (theTailShaping == NONE) {
00243 // Computing 2nd power 
00244             t5 = t * t;
00245             t7 = exp(t * -.05);
00246             cat = exp(t * -.06523809524) * 54.77495457 + exp(t * 
00247                     -.400952381) * 7.412655802e-4 + exp(t * -.01333333333) * 
00248                     .3606757184 + exp(t * -.002285714286) * .03098847247 + 
00249                     t5 * 3.411745868e-5 * t * t7 - t5 * .006682738979 * t7 + 
00250                     t * .8202227541 * t7 - t7 * 55.16736002;
00251         }
00252 //  tail cancellation, tp= 60,t0=2.1 
00253         if (theTailShaping == CONSERVATIVE) {
00254 // Computing 2nd power 
00255             t1 = t * t;
00256             t3 = exp(t * -.05);
00257             cat = t1 * 3.494700919e-5 * t * t3 - t1 * .006791801191 * t3 +
00258                     t * .8354834745 * t3 - t3 * 56.18111721 + exp(t * 
00259                     -.01333333333) * .40187647 + exp(t * -.400952381) * 
00260                     7.433775162e-4 + exp(t * -.06523809524) * 55.77849736 + 
00261                     exp(t * -.003418326524) * 9.696210758e-11;
00262         }
00263 //  radical tail cancellation, tp= 60,t0=2.1 
00264         if (theTailShaping == RADICAL) {
00265 // Computing 2nd power 
00266             t1 = t * t;
00267             t3 = exp(t * -.05);
00268             cat = t1 * 4.387761992e-5 * t * t3 - t1 * .007610015855 * t3 +
00269                     t * .9929540112 * t3 - t3 * 65.14590792 - exp(t * 
00270                     -.0207962661) * 6.643853476e-9 + exp(t * -.003418326524) 
00271                     * 5.532186095e-11 + exp(t * -.400952381) * 7.57970932e-4 
00272                     + exp(t * -.06523809524) * 65.14514995;
00273         }
00274         break; 
00275     case 70:
00276 // no tail cancellation, tp= 70,t0=2.1 
00277         if (theTailShaping == NONE) {
00278 // Computing 2nd power 
00279             t5 = t * t;
00280             t7 = exp(t * -.04285714286);
00281             cat = exp(t * -.06523809524) * 7.412251365 + exp(t * 
00282                     -.400952381) * 4.306575393e-4 + exp(t * -.01333333333) * 
00283                     .5403469187 + exp(t * -.002285714286) * .03733123063 + 
00284                     t5 * 1.441232259e-5 * t * t7 - t5 * .002150258989 * t7 + 
00285                     t * .1485797804 * t7 - t7 * 7.990360172;
00286         }
00287 //  tail cancellation, tp= 70,t0=2.1 
00288         if (theTailShaping == CONSERVATIVE) {
00289 // Computing 2nd power 
00290             t1 = t * t;
00291             t3 = exp(t * -.04285714286);
00292             cat = t1 * 1.48262187e-5 * t * t3 - t1 * .002180526664 * t3 + t 
00293                     * .1513118077 * t3 - t3 * 8.150556465 + exp(t * 
00294                     -.01333333333) * .6020718923 + exp(t * -.400952381) * 
00295                     4.318845237e-4 + exp(t * -.06523809524) * 7.548052688 + 
00296                     exp(t * -.003418326524) * 1.188301202e-10;
00297         }
00298 //  radical tail cancellation, tp= 70,t0=2.1 
00299         if (theTailShaping == RADICAL) {
00300 // Computing 2nd power 
00301             t1 = t * t;
00302             t3 = exp(t * -.04285714286);
00303             cat = t1 * 1.984175252e-5 * t * t3 - t1 * .00223612384 * t3 + t 
00304                     * .1974584549 * t3 - t3 * 8.816006345 - exp(t * 
00305                     -.0207962661) * 1.284819542e-8 + exp(t * -.003418326524) 
00306                     * 6.779868504e-11 + exp(t * -.400952381) * 4.40362949e-4 
00307                     + exp(t * -.06523809524) * 8.815565996;
00308         }
00309         break; 
00310     case 80:
00311 // no tail cancellation, tp= 80,t0=2.1 
00312         if (theTailShaping == NONE) {
00313 // Computing 2nd power 
00314             t5 = t * t;
00315             t7 = exp(t * -.0375);
00316             cat = exp(t * -.06523809524) * 2.104660307 + exp(t * 
00317                     -.400952381) * 2.718693973e-4 + exp(t * -.01333333333) * 
00318                     .806342238 + exp(t * -.002285714286) * .04406584799 + t5 
00319                     * 7.444156851e-6 * t * t7 - t5 * .00109040647 * t7 + t *
00320                      .03743972817 * t7 - t7 * 2.955340262;
00321         }
00322 //  tail cancellation, tp= 80,t0=2.1 
00323         if (theTailShaping == CONSERVATIVE) {
00324 // Computing 2nd power 
00325             t1 = t * t;
00326             t3 = exp(t * -.0375);
00327             cat = t1 * 7.69154327e-6 * t * t3 - t1 * .001104867276 * t3 + t 
00328                     * .0378353391 * t3 - t3 * 3.041945271 + exp(t * 
00329                     -.01333333333) * .8984524213 + exp(t * -.400952381) * 
00330                     2.726439789e-4 + exp(t * -.06523809524) * 2.143220205 + 
00331                     exp(t * -.003418326524) * 1.42745537e-10;
00332         }
00333 //  radical tail cancellation, tp= 80,t0=2.1 
00334         if (theTailShaping == RADICAL) {
00335 // Computing 2nd power 
00336             t1 = t * t;
00337             t3 = exp(t * -.0375);
00338             cat = t1 * 1.112798871e-5 * t * t3 - t1 * 9.813148933e-4 * t3 +
00339                     t * .06953288418 * t3 - t3 * 2.503400292 - exp(t * 
00340                     -.0207962661) * 2.618804719e-8 + exp(t * -.003418326524) 
00341                     * 8.144365827e-11 + exp(t * -.400952381) * 
00342                     2.779963161e-4 + exp(t * -.06523809524) * 2.50312232;
00343         }
00344         break;
00345     case 90:
00346 // no tail cancellation, tp= 90,t0=2.1 
00347         if (theTailShaping == NONE) {
00348 // Computing 2nd power 
00349             t5 = t * t;
00350             t7 = exp(t * -.03333333333);
00351             cat = exp(t * -.06523809524) * .8445180788 + exp(t * 
00352                     -.400952381) * 1.824319111e-4 + exp(t * -.01333333333) * 
00353                     1.207282396 + exp(t * -.002285714286) * .051216146 + t5 *
00354                      4.216536082e-6 * t * t7 - t5 * 7.082920848e-4 * t7 + t 
00355                     * .001275426356 * t7 - t7 * 2.103199053;
00356         }
00357 //  tail cancellation, tp= 90,t0=2.1 
00358         if (theTailShaping == CONSERVATIVE) {
00359 // Computing 2nd power 
00360             t1 = t * t;
00361             t3 = exp(t * -.03333333333);
00362             cat = t1 * 4.376178381e-6 * t * t3 - t1 * 7.190991486e-4 * t3 +
00363                     t * 6.011974229e-4 * t3 - t3 * 2.205366435 + exp(t * 
00364                     -.01333333333) * 1.345192821 + exp(t * -.400952381) * 
00365                     1.829516768e-4 + exp(t * -.06523809524) * .8599906622 + 
00366                     exp(t * -.003418326524) * 1.68900989e-10;
00367         }
00368 //  radical tail cancellation, tp= 90,t0=2.1 
00369         if (theTailShaping == RADICAL) {
00370 // Computing 2nd power 
00371             t1 = t * t;
00372             t3 = exp(t * -.03333333333);
00373             cat = t1 * 6.981183555e-6 * t * t3 - t1 * 5.238041184e-4 * t3 +
00374                     t * .03211389084 * t3 - t3 * 1.004591827 - exp(t * 
00375                     -.0207962661) * 5.795834545e-8 + exp(t * -.003418326524) 
00376                     * 9.636668658e-11 + exp(t * -.400952381) * 
00377                     1.865432436e-4 + exp(t * -.06523809524) * 1.004405341;
00378         }
00379         break; 
00380 */
00381     case 100:
00382 // no tail cancellation, tp=100,t0=2.1 
00383         if (theTailShaping == NONE) {
00384 // Computing 2nd power 
00385             t5 = t * t;
00386             t7 = exp(t * -.03);
00387             cat = exp(t * -.06523809524) * .4137221868 + exp(t * 
00388                     -.400952381) * 1.282766787e-4 + exp(t * -.01333333333) * 
00389                     1.824993745 + exp(t * -.002285714286) * .05880752038 + 
00390                     t5 * 2.491640871e-6 * t * t7 - t5 * 5.417458918e-4 * t7 
00391                     - t * .01742000448 * t7 - t7 * 2.297651729;
00392         }
00393 //  tail cancellation, tp=100,t0=2.1 
00394         if (theTailShaping == CONSERVATIVE) {
00395 // Computing 2nd power 
00396             t1 = t * t;
00397             t3 = exp(t * -.03);
00398             cat = t1 * 2.597806608e-6 * t * t3 - t1 * 5.528471798e-4 * t3 -
00399                     t * .0189975081 * t3 - t3 * 2.454897362 + exp(t * 
00400                     -.01333333333) * 2.033466647 + exp(t * -.400952381) * 
00401                     1.28642151e-4 + exp(t * -.06523809524) * .4213020729 + 
00402                     exp(t * -.003418326524) * 1.975089906e-10;
00403         }
00404 //  radical tail cancellation, tp=100,t0=2.1 
00405         if (theTailShaping == RADICAL) {
00406 // Computing 2nd power 
00407             t1 = t * t;
00408             t3 = exp(t * -.03);
00409             cat = t1 * 4.704262123e-6 * t * t3 - t1 * 3.14519427e-4 * t3 +
00410                     t * .01738754854 * t3 - t3 * .4921806115 - exp(t * 
00411                     -.0207962661) * 1.454692205e-7 + exp(t * -.003418326524) 
00412                     * 1.126890204e-10 + exp(t * -.400952381) * 
00413                     1.311675549e-4 + exp(t * -.06523809524) * .4920495894;
00414         }
00415         break; 
00416 /*
00417     case 150:
00418 // no tail cancellation, tp=150,t0=2.1 
00419         if (theTailShaping == NONE) {
00420 // Computing 2nd power 
00421             t5 = t * t;
00422             t7 = exp(t * -.02);
00423             cat = exp(t * -.06523809524) * .0451302243 + exp(t * 
00424                     -.400952381) * 3.417148182e-5 + exp(t * -.01333333333) * 
00425                     21.12261275 + exp(t * -.002285714286) * .1043948969 - t5 
00426                     * 1.285903907e-7 * t * t7 - t5 * 5.344294733e-4 * t7 -
00427                     t * .1406120762 * t7 - t7 * 21.27217204;
00428         }
00429 //  tail cancellation, tp=150,t0=2.1 
00430         if (theTailShaping == CONSERVATIVE) {
00431 // Computing 2nd power 
00432             t1 = t * t;
00433             t3 = exp(t * -.02);
00434             cat = t1 * -1.373737668e-7 * t * t3 - t1 * 5.725228237e-4 * t3 - 
00435                     t * .1548112258 * t3 - t3 * 23.58148492 + exp(t * 
00436                     -.01333333333) * 23.5354936 + exp(t * -.400952381) * 
00437                     3.426883961e-5 + exp(t * -.06523809524) * .04595706409 + 
00438                     exp(t * -.003418326524) * 3.864816979e-10;
00439         }
00440 //  radical tail cancellation, tp=150,t0=2.1 
00441         if (theTailShaping == RADICAL) {
00442 // Computing 2nd power 
00443             t1 = t * t;
00444             t3 = exp(t * -.02);
00445             cat = t1 * 1.150149576e-6 * t * t3 - t1 * 5.745717877e-5 * t3 +
00446                     t * .00244082808 * t3 - t3 * .05294004164 - exp(t * 
00447                     -.0207962661) * 7.693441476e-4 + exp(t * -.003418326524) 
00448                     * 2.205076529e-10 + exp(t * -.400952381) * 
00449                     3.494157914e-5 + exp(t * -.06523809524) * .05367444399;
00450         }
00451         break; 
00452     case 200:
00453 // no tail cancellation, tp=200,t0=2.1 
00454         if (theTailShaping == NONE) {
00455 // Computing 2nd power 
00456             t5 = t * t;
00457             t7 = exp(t * -.015);
00458             cat = exp(t * -.06523809524) * .01251802645 + exp(t * 
00459                     -.400952381) * 1.36834457e-5 + exp(t * -.01333333333) * 
00460                     2281.242177 + exp(t * -.002285714286) * .1659547829 - t5 
00461                     * 1.421417147e-6 * t * t7 - t5 * .003198621512 * t7 - t 
00462                     * 3.803546128 * t7 - t7 * 2281.420663;
00463         }
00464 //  tail cancellation, tp=200,t0=2.1 
00465         if (theTailShaping == CONSERVATIVE) {
00466 // Computing 2nd power 
00467             t1 = t * t;
00468             t3 = exp(t * -.015);
00469             cat = t1 * -1.560422488e-6 * t * t3 - t1 * .003547432409 * t3 -
00470                     t * 4.235743145 * t3 - t3 * 2541.846068 + exp(t * 
00471                     -.01333333333) * 2541.833308 + exp(t * -.400952381) * 
00472                     1.372243114e-5 + exp(t * -.06523809524) * .01274737169 + 
00473                     exp(t * -.003418326524) * 6.850793727e-10;
00474         }
00475 //  radical tail cancellation, tp=200,t0=2.1 
00476         if (theTailShaping == RADICAL) {
00477 // Computing 2nd power 
00478             t1 = t * t;
00479             t3 = exp(t * -.015);
00480             cat = t1 * 4.486861205e-7 * t * t3 - t1 * 1.982974483e-5 * t3 +
00481                     t * 7.533435174e-4 * t3 - t3 * .01490186176 - exp(t * 
00482                     -.0207962661) * 1.155963393e-7 + exp(t * -.003418326524) 
00483                     * 3.908729581e-10 + exp(t * -.400952381) * 
00484                     1.399181936e-5 + exp(t * -.06523809524) * .01488798515;
00485         }
00486         break;
00487     case 250:
00488 // no tail cancellation, tp=250,t0=2.1 
00489         if (theTailShaping == NONE) {
00490 // Computing 2nd power 
00491             t5 = t * t;
00492             t7 = exp(t * -.012);
00493             cat = exp(t * -.06523809524) * .005082161364 + exp(t * 
00494                     -.400952381) * 6.792264583e-6 + exp(t * -.01333333333) * 
00495                     2851.552722 + exp(t * -.002285714286) * .2493354963 + t5 
00496                     * 1.282866561e-6 * t * t7 - t5 * .002554194047 * t7 + t 
00497                     * 3.799921386 * t7 - t7 * 2851.807146;
00498         }
00499 //  tail cancellation, tp=250,t0=2.1 
00500         if (theTailShaping == CONSERVATIVE) {
00501 // Computing 2nd power 
00502             t1 = t * t;
00503             t3 = exp(t * -.012);
00504             cat = t1 * 1.452179735e-6 * t * t3 - t1 * .0028321086 * t3 + t *
00505                      4.236667018 * t3 - t3 * 3177.296817 + exp(t * 
00506                     -.01333333333) * 3177.291635 + exp(t * -.400952381) * 
00507                     6.811616389e-6 + exp(t * -.06523809524) * .005175272648 
00508                     + exp(t * -.003418326524) * 1.163611956e-9;
00509         }
00510 //  radical tail cancellation, tp=250,t0=2.1 
00511         if (theTailShaping == RADICAL) {
00512 // Computing 2nd power 
00513             t1 = t * t;
00514             t3 = exp(t * -.012);
00515             cat = t1 * 2.201206315e-7 * t * t3 - t1 * 9.091071906e-6 * t3 +
00516                     t * 3.244901734e-4 * t3 - t3 * .006051269645 - exp(t * 
00517                     -.0207962661) * 1.115870681e-8 + exp(t * -.003418326524) 
00518                     * 6.639003673e-10 + exp(t * -.400952381) * 
00519                     6.945336809e-6 + exp(t * -.06523809524) * .006044334803;
00520         }
00521         break; 
00522     case 300:
00523 // no tail cancellation, tp=300,t0=2.1 
00524         if (theTailShaping == NONE) {
00525 // Computing 2nd power 
00526             t5 = t * t ;
00527             t7 = exp(t * -.01);
00528             cat = exp(t * -.06523809524) * .002537698188 + exp(t * 
00529                     -.400952381) * 3.850890276e-6 + exp(t * -.01333333333) * 
00530                     42.24522552 + exp(t * -.002285714286) * .3628281578 + t5 
00531                     * 3.42649397e-7 * t * t7 - t5 * 2.496575507e-4 * t7 + t 
00532                     * .1381601414 * t7 - t7 * 42.61059522;
00533         }
00534 //  tail cancellation, tp=300,t0=2.1 
00535         if (theTailShaping == CONSERVATIVE) {
00536 // Computing 2nd power 
00537             t1 = t * t;
00538             t3 = exp(t * -.01);
00539             cat = t1 * 4.016144767e-7 * t * t3 - t1 * 2.657431191e-4 * t3 +
00540                     t * .1570475462 * t3 - t3 * 47.07357524 + exp(t * 
00541                     -.01333333333) * 47.07098718 + exp(t * -.400952381) * 
00542                     3.861861828e-6 + exp(t * -.06523809524) * .002584191857 
00543                     + exp(t * -.003418326524) * 1.946287754e-9;
00544         }
00545 //  radical tail cancellation, tp=300,t0=2.1 
00546         if (theTailShaping == RADICAL) {
00547 // Computing 2nd power 
00548             t1 = t * t;
00549             t3 = exp(t * -.01);
00550             cat = t1 * 1.239979555e-7 * t * t3 - t1 * 4.905476843e-6 * t3 +
00551                     t * 1.682559598e-4 * t3 - t3 * .00302208046 - exp(t * 
00552                     -.0207962661) * 2.845569802e-9 + exp(t * -.003418326524) 
00553                     * 1.110457097e-9 + exp(t * -.400952381) * 3.937674932e-6 
00554                     + exp(t * -.06523809524) * .00301814452;
00555         }
00556         break;
00557 */
00558     default:
00559         edm::LogError("CSCStripElectronicsSim") << "Bad shaping time CSCStripElectronicsSim " 
00560              << theShapingTime;
00561         break;
00562     }
00563     return cat;
00564 }
00565