Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "SimMuon/CSCDigitizer/src/CSCDriftSim.h"
0002 #include <cmath>
0003 
0004 double CSCDriftSim::avgPathLengthHighB() {
0005   /* Initialized data */
0006 
0007   static const double coeff[18] = {.16916627,
0008                                    .11057547,
0009                                    .054287448,
0010                                    .01179527,
0011                                    .0062073273,
0012                                    -.013570915,
0013                                    -.0027121772,
0014                                    -.0053792764,
0015                                    -.0027452986,
0016                                    -.0020556715,
0017                                    .0021511659,
0018                                    .0011376412,
0019                                    .0026183373,
0020                                    .0017980602,
0021                                    -.0012975418,
0022                                    -.0010798782,
0023                                    -.0012322628,
0024                                    -8.3635924e-4};
0025 
0026   /* Local variables */
0027   double x10, x11, x12, x13, x14, x20, x21, x22, x23, x24, x25;
0028 
0029   /* ! Parameterization of drift path length - high field chambers */
0030   /* ***********************************************************************
0031    */
0032   /* DOC MC_BHGH_SLEN                                                      *
0033    */
0034   /*                                                                      *
0035    */
0036   /* DOC  Function    : Parameterization of the drift path length          *
0037    */
0038   /* DOC                in the muon endcap CSCs.                           *
0039    */
0040   /*                                                                      *
0041    */
0042   /* DOC  References  : None                                               *
0043    */
0044   /*                                                                      *
0045    */
0046   /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
0047    */
0048   /*                           anode-cathode coordinate plane             *
0049    */
0050   /* DOC                ZCELL - distance from the anode wire in the wire   *
0051    */
0052   /*                           plane coordinate                           *
0053    */
0054   /* DOC  Errors      : None                                               *
0055    */
0056   /*                                                                      *
0057    */
0058   /* DOC  Returns     : Drift path length for high field CSC chambers      *
0059    */
0060   /*                                                                      *
0061    */
0062   /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
0063    */
0064   /* ***********************************************************************
0065    */
0066 
0067   x10 = 1.;
0068   x11 = fabs(ycell) * 2. - 1.;
0069   x12 = x11 * 2. * x11 - x10;
0070   x13 = x11 * 2. * x12 - x11;
0071   x14 = x11 * 2. * x13 - x12;
0072   x20 = 1.;
0073   x21 = fabs(zcell) * 2. - 1.;
0074   x22 = x21 * 2. * x21 - x20;
0075   x23 = x21 * 2. * x22 - x21;
0076   x24 = x21 * 2. * x23 - x22;
0077   x25 = x21 * 2. * x24 - x23;
0078 
0079   return coeff[0] + coeff[1] * x11 + coeff[2] * x21 + coeff[3] * x22 + coeff[4] * x12 + coeff[5] * x11 * x21 +
0080          coeff[6] * x13 + coeff[7] * x12 * x22 + coeff[8] * x12 * x23 + coeff[9] * x11 * x24 + coeff[10] * x12 * x21 +
0081          coeff[11] * x14 + coeff[12] * x11 * x22 + coeff[13] * x13 * x22 + coeff[14] * x13 * x21 +
0082          coeff[15] * x12 * x24 + coeff[16] * x11 * x25 + coeff[17] * x11 * x23;
0083 }
0084 
0085 double CSCDriftSim::pathSigmaHighB() {
0086   /* Initialized data */
0087 
0088   static const double coeff[9] = {.0049089564,
0089                                   .0091482062,
0090                                   .0024036507,
0091                                   .0065285652,
0092                                   .0041487742,
0093                                   -.0038102526,
0094                                   -.0043923587,
0095                                   .0019230151,
0096                                   .0013543258};
0097 
0098   /* System generated locals */
0099   float ret_val;
0100 
0101   /* Local variables */
0102   double /*x10,*/ x11, x12, x13, x14, x15, x16, /*x20,*/ x21, x22, x23, x24, x25, x26, x27, x28, x29;
0103 
0104   /* ! Parameterization of path length dispersion- high field chambers */
0105   /* ***********************************************************************
0106    */
0107   /* DOC MC_BHGH_SSIG                                                      *
0108    */
0109   /*                                                                      *
0110    */
0111   /* DOC  Function    : Parameterization of the drift path length          *
0112    */
0113   /* DOC                dispersion in the muon endcap CSCs.                *
0114    */
0115   /*                                                                      *
0116    */
0117   /* DOC  References  : None                                               *
0118    */
0119   /*                                                                      *
0120    */
0121   /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
0122    */
0123   /*                           anode-cathode coordinate plane             *
0124    */
0125   /* DOC                ZCELL - distance from the anode wire in the wire   *
0126    */
0127   /*                           plane coordinate                           *
0128    */
0129   /*           **NOTE** Both distances normalize to cell dim=1x1          *
0130    */
0131   /* DOC  Errors      : None                                               *
0132    */
0133   /*                                                                      *
0134    */
0135   /* DOC  Returns     : Path length dispersion for high field CSC chambers *
0136    */
0137   /*                                                                      *
0138    */
0139   /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
0140    */
0141   /* ***********************************************************************
0142    */
0143 
0144   // x10 = 1.; //not used later
0145   x11 = fabs(ycell) * 2. - 1.;
0146   x12 = x11 * x11;
0147   x13 = x11 * x12;
0148   x14 = x11 * x13;
0149   x15 = x11 * x14;
0150   x16 = x11 * x15;
0151   // x20 = 1.; //not used later
0152   x21 = fabs(zcell) * 2. - 1.;
0153   x22 = x21 * x21;
0154   x23 = x21 * x22;
0155   x24 = x21 * x23;
0156   x25 = x21 * x24;
0157   x26 = x21 * x25;
0158   x27 = x21 * x26;
0159   x28 = x21 * x27;
0160   x29 = x21 * x28;
0161 
0162   ret_val = coeff[0] + coeff[1] * x21 + coeff[2] * x11 + coeff[3] * x22 + coeff[4] * x11 * x21 + coeff[5] * x16 * x22 +
0163             coeff[6] * x16 * x23 + coeff[7] * x11 * x22 + coeff[8] * x29;
0164 
0165   return ret_val;
0166 }
0167 
0168 double CSCDriftSim::avgDriftTimeHighB() {
0169   /* Initialized data */
0170 
0171   static const double coeff[27] = {22.384492,  10.562894,  14.032961,  7.06233,   3.5523289,  -5.0176704, 1.999075,
0172                                    1.0635552,  -3.2770096, -2.7384958, .98411495, -2.0963696, -1.4006525, -.47542728,
0173                                    .64179451,  -.80308436, .42964647,  -.4153324, .50423068,  .35049792,  -.42595896,
0174                                    -.30947641, .16671267,  -.21336584, .22979164, .23481052,  .32550435};
0175 
0176   /* System generated locals */
0177   float ret_val;
0178 
0179   /* Local variables */
0180   double x10, x11, x12, x13, x14, x15, x16, x17, x20, x21, x22, x23, x24, x25, x26, x27;
0181 
0182   /* ! Parameterization of drift time - high field chambers */
0183   /* ***********************************************************************
0184    */
0185   /* DOC MC_BHGH_TIME                                                      *
0186    */
0187   /*                                                                      *
0188    */
0189   /* DOC  Function    : Parameterization of the drift time                 *
0190    */
0191   /* DOC                in the muon endcap CSCs.                           *
0192    */
0193   /*                                                                      *
0194    */
0195   /* DOC  References  : None                                               *
0196    */
0197   /*                                                                      *
0198    */
0199   /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
0200    */
0201   /*                           anode-cathode coordinate plane             *
0202    */
0203   /*                           (ycell=1 > d_acat)                         *
0204    */
0205   /* DOC                ZCELL - distance from the anode wire in the wire   *
0206    */
0207   /*                           plane coordinate (zcell=1 > d_anod/2.)     *
0208    */
0209   /* DOC  Errors      : None                                               *
0210    */
0211   /*                                                                      *
0212    */
0213   /* DOC  Returns     : Drift time for high field CSC chambers             *
0214    */
0215   /*                                                                      *
0216    */
0217   /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
0218    */
0219   /* ***********************************************************************
0220    */
0221 
0222   x10 = 1.;
0223   x11 = fabs(ycell) * 2. - 1.;
0224   x12 = x11 * 2. * x11 - x10;
0225   x13 = x11 * 2. * x12 - x11;
0226   x14 = x11 * 2. * x13 - x12;
0227   x15 = x11 * 2. * x14 - x13;
0228   x16 = x11 * 2. * x15 - x14;
0229   x17 = x11 * 2. * x16 - x15;
0230   x20 = 1.;
0231   x21 = fabs(zcell) * 2. - 1.;
0232   x22 = x21 * 2. * x21 - x20;
0233   x23 = x21 * 2. * x22 - x21;
0234   x24 = x21 * 2. * x23 - x22;
0235   x25 = x21 * 2. * x24 - x23;
0236   x26 = x21 * 2. * x25 - x24;
0237   x27 = x21 * 2. * x26 - x25;
0238 
0239   ret_val = coeff[0] + coeff[1] * x11 + coeff[2] * x21 + coeff[3] * x22 + coeff[4] * x23 + coeff[5] * x11 * x21 +
0240             coeff[6] * x24 + coeff[7] * x12 + coeff[8] * x11 * x22 + coeff[9] * x11 * x23 + coeff[10] * x25 +
0241             coeff[11] * x11 * x24 + coeff[12] * x11 * x25 + coeff[13] * x13 + coeff[14] * x12 * x21 +
0242             coeff[15] * x11 * x26 + coeff[16] * x26 + coeff[17] * x11 * x27 + coeff[18] * x17 * x21 +
0243             coeff[19] * x15 * x21 + coeff[20] * x12 * x22 + coeff[21] * x12 * x23 + coeff[22] * x27 +
0244             coeff[23] * x14 * x22 + coeff[24] * x16 * x21 + coeff[25] * x17 + coeff[26] * x17 * x22;
0245 
0246   return ret_val;
0247 }
0248 
0249 double CSCDriftSim::driftTimeSigmaHighB() {
0250   /* Initialized data */
0251 
0252   static const double coeff[17] = {5.5533465,
0253                                    3.3733352,
0254                                    3.776603,
0255                                    2.2673355,
0256                                    1.3401485,
0257                                    .84209333,
0258                                    -.71621378,
0259                                    .57572407,
0260                                    -.52313936,
0261                                    -.78790514,
0262                                    -.71786066,
0263                                    .43370011,
0264                                    .29223306,
0265                                    -.37791975,
0266                                    .21121024,
0267                                    .31513644,
0268                                    .25382701};
0269 
0270   /* System generated locals */
0271   float ret_val;
0272 
0273   /* Local variables */
0274   double x10, x11, x12, x13, x14, x15, x16, x17, x18, /*x19,*/ x20, x21, x22, x23, x24, x25, x26, x27, x28, x29;
0275 
0276   /* ! Parameterization of drift time dispersion- high field chambers */
0277   /* ***********************************************************************
0278    */
0279   /* DOC MC_BHGH_TSIG                                                      *
0280    */
0281   /*                                                                      *
0282    */
0283   /* DOC  Function    : Parameterization of the drift time dispersion      *
0284    */
0285   /* DOC                in the muon endcap CSCs.                           *
0286    */
0287   /*                                                                      *
0288    */
0289   /* DOC  References  : None                                               *
0290    */
0291   /*                                                                      *
0292    */
0293   /* DOC  Arguments   : YCELL - distance from the anode wire in the        *
0294    */
0295   /*                           anode-cathode coordinate plane             *
0296    */
0297   /*                           (ycell=1 > d_acat)                         *
0298    */
0299   /* DOC                ZCELL - distance from the anode wire in the wire   *
0300    */
0301   /*                           plane coordinate (zcell=1 > d_anod/2.)     *
0302    */
0303   /* DOC  Errors      : None                                               *
0304    */
0305   /*                                                                      *
0306    */
0307   /* DOC  Returns     : Drift time dispersion for high field CSC chambers  *
0308    */
0309   /*                                                                      *
0310    */
0311   /* DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
0312    */
0313   /* ***********************************************************************
0314    */
0315 
0316   x10 = 1.;
0317   x11 = fabs(ycell) * 2. - 1.;
0318   x12 = x11 * 2. * x11 - x10;
0319   x13 = x11 * 2. * x12 - x11;
0320   x14 = x11 * 2. * x13 - x12;
0321   x15 = x11 * 2. * x14 - x13;
0322   x16 = x11 * 2. * x15 - x14;
0323   x17 = x11 * 2. * x16 - x15;
0324   x18 = x11 * 2. * x17 - x16;
0325   // x19 = x11 * 2. * x18 - x17; //not used later
0326   x20 = 1.;
0327   x21 = fabs(zcell) * 2. - 1.;
0328   x22 = x21 * 2. * x21 - x20;
0329   x23 = x21 * 2. * x22 - x21;
0330   x24 = x21 * 2. * x23 - x22;
0331   x25 = x21 * 2. * x24 - x23;
0332   x26 = x21 * 2. * x25 - x24;
0333   x27 = x21 * 2. * x26 - x25;
0334   x28 = x21 * 2. * x27 - x26;
0335   x29 = x21 * 2. * x28 - x27;
0336 
0337   ret_val = coeff[0] * x21 + coeff[1] + coeff[2] * x22 + coeff[3] * x23 + coeff[4] * x24 + coeff[5] * x25 +
0338             coeff[6] * x11 * x23 + coeff[7] * x26 + coeff[8] * x11 * x25 + coeff[9] * x11 * x24 +
0339             coeff[10] * x11 * x22 + coeff[11] * x27 + coeff[12] * x28 + coeff[13] * x11 * x26 + coeff[14] * x29 +
0340             coeff[15] * x16 * x21 + coeff[16] * x18 * x21;
0341 
0342   return ret_val;
0343 }