CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimMuon/CSCDigitizer/src/CSCDriftParam.cc

Go to the documentation of this file.
00001 #include "SimMuon/CSCDigitizer/src/CSCDriftSim.h"
00002 #include <cmath>
00003 
00004 // the following functions were all generated by f2c.
00005 // vin tried to optimize them...
00006 //     with no sizeble effect....
00007 
00008 double CSCDriftSim::avgDrift() const{
00009     /* Initialized data */
00010 
00011     static const double coeff[6] = { -.08618265,-.0020471805,-7.7771331e-4,
00012             -.0058433565,-5.0241491e-4,.0010223353 };
00013 
00014 
00015 /* ! Parameterization of Lorentz drift in CSCs */
00016 /* ***********************************************************************
00017  * DOC MC_ALL_BDFT                                                       *
00018  *                                                                       *
00019  * DOC  Function    : Parameterization of the Lorentz drift of electrons *
00020  * DOC                in the muon endcap CSCs.                           *
00021  *                                                                       *
00022  * DOC  References  : None                                               *
00023  *                                                                       *
00024  * DOC  Arguments   : BZ  - z componant of the local magnetic            *
00025  *                         field in kgauss                               *
00026  * DOC                ZCELL - distance from the anode wire in the wire   *
00027  *                           plane coordinate normalized to one          *
00028  * DOC  Errors      : None                                               *
00029  *                                                                       *
00030  * DOC  Returns     : Drift distance along the anode wire                *
00031  *                                                                       *
00032  * DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00033  * ***********************************************************************
00034  */
00035 
00036 
00037 
00038 
00039     const double x10 = 1.;
00040     const double x11 = bz / 40.;
00041     const double x12 = x11 * 2. * x11 - x10;
00042     const double x13 = x11 * 2. * x12 - x11;
00043     const double x14 = x11 * 2. * x13 - x12;
00044     const double x15 = x11 * 2. * x14 - x13;
00045     const double x16 = x11 * 2. * x15 - x14;
00046     const double x17 = x11 * 2. * x16 - x15;
00047     const double x18 = x11 * 2. * x17 - x16;
00048     const double x19 = x11 * 2. * x18 - x17;
00049     const double x20 = 1.;
00050     const double x21 = zcell;
00051     const double x22 = x21 * 2. * x21 - x20;
00052     const double x23 = x21 * 2. * x22 - x21;
00053     const double x24 = x21 * 2. * x23 - x22;
00054     const double x25 = x21 * 2. * x24 - x23;
00055     const double x26 = x21 * 2. * x25 - x24;
00056     const double x27 = x21 * 2. * x26 - x25;
00057 
00058   // not sure why we need a minus sign for avgDrift, but we think the
00059   // parametrization has a wrong sign.  For the +z endcap, bz should
00060   // be negative in local coord, so it should drift to the right
00061   // if drifting up (neg zcell), and to the left if it drifts down.  It doesn't.
00062   // the first-order term here is -0.08 * bz/40 * zcell
00063 
00064     return -1 * (coeff[0] * x11 * x21 + coeff[1] * x17 * x21 + coeff[2] * x21 +
00065             coeff[3] * x11 * x27 + coeff[4] * x22 + coeff[5] * x19);
00066 }
00067 
00068 
00069 double CSCDriftSim::driftSigma() const {
00070     // Initialized data 
00071 
00072     static const double coeff[3] = { .01069525,.010364504,.0021662697 };
00073 
00074 
00075 /* ! Parameterization of Lorentz drift error in CSCs */
00076 /*************************************************************************
00077  * DOC MC_ALL_BSIG                                                       *
00078  *                                                                       *
00079  * DOC  Function    : Parameterization of the dispersion in Lorentz Drift*
00080  * DOC                in the muon endcap CSCs.                           *
00081  *                                                                       *
00082  * DOC  References  : None                                               *
00083  *                                                                       *
00084  * DOC  Arguments   : BZ  - z componant of the local magnetic            *
00085  * DOC                ZCELL - distance from the anode wire in the wire   *
00086  *                           plane coordinate normalized to 1            *
00087  * DOC  Errors      : None                                               *
00088  *                                                                       *
00089  * DOC  Returns     : Dispersion in Lorentz drift along anode wire       *
00090  *                                                                       *
00091  * DOC  Created     : 15-OCT-1996   Author : Jeff Rowe                   *
00092  * ***********************************************************************
00093  */
00094 
00095 
00096     const double x11 = bz / 40.;
00097     const double x20 = 1.;
00098     const double x21 = zcell;
00099     const double x22 = x21 * 2. * x21 - x20;
00100 
00101     return coeff[0] + coeff[1] * x11 * x21 + coeff[2] * x22;
00102 } 
00103 
00104