CMS 3D CMS Logo

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