Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:42

0001 
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 #include "SimMuon/CSCDigitizer/src/CSCStripAmpResponse.h"
0004 
0005 #include <cmath>
0006 #include <iostream>
0007 
0008 CSCStripAmpResponse::CSCStripAmpResponse(int shapingTime, int tailShaping)
0009     : theShapingTime(shapingTime), theTailShaping(tailShaping) {}
0010 
0011 float CSCStripAmpResponse::calculateAmpResponse(float t) const {
0012   // Local variables
0013   double t1, t3, t5, t7, cat = 0.;
0014 
0015   // ! CSC Cathode amplifier-shaper response to single e-
0016 
0017   //     Author: S. Durkin Oct. 13, 1995
0018 
0019   //     Routine gives cathode amplifier response to a single drift electron
0020   //     Positive ion drift collection is included
0021   //     FLAGS:      itp  amplifier/shaper peaking time
0022   //     10,20,30,40,50,60,70,80,90,100,150,200,250,300 nsec available
0023   //                 itl  amplifier tail cancellation
0024   //                      1 no tail cancellation
0025   //                      2 conservative tail cancellation
0026   //                      3 radical tail cancellation(some charge loss)
0027 
0028   //     calculations were done using maple
0029   //     4-pole semigaussian shaper is assumed
0030 
0031   //     frequency 2tp/27/exp(-3)/(stp/3+1)**3
0032   //                           |
0033   //                           \/
0034   //     time     (t/tp)**3/exp(-3)*exp(-3t/tp)
0035 
0036   //     this time distribution was convoluted with positive ion
0037   //     drift formula
0038 
0039   //                1/(t0+t)*.05650     note:normalization estimated from K1
0040   //                                         Gatti N.I.M. 163,82(1979)
0041   //                where t0=2.1 nsec (GEM gas)
0042 
0043   //            standard tail cancellation has lowest pole removed (exp approx)
0044   //            using 1 zero and 1 pole
0045   //            radical tail cancellation has lowest two poles removed (exp
0046   //            approx) using 2 zeros and 2 poles
0047 
0048   if (theTailShaping != 0 && theTailShaping != 1 && theTailShaping != 2) {
0049     edm::LogError("CSCStripElectronicsSim") << "Bad TailShaping CSCStripElectronicsSim" << theTailShaping;
0050     return 0.;
0051   }
0052 
0053   switch (theShapingTime) {
0054       /*
0055         case 10:
0056     // no tail cancellation, tp= 10,t0=2.1
0057             if (theTailShaping == NONE) {
0058     // Computing 2nd power
0059                 t5 = t * t;
0060                 t7 = exp(t * -.3);
0061                 cat = exp(t * -.06523809524) * .2100138871 + exp(t *
0062                         -.400952381) * 23.38590029 + exp(t * -.01333333333) *
0063                         .02085199407 + exp(t * -.002285714286) * .004416201989 +
0064                         t5 * .00345590637 * t * t7 - t5 * .1260070972 * t7 + t *
0065                          2.304266717 * t7 - t7 * 23.62118237;
0066             }
0067     //  tail cancellation, tp= 10,t0=2.1
0068             if (theTailShaping == CONSERVATIVE) {
0069     // Computing 2nd power
0070                 t1 = t * t;
0071                 t3 = exp(t * -.3);
0072                 cat = t1 * .003469104089 * t * t3 - t1 * .1263548058 * t3 + t *
0073                         2.310721678 * t3 - t3 * 23.68962448 + exp(t *
0074                         -.01333333333) * .02323396152 + exp(t * -.400952381) *
0075                         23.45252892 + exp(t * -.06523809524) * .2138615931 +
0076     exp( t * -.003418326524) * 1.274497241e-11;
0077             }
0078     //  radical tail cancellation, tp= 10,t0=2.1
0079             if (theTailShaping == RADICAL) {
0080     // Computing 2nd power
0081                 t1 = t * t;
0082                 t3 = exp(t * -.3);
0083                 cat = t1 * .003561830965 * t * t3 - t1 * .1287358512 * t3 + t *
0084                         2.355429782 * t3 - t3 * 24.16270544 - exp(t *
0085                         -.0207962661) * 1.717680715e-10 + exp(t *
0086     -.003418326524)
0087                          * 7.271661158e-12 + exp(t * -.400952381) * 23.91293094
0088                         + exp(t * -.06523809524) * .2497744869;
0089             }
0090             break;
0091         case 20:
0092     // no tail cancellation, tp= 20,t0=2.1
0093             if (theTailShaping == NONE) {
0094     // Computing 2nd power
0095                 t5 = t * t;
0096                 t7 = exp(t * -.15);
0097                 cat = exp(t * -.06523809524) * 1.544776642 + exp(t *
0098                         -.400952381) * .07655350666 + exp(t * -.01333333333) *
0099                         .0504563677 + exp(t * -.002285714286) * .009108935882 +
0100                         t5 * 1.849663895e-5 * t * t7 - t5 * .008530427568 * t7 -
0101                         t * .1199681494 * t7 - t7 * 1.680895453;
0102             }
0103     //  tail cancellation, tp= 20,t0=2.1
0104             if (theTailShaping == CONSERVATIVE) {
0105     // Computing 2nd power
0106                 t1 = t * t;
0107                 t3 = exp(t * -.15);
0108                 cat = t1 * 1.863955948e-5 * t * t3 - t1 * .008593415697 * t3 -
0109                         t * .1217545504 * t3 - t3 * 1.706070522 + exp(t *
0110                         -.01333333333) * .05622010555 + exp(t * -.400952381) *
0111                         .07677161489 + exp(t * -.06523809524) * 1.573078801 +
0112                         exp(t * -.003418326524) * 2.669976603e-11;
0113             }
0114     //  radical tail cancellation, tp= 20,t0=2.1
0115             if (theTailShaping == RADICAL) {
0116     // Computing 2nd power
0117                 t1 = t * t;
0118                 t3 = exp(t * -.15);
0119                 cat = t1 * 1.971619848e-5 * t * t3 - t1 * .009064781071 * t3 -
0120                         t * .1360836779 * t3 - t3 * 1.915518161 - exp(t *
0121                         -.0207962661) * 4.682061154e-10 + exp(t *
0122     -.003418326524)
0123                          * 1.523358744e-11 + exp(t * -.400952381) * .07827873625
0124                         + exp(t * -.06523809524) * 1.837239425;
0125             }
0126             break;
0127     */
0128     case 30:
0129       // no tail cancellation, tp= 30,t0=2.1
0130       if (theTailShaping == NONE) {
0131         // Computing 2nd power
0132         t5 = t * t;
0133         t7 = exp(t * -.1);
0134         cat = exp(t * -.06523809524) * 16.18007335 + exp(t * -.400952381) * .01096643477 +
0135               exp(t * -.01333333333) * .0924451733 + exp(t * -.002285714286) * .01409456303 -
0136               t5 * 7.567748611e-5 * t * t7 - t5 * .01068701841 * t7 - t * .5685389492 * t7 - t7 * 16.29757952;
0137       }
0138       //  tail cancellation, tp= 30,t0=2.1
0139       if (theTailShaping == CONSERVATIVE) {
0140         // Computing 2nd power
0141         t1 = t * t;
0142         t3 = exp(t * -.1);
0143         cat = t1 * -7.656495508e-5 * t * t3 - t1 * .01083991133 * t3 - t * .5783722846 * t3 - t3 * 16.59051472 +
0144               exp(t * -.01333333333) * .1030053814 + exp(t * -.400952381) * .01099767919 +
0145               exp(t * -.06523809524) * 16.47651166 + exp(t * -.003418326524) * 4.197333487e-11;
0146       }
0147       //  radical tail cancellation, tp= 30,t0=2.1
0148       if (theTailShaping == RADICAL) {
0149         // Computing 2nd power
0150         t1 = t * t;
0151         t3 = exp(t * -.1);
0152         cat = t1 * -8.37792502e-5 * t * t3 - t1 * .0121345525 * t3 - t * .6655605456 * t3 - t3 * 19.25455777 -
0153               exp(t * -.0207962661) * 9.823832281e-10 + exp(t * -.003418326524) * 2.394794269e-11 +
0154               exp(t * -.400952381) * .01121357717 + exp(t * -.06523809524) * 19.2433442;
0155       }
0156       break;
0157       /*
0158         case 40:
0159     // no tail cancellation, tp= 40,t0=2.1
0160             if (theTailShaping == NONE) {
0161     // Computing 2nd power
0162                 t5 = t * t;
0163                 t7 = exp(t * -.075);
0164                 cat = exp(t * -.06523809524) * 1097.590331 + exp(t *
0165                         -.400952381) * .003362201622 + exp(t * -.01333333333) *
0166                         .1521508944 + exp(t * -.002285714286) * .01939048554 -
0167                         t5 * 1.579570388e-4 * t * t7 - t5 * .05281648589 * t7 -
0168                         t * 10.72426897 * t7 - t7 * 1097.765235;
0169             }
0170     //  tail cancellation, tp= 40,t0=2.1
0171             if (theTailShaping == CONSERVATIVE) {
0172     // Computing 2nd power
0173                 t1 = t * t;
0174                 t3 = exp(t * -.075);
0175                 cat = t1 * -1.604563386e-4 * t * t3 - t1 * .05375692904 * t3 -
0176                         t * 10.92023147 * t3 - t3 * 1117.872403 + exp(t *
0177                         -.01333333333) * .1695314135 + exp(t * -.400952381) *
0178                         .003371780853 + exp(t * -.06523809524) * 1117.6995 +
0179     exp( t * -.003418326524) * 5.868522605e-11;
0180             }
0181     //  radical tail cancellation, tp= 40,t0=2.1
0182             if (theTailShaping == RADICAL) {
0183     // Computing 2nd power
0184                 t1 = t * t;
0185                 t3 = exp(t * -.075);
0186                 cat = t1 * -1.825484488e-4 * t * t3 - t1 * .06238107065 * t3 -
0187                         t * 12.7419738 * t3 - t3 * 1305.393597 - exp(t *
0188                         -.0207962661) * 1.889428819e-9 + exp(t * -.003418326524)
0189                         * 3.348293469e-11 + exp(t * -.400952381) * .003437973064
0190                         + exp(t * -.06523809524) * 1305.390159;
0191             }
0192             break;
0193         case 50:
0194     // no tail cancellation, tp= 50,t0=2.1
0195             if (theTailShaping == NONE) {
0196     // Computing 2nd power
0197                 t5 = t * t;
0198                 t7 = exp(t * -.06);
0199                 cat = exp(t * -.06523809524) * 6778.833027 + exp(t *
0200                         -.400952381) * .001437922352 + exp(t * -.01333333333) *
0201                         .237530423 + exp(t * -.002285714286) * .02501521924 + t5
0202                         * 1.670506271e-4 * t * t7 - t5 * .09338148045 * t7 + t *
0203                          35.49613478 * t7 - t7 * 6779.097011;
0204             }
0205     //  tail cancellation, tp= 50,t0=2.1
0206             if (theTailShaping == CONSERVATIVE) {
0207     // Computing 2nd power
0208                 t1 = t * t;
0209                 t3 = exp(t * -.06);
0210                 cat = t1 * 1.703945294e-4 * t * t3 - t1 * .09507342939 * t3 + t
0211                         * 36.14686596 * t3 - t3 * 6903.29548 + exp(t *
0212                         -.01333333333) * .2646640264 + exp(t * -.400952381) *
0213                         .001442019131 + exp(t * -.06523809524) * 6903.029373 +
0214                         exp(t * -.003418326524) * 7.696672009e-11;
0215             }
0216     //  radical tail cancellation, tp= 50,t0=2.1
0217             if (theTailShaping == RADICAL) {
0218     // Computing 2nd power
0219                 t1 = t * t;
0220                 t3 = exp(t * -.06);
0221                 cat = t1 * 2.028313098e-4 * t * t3 - t1 * .1106897038 * t3 + t *
0222                          42.23121193 * t3 - t3 * 8062.228042 - exp(t *
0223                         -.0207962661) * 3.535147864e-9 + exp(t * -.003418326524)
0224                         * 4.391346571e-11 + exp(t * -.400952381) * .001470327741
0225                         + exp(t * -.06523809524) * 8062.226572;
0226             }
0227             break;
0228         case 60:
0229     // no tail cancellation, tp= 60,t0=2.1
0230             if (theTailShaping == NONE) {
0231     // Computing 2nd power
0232                 t5 = t * t;
0233                 t7 = exp(t * -.05);
0234                 cat = exp(t * -.06523809524) * 54.77495457 + exp(t *
0235                         -.400952381) * 7.412655802e-4 + exp(t * -.01333333333) *
0236                         .3606757184 + exp(t * -.002285714286) * .03098847247 +
0237                         t5 * 3.411745868e-5 * t * t7 - t5 * .006682738979 * t7 +
0238                         t * .8202227541 * t7 - t7 * 55.16736002;
0239             }
0240     //  tail cancellation, tp= 60,t0=2.1
0241             if (theTailShaping == CONSERVATIVE) {
0242     // Computing 2nd power
0243                 t1 = t * t;
0244                 t3 = exp(t * -.05);
0245                 cat = t1 * 3.494700919e-5 * t * t3 - t1 * .006791801191 * t3 +
0246                         t * .8354834745 * t3 - t3 * 56.18111721 + exp(t *
0247                         -.01333333333) * .40187647 + exp(t * -.400952381) *
0248                         7.433775162e-4 + exp(t * -.06523809524) * 55.77849736 +
0249                         exp(t * -.003418326524) * 9.696210758e-11;
0250             }
0251     //  radical tail cancellation, tp= 60,t0=2.1
0252             if (theTailShaping == RADICAL) {
0253     // Computing 2nd power
0254                 t1 = t * t;
0255                 t3 = exp(t * -.05);
0256                 cat = t1 * 4.387761992e-5 * t * t3 - t1 * .007610015855 * t3 +
0257                         t * .9929540112 * t3 - t3 * 65.14590792 - exp(t *
0258                         -.0207962661) * 6.643853476e-9 + exp(t * -.003418326524)
0259                         * 5.532186095e-11 + exp(t * -.400952381) * 7.57970932e-4
0260                         + exp(t * -.06523809524) * 65.14514995;
0261             }
0262             break;
0263         case 70:
0264     // no tail cancellation, tp= 70,t0=2.1
0265             if (theTailShaping == NONE) {
0266     // Computing 2nd power
0267                 t5 = t * t;
0268                 t7 = exp(t * -.04285714286);
0269                 cat = exp(t * -.06523809524) * 7.412251365 + exp(t *
0270                         -.400952381) * 4.306575393e-4 + exp(t * -.01333333333) *
0271                         .5403469187 + exp(t * -.002285714286) * .03733123063 +
0272                         t5 * 1.441232259e-5 * t * t7 - t5 * .002150258989 * t7 +
0273                         t * .1485797804 * t7 - t7 * 7.990360172;
0274             }
0275     //  tail cancellation, tp= 70,t0=2.1
0276             if (theTailShaping == CONSERVATIVE) {
0277     // Computing 2nd power
0278                 t1 = t * t;
0279                 t3 = exp(t * -.04285714286);
0280                 cat = t1 * 1.48262187e-5 * t * t3 - t1 * .002180526664 * t3 + t
0281                         * .1513118077 * t3 - t3 * 8.150556465 + exp(t *
0282                         -.01333333333) * .6020718923 + exp(t * -.400952381) *
0283                         4.318845237e-4 + exp(t * -.06523809524) * 7.548052688 +
0284                         exp(t * -.003418326524) * 1.188301202e-10;
0285             }
0286     //  radical tail cancellation, tp= 70,t0=2.1
0287             if (theTailShaping == RADICAL) {
0288     // Computing 2nd power
0289                 t1 = t * t;
0290                 t3 = exp(t * -.04285714286);
0291                 cat = t1 * 1.984175252e-5 * t * t3 - t1 * .00223612384 * t3 + t
0292                         * .1974584549 * t3 - t3 * 8.816006345 - exp(t *
0293                         -.0207962661) * 1.284819542e-8 + exp(t * -.003418326524)
0294                         * 6.779868504e-11 + exp(t * -.400952381) * 4.40362949e-4
0295                         + exp(t * -.06523809524) * 8.815565996;
0296             }
0297             break;
0298         case 80:
0299     // no tail cancellation, tp= 80,t0=2.1
0300             if (theTailShaping == NONE) {
0301     // Computing 2nd power
0302                 t5 = t * t;
0303                 t7 = exp(t * -.0375);
0304                 cat = exp(t * -.06523809524) * 2.104660307 + exp(t *
0305                         -.400952381) * 2.718693973e-4 + exp(t * -.01333333333) *
0306                         .806342238 + exp(t * -.002285714286) * .04406584799 + t5
0307                         * 7.444156851e-6 * t * t7 - t5 * .00109040647 * t7 + t *
0308                          .03743972817 * t7 - t7 * 2.955340262;
0309             }
0310     //  tail cancellation, tp= 80,t0=2.1
0311             if (theTailShaping == CONSERVATIVE) {
0312     // Computing 2nd power
0313                 t1 = t * t;
0314                 t3 = exp(t * -.0375);
0315                 cat = t1 * 7.69154327e-6 * t * t3 - t1 * .001104867276 * t3 + t
0316                         * .0378353391 * t3 - t3 * 3.041945271 + exp(t *
0317                         -.01333333333) * .8984524213 + exp(t * -.400952381) *
0318                         2.726439789e-4 + exp(t * -.06523809524) * 2.143220205 +
0319                         exp(t * -.003418326524) * 1.42745537e-10;
0320             }
0321     //  radical tail cancellation, tp= 80,t0=2.1
0322             if (theTailShaping == RADICAL) {
0323     // Computing 2nd power
0324                 t1 = t * t;
0325                 t3 = exp(t * -.0375);
0326                 cat = t1 * 1.112798871e-5 * t * t3 - t1 * 9.813148933e-4 * t3 +
0327                         t * .06953288418 * t3 - t3 * 2.503400292 - exp(t *
0328                         -.0207962661) * 2.618804719e-8 + exp(t * -.003418326524)
0329                         * 8.144365827e-11 + exp(t * -.400952381) *
0330                         2.779963161e-4 + exp(t * -.06523809524) * 2.50312232;
0331             }
0332             break;
0333         case 90:
0334     // no tail cancellation, tp= 90,t0=2.1
0335             if (theTailShaping == NONE) {
0336     // Computing 2nd power
0337                 t5 = t * t;
0338                 t7 = exp(t * -.03333333333);
0339                 cat = exp(t * -.06523809524) * .8445180788 + exp(t *
0340                         -.400952381) * 1.824319111e-4 + exp(t * -.01333333333) *
0341                         1.207282396 + exp(t * -.002285714286) * .051216146 + t5
0342     * 4.216536082e-6 * t * t7 - t5 * 7.082920848e-4 * t7 + t
0343                         * .001275426356 * t7 - t7 * 2.103199053;
0344             }
0345     //  tail cancellation, tp= 90,t0=2.1
0346             if (theTailShaping == CONSERVATIVE) {
0347     // Computing 2nd power
0348                 t1 = t * t;
0349                 t3 = exp(t * -.03333333333);
0350                 cat = t1 * 4.376178381e-6 * t * t3 - t1 * 7.190991486e-4 * t3 +
0351                         t * 6.011974229e-4 * t3 - t3 * 2.205366435 + exp(t *
0352                         -.01333333333) * 1.345192821 + exp(t * -.400952381) *
0353                         1.829516768e-4 + exp(t * -.06523809524) * .8599906622 +
0354                         exp(t * -.003418326524) * 1.68900989e-10;
0355             }
0356     //  radical tail cancellation, tp= 90,t0=2.1
0357             if (theTailShaping == RADICAL) {
0358     // Computing 2nd power
0359                 t1 = t * t;
0360                 t3 = exp(t * -.03333333333);
0361                 cat = t1 * 6.981183555e-6 * t * t3 - t1 * 5.238041184e-4 * t3 +
0362                         t * .03211389084 * t3 - t3 * 1.004591827 - exp(t *
0363                         -.0207962661) * 5.795834545e-8 + exp(t * -.003418326524)
0364                         * 9.636668658e-11 + exp(t * -.400952381) *
0365                         1.865432436e-4 + exp(t * -.06523809524) * 1.004405341;
0366             }
0367             break;
0368     */
0369     case 100:
0370       // no tail cancellation, tp=100,t0=2.1
0371       if (theTailShaping == NONE) {
0372         // Computing 2nd power
0373         t5 = t * t;
0374         t7 = exp(t * -.03);
0375         cat = exp(t * -.06523809524) * .4137221868 + exp(t * -.400952381) * 1.282766787e-4 +
0376               exp(t * -.01333333333) * 1.824993745 + exp(t * -.002285714286) * .05880752038 +
0377               t5 * 2.491640871e-6 * t * t7 - t5 * 5.417458918e-4 * t7 - t * .01742000448 * t7 - t7 * 2.297651729;
0378       }
0379       //  tail cancellation, tp=100,t0=2.1
0380       if (theTailShaping == CONSERVATIVE) {
0381         // Computing 2nd power
0382         t1 = t * t;
0383         t3 = exp(t * -.03);
0384         cat = t1 * 2.597806608e-6 * t * t3 - t1 * 5.528471798e-4 * t3 - t * .0189975081 * t3 - t3 * 2.454897362 +
0385               exp(t * -.01333333333) * 2.033466647 + exp(t * -.400952381) * 1.28642151e-4 +
0386               exp(t * -.06523809524) * .4213020729 + exp(t * -.003418326524) * 1.975089906e-10;
0387       }
0388       //  radical tail cancellation, tp=100,t0=2.1
0389       if (theTailShaping == RADICAL) {
0390         // Computing 2nd power
0391         t1 = t * t;
0392         t3 = exp(t * -.03);
0393         cat = t1 * 4.704262123e-6 * t * t3 - t1 * 3.14519427e-4 * t3 + t * .01738754854 * t3 - t3 * .4921806115 -
0394               exp(t * -.0207962661) * 1.454692205e-7 + exp(t * -.003418326524) * 1.126890204e-10 +
0395               exp(t * -.400952381) * 1.311675549e-4 + exp(t * -.06523809524) * .4920495894;
0396       }
0397       break;
0398       /*
0399         case 150:
0400     // no tail cancellation, tp=150,t0=2.1
0401             if (theTailShaping == NONE) {
0402     // Computing 2nd power
0403                 t5 = t * t;
0404                 t7 = exp(t * -.02);
0405                 cat = exp(t * -.06523809524) * .0451302243 + exp(t *
0406                         -.400952381) * 3.417148182e-5 + exp(t * -.01333333333) *
0407                         21.12261275 + exp(t * -.002285714286) * .1043948969 - t5
0408                         * 1.285903907e-7 * t * t7 - t5 * 5.344294733e-4 * t7 -
0409                         t * .1406120762 * t7 - t7 * 21.27217204;
0410             }
0411     //  tail cancellation, tp=150,t0=2.1
0412             if (theTailShaping == CONSERVATIVE) {
0413     // Computing 2nd power
0414                 t1 = t * t;
0415                 t3 = exp(t * -.02);
0416                 cat = t1 * -1.373737668e-7 * t * t3 - t1 * 5.725228237e-4 * t3 -
0417                         t * .1548112258 * t3 - t3 * 23.58148492 + exp(t *
0418                         -.01333333333) * 23.5354936 + exp(t * -.400952381) *
0419                         3.426883961e-5 + exp(t * -.06523809524) * .04595706409 +
0420                         exp(t * -.003418326524) * 3.864816979e-10;
0421             }
0422     //  radical tail cancellation, tp=150,t0=2.1
0423             if (theTailShaping == RADICAL) {
0424     // Computing 2nd power
0425                 t1 = t * t;
0426                 t3 = exp(t * -.02);
0427                 cat = t1 * 1.150149576e-6 * t * t3 - t1 * 5.745717877e-5 * t3 +
0428                         t * .00244082808 * t3 - t3 * .05294004164 - exp(t *
0429                         -.0207962661) * 7.693441476e-4 + exp(t * -.003418326524)
0430                         * 2.205076529e-10 + exp(t * -.400952381) *
0431                         3.494157914e-5 + exp(t * -.06523809524) * .05367444399;
0432             }
0433             break;
0434         case 200:
0435     // no tail cancellation, tp=200,t0=2.1
0436             if (theTailShaping == NONE) {
0437     // Computing 2nd power
0438                 t5 = t * t;
0439                 t7 = exp(t * -.015);
0440                 cat = exp(t * -.06523809524) * .01251802645 + exp(t *
0441                         -.400952381) * 1.36834457e-5 + exp(t * -.01333333333) *
0442                         2281.242177 + exp(t * -.002285714286) * .1659547829 - t5
0443                         * 1.421417147e-6 * t * t7 - t5 * .003198621512 * t7 - t
0444                         * 3.803546128 * t7 - t7 * 2281.420663;
0445             }
0446     //  tail cancellation, tp=200,t0=2.1
0447             if (theTailShaping == CONSERVATIVE) {
0448     // Computing 2nd power
0449                 t1 = t * t;
0450                 t3 = exp(t * -.015);
0451                 cat = t1 * -1.560422488e-6 * t * t3 - t1 * .003547432409 * t3 -
0452                         t * 4.235743145 * t3 - t3 * 2541.846068 + exp(t *
0453                         -.01333333333) * 2541.833308 + exp(t * -.400952381) *
0454                         1.372243114e-5 + exp(t * -.06523809524) * .01274737169 +
0455                         exp(t * -.003418326524) * 6.850793727e-10;
0456             }
0457     //  radical tail cancellation, tp=200,t0=2.1
0458             if (theTailShaping == RADICAL) {
0459     // Computing 2nd power
0460                 t1 = t * t;
0461                 t3 = exp(t * -.015);
0462                 cat = t1 * 4.486861205e-7 * t * t3 - t1 * 1.982974483e-5 * t3 +
0463                         t * 7.533435174e-4 * t3 - t3 * .01490186176 - exp(t *
0464                         -.0207962661) * 1.155963393e-7 + exp(t * -.003418326524)
0465                         * 3.908729581e-10 + exp(t * -.400952381) *
0466                         1.399181936e-5 + exp(t * -.06523809524) * .01488798515;
0467             }
0468             break;
0469         case 250:
0470     // no tail cancellation, tp=250,t0=2.1
0471             if (theTailShaping == NONE) {
0472     // Computing 2nd power
0473                 t5 = t * t;
0474                 t7 = exp(t * -.012);
0475                 cat = exp(t * -.06523809524) * .005082161364 + exp(t *
0476                         -.400952381) * 6.792264583e-6 + exp(t * -.01333333333) *
0477                         2851.552722 + exp(t * -.002285714286) * .2493354963 + t5
0478                         * 1.282866561e-6 * t * t7 - t5 * .002554194047 * t7 + t
0479                         * 3.799921386 * t7 - t7 * 2851.807146;
0480             }
0481     //  tail cancellation, tp=250,t0=2.1
0482             if (theTailShaping == CONSERVATIVE) {
0483     // Computing 2nd power
0484                 t1 = t * t;
0485                 t3 = exp(t * -.012);
0486                 cat = t1 * 1.452179735e-6 * t * t3 - t1 * .0028321086 * t3 + t *
0487                          4.236667018 * t3 - t3 * 3177.296817 + exp(t *
0488                         -.01333333333) * 3177.291635 + exp(t * -.400952381) *
0489                         6.811616389e-6 + exp(t * -.06523809524) * .005175272648
0490                         + exp(t * -.003418326524) * 1.163611956e-9;
0491             }
0492     //  radical tail cancellation, tp=250,t0=2.1
0493             if (theTailShaping == RADICAL) {
0494     // Computing 2nd power
0495                 t1 = t * t;
0496                 t3 = exp(t * -.012);
0497                 cat = t1 * 2.201206315e-7 * t * t3 - t1 * 9.091071906e-6 * t3 +
0498                         t * 3.244901734e-4 * t3 - t3 * .006051269645 - exp(t *
0499                         -.0207962661) * 1.115870681e-8 + exp(t * -.003418326524)
0500                         * 6.639003673e-10 + exp(t * -.400952381) *
0501                         6.945336809e-6 + exp(t * -.06523809524) * .006044334803;
0502             }
0503             break;
0504         case 300:
0505     // no tail cancellation, tp=300,t0=2.1
0506             if (theTailShaping == NONE) {
0507     // Computing 2nd power
0508                 t5 = t * t ;
0509                 t7 = exp(t * -.01);
0510                 cat = exp(t * -.06523809524) * .002537698188 + exp(t *
0511                         -.400952381) * 3.850890276e-6 + exp(t * -.01333333333) *
0512                         42.24522552 + exp(t * -.002285714286) * .3628281578 + t5
0513                         * 3.42649397e-7 * t * t7 - t5 * 2.496575507e-4 * t7 + t
0514                         * .1381601414 * t7 - t7 * 42.61059522;
0515             }
0516     //  tail cancellation, tp=300,t0=2.1
0517             if (theTailShaping == CONSERVATIVE) {
0518     // Computing 2nd power
0519                 t1 = t * t;
0520                 t3 = exp(t * -.01);
0521                 cat = t1 * 4.016144767e-7 * t * t3 - t1 * 2.657431191e-4 * t3 +
0522                         t * .1570475462 * t3 - t3 * 47.07357524 + exp(t *
0523                         -.01333333333) * 47.07098718 + exp(t * -.400952381) *
0524                         3.861861828e-6 + exp(t * -.06523809524) * .002584191857
0525                         + exp(t * -.003418326524) * 1.946287754e-9;
0526             }
0527     //  radical tail cancellation, tp=300,t0=2.1
0528             if (theTailShaping == RADICAL) {
0529     // Computing 2nd power
0530                 t1 = t * t;
0531                 t3 = exp(t * -.01);
0532                 cat = t1 * 1.239979555e-7 * t * t3 - t1 * 4.905476843e-6 * t3 +
0533                         t * 1.682559598e-4 * t3 - t3 * .00302208046 - exp(t *
0534                         -.0207962661) * 2.845569802e-9 + exp(t * -.003418326524)
0535                         * 1.110457097e-9 + exp(t * -.400952381) * 3.937674932e-6
0536                         + exp(t * -.06523809524) * .00301814452;
0537             }
0538             break;
0539     */
0540     default:
0541       edm::LogError("CSCStripElectronicsSim") << "Bad shaping time CSCStripElectronicsSim " << theShapingTime;
0542       break;
0543   }
0544   return cat;
0545 }