CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDriftParam.cc
Go to the documentation of this file.
2 #include <cmath>
3 
4 // the following functions were all generated by f2c.
5 // vin tried to optimize them...
6 // with no sizeble effect....
7 
8 double CSCDriftSim::avgDrift() const{
9  /* Initialized data */
10 
11  static const double coeff[6] = { -.08618265,-.0020471805,-7.7771331e-4,
12  -.0058433565,-5.0241491e-4,.0010223353 };
13 
14 
15 /* ! Parameterization of Lorentz drift in CSCs */
16 /* ***********************************************************************
17  * DOC MC_ALL_BDFT *
18  * *
19  * DOC Function : Parameterization of the Lorentz drift of electrons *
20  * DOC in the muon endcap CSCs. *
21  * *
22  * DOC References : None *
23  * *
24  * DOC Arguments : BZ - z componant of the local magnetic *
25  * field in kgauss *
26  * DOC ZCELL - distance from the anode wire in the wire *
27  * plane coordinate normalized to one *
28  * DOC Errors : None *
29  * *
30  * DOC Returns : Drift distance along the anode wire *
31  * *
32  * DOC Created : 15-OCT-1996 Author : Jeff Rowe *
33  * ***********************************************************************
34  */
35 
36 
37 
38 
39  const double x10 = 1.;
40  const double x11 = bz / 40.;
41  const double x12 = x11 * 2. * x11 - x10;
42  const double x13 = x11 * 2. * x12 - x11;
43  const double x14 = x11 * 2. * x13 - x12;
44  const double x15 = x11 * 2. * x14 - x13;
45  const double x16 = x11 * 2. * x15 - x14;
46  const double x17 = x11 * 2. * x16 - x15;
47  const double x18 = x11 * 2. * x17 - x16;
48  const double x19 = x11 * 2. * x18 - x17;
49  const double x20 = 1.;
50  const double x21 = zcell;
51  const double x22 = x21 * 2. * x21 - x20;
52  const double x23 = x21 * 2. * x22 - x21;
53  const double x24 = x21 * 2. * x23 - x22;
54  const double x25 = x21 * 2. * x24 - x23;
55  const double x26 = x21 * 2. * x25 - x24;
56  const double x27 = x21 * 2. * x26 - x25;
57 
58  // not sure why we need a minus sign for avgDrift, but we think the
59  // parametrization has a wrong sign. For the +z endcap, bz should
60  // be negative in local coord, so it should drift to the right
61  // if drifting up (neg zcell), and to the left if it drifts down. It doesn't.
62  // the first-order term here is -0.08 * bz/40 * zcell
63 
64  return -1 * (coeff[0] * x11 * x21 + coeff[1] * x17 * x21 + coeff[2] * x21 +
65  coeff[3] * x11 * x27 + coeff[4] * x22 + coeff[5] * x19);
66 }
67 
68 
69 double CSCDriftSim::driftSigma() const {
70  // Initialized data
71 
72  static const double coeff[3] = { .01069525,.010364504,.0021662697 };
73 
74 
75 /* ! Parameterization of Lorentz drift error in CSCs */
76 /*************************************************************************
77  * DOC MC_ALL_BSIG *
78  * *
79  * DOC Function : Parameterization of the dispersion in Lorentz Drift*
80  * DOC in the muon endcap CSCs. *
81  * *
82  * DOC References : None *
83  * *
84  * DOC Arguments : BZ - z componant of the local magnetic *
85  * DOC ZCELL - distance from the anode wire in the wire *
86  * plane coordinate normalized to 1 *
87  * DOC Errors : None *
88  * *
89  * DOC Returns : Dispersion in Lorentz drift along anode wire *
90  * *
91  * DOC Created : 15-OCT-1996 Author : Jeff Rowe *
92  * ***********************************************************************
93  */
94 
95 
96  const double x11 = bz / 40.;
97  const double x20 = 1.;
98  const double x21 = zcell;
99  const double x22 = x21 * 2. * x21 - x20;
100 
101  return coeff[0] + coeff[1] * x11 * x21 + coeff[2] * x22;
102 }
103 
104 
double avgDrift() const
Definition: CSCDriftParam.cc:8
double zcell
Definition: CSCDriftSim.h:65
double driftSigma() const