CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/SimMuon/CSCDigitizer/src/CSCDriftParamLowB.cc

Go to the documentation of this file.
00001 #include "SimMuon/CSCDigitizer/src/CSCDriftSim.h"
00002 #include <cmath>
00003 #include <iostream>
00004 
00005 // the following functions were all generated by f2c.
00006 
00007 double CSCDriftSim::avgPathLengthLowB() {
00008 
00009     static  const double coeff[7] = { .28872209,.21705601,.063908389,-.012224924,
00010             .012901814,-.0089355058,-.015769145 };
00011 
00012     // System generated locals
00013     float ret_val;
00014 
00015     // Local variables
00016     double x10, x11, x12, x13, x20, x21, x22;
00017 
00018 /* ! Parameterization of drift path length - low field chambers */
00019 /* ***********************************************************************
00020  */
00021 /* DOC MC_BHGH_SLEN                                                      *
00022  */
00023 /*                                                                      *
00024 */
00025 /* DOC  Function    : Parameterization of the drift path length          *
00026  */
00027 /* DOC                in the muon endcap CSCs.                           *
00028  */
00029 /*                                                                      *
00030 */
00031 /* DOC  References  : None                                               *
00032  */
00033 /*                                                                      *
00034 */
00035 /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
00036  */
00037 /*                           anode-cathode coordinate plane             *
00038 */
00039 /* DOC                ZCELL - distance from the anode wire in the wire   *
00040  */
00041 /*                           plane coordinate                           *
00042 */
00043 /* DOC  Errors      : None                                               *
00044  */
00045 /*                                                                      *
00046 */
00047 /* DOC  Returns     : Drift path length for low field CSC chambers      *
00048 */
00049 /*                                                                      *
00050 */
00051 /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00052  */
00053 /* ***********************************************************************
00054  */
00055 
00056 
00057     x10 = 1.;
00058     x11 = fabs(ycell) * 2. - 1.;
00059     x12 = x11 * 2. * x11 - x10;
00060     x13 = x11 * 2. * x12 - x11;
00061     x20 = 1.;
00062     x21 = fabs(zcell) * 2. - 1.;
00063     x22 = x21 * 2. * x21 - x20;
00064     ret_val = coeff[0] + coeff[1] * x11 + coeff[2] * x21 + coeff[3] * x12 *
00065             x22 + coeff[4] * x22 + coeff[5] * x13 + coeff[6] * x11 * x21;
00066     return ret_val;
00067 }
00068 
00069 
00070 double CSCDriftSim::pathSigmaLowB() {
00071     /* Initialized data */
00072 
00073     static  const double coeff[12] = { .002854441,8.701339e-4,.0053064193,
00074             .0012356508,9.8627318e-4,.0013802449,-5.4633755e-4,.0026078648,
00075             .0044171026,6.2029063e-4,.0011392474,-.0056275595 };
00076 
00077     /* System generated locals */
00078     float ret_val;
00079 
00080     /* Local variables */
00081     double /*x10,*/ x11, x12, x13, x14, x15, x16, /*x20,*/ x21, x22, x23,
00082             x24, x25, x26, x27, x28, x29, x210, x211, x212, x213;
00083 
00084 /* ! Parameterization of path length dispersion- low field chambers */
00085 /* ***********************************************************************
00086  */
00087 /* DOC MC_BHGH_SSIG                                                      *
00088  */
00089 /*                                                                      *
00090 */
00091 /* DOC  Function    : Parameterization of the drift path length          *
00092  */
00093 /* DOC                dispersion in the muon endcap CSCs.                *
00094  */
00095 /*                                                                      *
00096 */
00097 /* DOC  References  : None                                               *
00098  */
00099 /*                                                                      *
00100 */
00101 /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
00102  */
00103 /*                           anode-cathode coordinate plane             *
00104 */
00105 /* DOC                ZCELL - distance from the anode wire in the wire   *
00106  */
00107 /*                           plane coordinate                           *
00108 */
00109 /*           **NOTE** Both distances normalize to cell dim=1x1          *
00110 */
00111 /* DOC  Errors      : None                                               *
00112  */
00113 /*                                                                      *
00114 */
00115 /* DOC  Returns     : Path length dispersion for low field CSC chambers *
00116 */
00117 /*                                                                      *
00118 */
00119 /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00120  */
00121 /* ***********************************************************************
00122  */
00123 
00124 
00125     //x10 = 1.; //not used later
00126     x11 = fabs(ycell) * 2. - 1.;
00127     x12 = x11 * x11;
00128     x13 = x11 * x12;
00129     x14 = x11 * x13;
00130     x15 = x11 * x14;
00131     x16 = x11 * x15;
00132     //x20 = 1.; //not used later
00133     x21 = fabs(zcell) * 2. - 1.;
00134     x22 = x21 * x21;
00135     x23 = x21 * x22;
00136     x24 = x21 * x23;
00137     x25 = x21 * x24;
00138     x26 = x21 * x25;
00139     x27 = x21 * x26;
00140     x28 = x21 * x27;
00141     x29 = x21 * x28;
00142     x210 = x21 * x29;
00143     x211 = x21 * x210;
00144     x212 = x21 * x211;
00145     x213 = x21 * x212;
00146     ret_val = coeff[0] + coeff[1] * x23 + coeff[2] * x24 + coeff[3] * x13 +
00147             coeff[4] * x11 * x21 + coeff[5] * x11 * x22 + coeff[6] * x16 +
00148             coeff[7] * x213 + coeff[8] * x212 + coeff[9] * x21 + coeff[10] *
00149             x11 * x23 + coeff[11] * x26;
00150 
00151     return ret_val;
00152 }
00153 
00154 
00155 double CSCDriftSim::avgDriftTimeLowB() {
00156     /* Initialized data */
00157 
00158     static const double coeff[20] = { 42.981588,25.732805,26.539129,16.719016,
00159             10.862044,7.4859085,5.0353142,3.3620548,1.9057762,2.2207695,
00160             -2.6787582,1.2977292,-.8358091,1.2452612,.74813469,-.57581194,
00161             .32705275,-.85426489,-.55688158,-.38384903 };
00162 
00163     /* System generated locals */
00164     float ret_val;
00165 
00166     /* Local variables */
00167     double x10, x11, x12, x13, x14, x20, x21, x22, x23, x24, x25,
00168             x26, x27, x28, x29;
00169 
00170 /* ! Parameterization of drift time - low field chambers */
00171 /* ***********************************************************************
00172  */
00173 /* DOC MC_BLOW_TIME                                                      *
00174  */
00175 /*                                                                      *
00176 */
00177 /* DOC  Function    : Parameterization of the drift time                 *
00178  */
00179 /* DOC                in the muon endcap CSCs.                           *
00180  */
00181 /*                                                                      *
00182 */
00183 /* DOC  References  : None                                               *
00184  */
00185 /*                                                                      *
00186 */
00187 /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
00188  */
00189 /*                           anode-cathode coordinate plane             *
00190 */
00191 /*                           (ycell=1 > d_acat)                         *
00192 */
00193 /* DOC                ZCELL - distance from the anode wire in the wire   *
00194  */
00195 /*                           plane coordinate (zcell=1 > d_anod/2.)     *
00196 */
00197 /* DOC  Errors      : None                                               *
00198  */
00199 /*                                                                      *
00200 */
00201 /* DOC  Returns     : Drift time for low field CSC chambers              *
00202  */
00203 /*                                                                      *
00204 */
00205 /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00206  */
00207 /* ***********************************************************************
00208  */
00209 
00210 
00211 
00212 
00213     x10 = 1.;
00214     x11 = fabs(ycell) * 2. - 1.;
00215     x12 = x11 * 2. * x11 - x10;
00216     x13 = x11 * 2. * x12 - x11;
00217     x14 = x11 * 2. * x13 - x12;
00218     x20 = 1.;
00219     x21 = fabs(zcell) * 2. - 1.;
00220     x22 = x21 * 2. * x21 - x20;
00221     x23 = x21 * 2. * x22 - x21;
00222     x24 = x21 * 2. * x23 - x22;
00223     x25 = x21 * 2. * x24 - x23;
00224     x26 = x21 * 2. * x25 - x24;
00225     x27 = x21 * 2. * x26 - x25;
00226     x28 = x21 * 2. * x27 - x26;
00227     x29 = x21 * 2. * x28 - x27;
00228 
00229     ret_val = coeff[0] + coeff[1] * x11 + coeff[2] * x21 + coeff[3] * x22 +
00230             coeff[4] * x23 + coeff[5] * x24 + coeff[6] * x25 + coeff[7] * x26
00231             + coeff[8] * x12 + coeff[9] * x27 + coeff[10] * x11 * x21 + coeff[
00232             11] * x28 + coeff[12] * x13 + coeff[13] * x12 * x21 + coeff[14] *
00233             x29 + coeff[15] * x13 * x21 + coeff[16] * x14 + coeff[17] * x11 *
00234             x22 + coeff[18] * x11 * x23 + coeff[19] * x11 * x24;
00235     return ret_val;
00236 }
00237 
00238 
00239 double CSCDriftSim::driftTimeSigmaLowB() {
00240     /* Initialized data */
00241 
00242     static  const double coeff[19] = { 6.2681223,3.5916437,5.5425809,4.6974052,
00243             3.8472392,3.1019155,2.4323913,1.8695623,1.3909068,.99056625,
00244             .52066638,.64671229,.68023389,.40512251,.40202738,.23908531,
00245             -.41245784,-.32196924,-.29890696 };
00246 
00247     /* Local variables */
00248     double /*x10,*/ x11, x20, x21, x22, x23, x24, x25, x26, x27, x28,
00249       x29, x210, x211, x212;
00250 
00251 /* ! Parameterization of drift time dispersion- low field chambers */
00252 /* ***********************************************************************
00253  */
00254 /* DOC MC_BHGH_TSIG                                                      *
00255  */
00256 /*                                                                      *
00257 */
00258 /* DOC  Function    : Parameterization of the drift time dispersion      *
00259  */
00260 /* DOC                in the muon endcap CSCs.                           *
00261  */
00262 /*                                                                      *
00263 */
00264 /* DOC  References  : None                                               *
00265  */
00266 /*                                                                      *
00267 */
00268 /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
00269  */
00270 /*                           anode-cathode coordinate plane             *
00271 */
00272 /*                           (ycell=1 > d_acat)                         *
00273 */
00274 /* DOC                ZCELL - distance from the anode wire in the wire   *
00275  */
00276 /*                           plane coordinate (zcell=1 > d_anod/2.)     *
00277 */
00278 /* DOC  Errors      : None                                               *
00279  */
00280 /*                                                                      *
00281 */
00282 /* DOC  Returns     : Drift time dispersion for low field CSC chambers   *
00283  */
00284 /*                                                                      *
00285 */
00286 /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00287  */
00288 /* ***********************************************************************
00289  */
00290 
00291 
00292 
00293     //x10 = 1.; //not used
00294     x11 = fabs(ycell) * 2. - 1.;
00295     x20 = 1.;
00296     x21 = fabs(zcell) * 2. - 1.;
00297     x22 = x21 * 2. * x21 - x20;
00298     x23 = x21 * 2. * x22 - x21;
00299     x24 = x21 * 2. * x23 - x22;
00300     x25 = x21 * 2. * x24 - x23;
00301     x26 = x21 * 2. * x25 - x24;
00302     x27 = x21 * 2. * x26 - x25;
00303     x28 = x21 * 2. * x27 - x26;
00304     x29 = x21 * 2. * x28 - x27;
00305     x210 = x21 * 2. * x29 - x28;
00306     x211 = x21 * 2. * x210 - x29;
00307     x212 = x21 * 2. * x211 - x210;
00308 
00309     return coeff[0] * x21 + coeff[1] + coeff[2] * x22 + coeff[3] * x23 +
00310             coeff[4] * x24 + coeff[5] * x25 + coeff[6] * x26 + coeff[7] * x27
00311             + coeff[8] * x28 + coeff[9] * x29 + coeff[10] * x11 + coeff[11] *
00312             x11 * x21 + coeff[12] * x210 + coeff[13] * x11 * x22 + coeff[14] *
00313              x211 + coeff[15] * x212 + coeff[16] * x11 * x25 + coeff[17] *
00314             x11 * x27 + coeff[18] * x11 * x26;
00315 }
00316