%\input phyzzx
\input tables

\def\g{{\rm\bf g_0}}
\def\etab{{\bf \eta}}
\def\pb{{\rm pb^{-1}}}
\def\pcor{{p_{\rm cor}}}
\def\taucor{{\tau_{\rm cor}}}
\def\tauold{{\tau_{\rm old}}}
\def\pold{{p_{\rm old}}}
\def\dedx{dE/dx}
\def\dedxmin{{(dE/dx)_{\rm min}}}
\def\demin{\Delta E_{\rm min}}
\def\newline{\hfil\break}

\hsize=6.50truein
\vsize=8.75truein	%Leaves enough room for page number
\hoffset=0.00truein	%Actually gives 1 inch
\voffset=0.00truein

\singlespace
\rightline{\vbox{
  \hbox{Paul Avery}
  \hbox{CBX 92--40}
  \hbox{August 20, 1992}
}}

\normalspace
\fourteenpoint
\vskip 0.1 truein
\centerline{\bf The Charged Particle Energy Correction in CLEO}
\twelvepoint
\parindent 20pt
%
\chapter {\bf Introduction}
In May, 1991 I sent out a computer mailing detailing how I calculated the
charged particle energy correction for CLEO 1.5 and CLEO 2. The correction
consists of two parts: (1) a term that accounts for $dE/dx$ losses in material
preceding the main drift chamber and (2) a $B$ field multiplication factor.
The code implementing the correction is in the library
{\tt FTLIB} (this will be replaced soon by {\tt KNLIB})  and
is described in CBX 91--12.
It requires the use of the KN track list if you are interested in 4--vectors.

I document here the method that I used  to obtain
the energy correction and to show how the $K_s$, $\Lambda$,
$D^0$ and $D^+$ masses vary with momentum. This analysis uses
a total of 1066 $\pb$ of CLEO 2 data (4S2\_5 and 4S3\_1) and
320 $\pb$ of CLEO 1.5 data. I was not able to present
very detailed CLEO 2 results in my original note because I only had 120
$\pb$ of 4S1 data available at the time.

\chapter {\bf Why the correction is needed}
The track fitting program DUET only partially accounts for the effect
of material on particle propogation. Multiple scattering
is treated by allowing an $r-\phi$ kink at the inner boundary
of the DR and then applying propogation of errors to the measurement
covariance matrix
to account for hit correlations (as described in CBX 91--74).
No attempt is made at all to correct for the energy losses suffered
by particles as they cross device boundaries and gas. CLEO
relies instead on an ``after the fact'' correction, such as the
DKSxxx routines described in CBX 91--12, to the particle energy/momentum,
even though the method is not strictly valid and does not do a good job for
low momentum tracks. This note describes how that correction is performed.

Before doing this I would like to point out that there are
better alternatives. FTMONTE uses a Kalman filter algorithm
first used by P. Billoir in track fitting which continuously corrects
the track for $dE/dx$ losses
and multiple scattering as it traces the track toward the production point,
accumulating measurements as it goes. It is described in detail in CBX 92--39.
Although the Kalman filter method is not
particularly fast and requires special treatment to start the fit, it is
``optimal'' in the sense of using all the information to obtain the best
possible parameters. My tests in FTMONTE show that it does indeed give
very good parameters,
particularly for slower tracks which have large energy and multiple scattering
corrections. A full implementation would require that each track
be fit under five hypotheses (each with its own covariance matrix),
corresponding to the possibility that the
particle is an electron, muon, pion, kaon or proton. In this way, physics
analyses would use the correct particle hypothesis when calculating invariant
masses or applying kinematic fitting. The
potentially large amount of ROAR storage this method would entail (especially
for the covariance matrices)
could be reduced through clever ways of encoding the information, using the
fact that the five sets of track parameters do not differ much.

\chapter {\bf Theoretical treatment}
The corrected momentum $\pcor$ is calculated from the initial momentum
$\pold$ by the formula
$$
     \pcor = R\pold + \Delta p
$$
where $R$ is a $B$ field correction (it is applied in {\tt GETCD}) and
$\Delta p$ is the $dE/dx$ correction. $\Delta p$ is calculated
by integrating the Bethe-Bloch formula
$$
\Delta p = \int_0^t{dp\over dx}dx = \int_0^t
          {1\over \beta} {dE \over dx}dx =
   \int_0^t {A\over \beta^3}
 \left[\ln\left({2m_ec^2\beta^2\gamma^2 \over I_0}\right) - \beta^2 \right] dx
$$
where $t$ is the thickness of the material to be traversed (including the
increased path length due to non-normal tracks),
$A$ is a constant that depends on the material, $Z$ is the atomic number,
$m_e$ is the electron mass, $I_0$ is the ionization potential and
$\beta$ and $\gamma$ are the usual relativistic parameters. I
use the approximation $I_0 = Z^{0.9}$eV, and take $Z=9$ for representative
media.
$A$ is determined from our knowledge of $\dedxmin$, the quantity
listed in the Particle Data Book. The minimum occurs
at $\beta\gamma = 3.40$, which gives $A = \dedxmin / 11.528$.

It is easier to write the differential equation in terms of
$\tau \equiv \beta\gamma = p/m$ and the normalized thickness $x' = x/t$:
$$\eqalign{
    {d\tau \over dx'} &= {\demin\over m} F(\tau)                 \cr
               F(\tau)&= {(1+\tau^2)^{3/2} \over 11.528\tau^3}
        \left[9.0872 + 2\ln(\tau) - {\tau^2 \over 1+\tau^2}\right]     \cr
                 \tau &= {p \over m}    \cr
}$$
where $\demin = \dedxmin t$ is the average energy loss suffered
by a minimum ionizing particle passing through a distance 
$t$ of material (including path length corrections from non-normal tracks).
The change in momentum can then be calculated from the integral
$$
   \Delta p = m\Delta\tau = \demin \int_0^1 F(\tau) dx'
$$
For moderate velocities ($\beta > 0.7$), $F(\tau)$ is approximately constant
giving $\Delta p \simeq \demin F(\tau)$.
At low values of $\beta$, where $F(\tau)$ changes rapidly,
it is probably necessary to integrate the $d\tau/dx'$
differential equation numerically using a method such as
the Runge--Kutte technique.
The integration is aided by transforming to a new variable
$\xi = \tau^4$ which removes the $1/\tau^3$
term from the differential equation and makes the numerical solution more
accurate. Using this variable the $\dedx$ differential equation becomes
$$\eqalign{
 {d\xi \over dx'} &= {\demin\over m} F'(\xi)       \cr
    F'(\xi)&= {(1+\sqrt{\xi})^{3/2} \over 4 \cdot 11.528}
  \left[9.0872 + \half\ln(\xi) - {\sqrt{\xi} \over 1+\sqrt{\xi}}\right] \cr
              \xi &= \left({p \over m}\right)^4    \cr
}$$

\chapter {\bf CLEO $\dedx$ software}
The $B$ field correction in CLEO II is applied when you call {\tt GETCD}
(the correction is 1.0025 as dicussed in the next section). The $\dedx$
correction is obtained by calling one of the {\tt DKSxxx} routines as
documented in CBX 91--12. They require you to use
the KN track list, except for the lowest level functions which accept
all the necessary information in the argument list. The routines
store $\dedxmin\times t$ as a function of run number, where $t$
is the total amount of material up to and including the inner wall of the main
drift chamber.

The algorithm is carried out in the function {\tt DKSDEL}, which
actually solves the integral equation $\demin =
m\int_{\tauold}^{\taucor} d\tau / F(\tau)$ for $\taucor = \pcor/m$
using lookup tables.  The $dE/dx$ correction calculated by these
routines is not completely correct because it is assumed that
the particle's momentum is determined entirely in the main drift
chamber, a poor assumption at low momentum. The routines partly compensate for
this by using only the material up and including the inner VD wall
when $p < 0.060$ GeV/c, but this causes gaps in the corrected momentum
spectrum. A second problem is that the {\tt DKSxxx} routines apply the
correction at the origin, with no change in the track's position and
direction. The correction should in principle be done at some
effective radius and then the track should be swum back to the origin.
I will be studying both these issues to come up with a better
algorithm, but the results presented here show that the correction
results in a major improvement of the mass values.

In contrast, the charged particle tracing and fitting routines in
FTMONTE integrate the $d\tau/dx'$ differential equation using the
Runge--Kutte method described above.  The FTMONTE routine which
returns the momentum of the particle before energy loss is
\vskip 0.1 truein
\centerline{\tt FUNCTION FMDPUP(POLD, XMAS, DEDXMN),}
\vskip 0.1 truein
\noindent where {\tt POLD} is the momentum after energy loss, {\tt XMAS}
is the mass and {\tt DEDXMN} is $\dedxmin \times t$. The function {\tt
FMDPDN} is used to subtract energy from the particle rather than add
it. Both {\tt FMDPUP} and {\tt FMDPDN} can be found in {\tt FTLIB}.

The table below shows the effect of 1.75 MeV of material (the amount found for
CLEO 2) on particles of various momenta. I assume $\sin\theta = 0.8$ to
get a more realistic incident angle on the material.
\vfill\eject
\centerline{Corrected momenta for $\pi$, $K$ and $p$ vs. measured momentum
         ($\sin\theta = 0.8$)}
\vskip 0.1 truein
\begintable
$\pold$ | $\pcor(\pi)$ | $\pcor(K)$  |  $\pcor(p)$   \cr
  0.050 |    0.071     | 0.158       | 0.247  \nr
  0.100 |    0.107     | 0.166       | 0.252  \nr
  0.150 |    0.154     | 0.188       | 0.261  \nr
  0.200 |    0.203     | 0.223       | 0.278  \nr
  0.250 |    0.253     | 0.265       | 0.304  \nr
  0.300 |    0.302     | 0.311       | 0.339  \nr
  0.400 |    0.402     | 0.406       | 0.421  \nr
  0.500 |    0.502     | 0.505       | 0.514  \nr
  0.600 |    0.602     | 0.604       | 0.610  \nr
  0.700 |    0.702     | 0.703       | 0.707  \nr
  0.800 |    0.802     | 0.803       | 0.806  \nr
  0.900 |    0.902     | 0.903       | 0.905  \nr
  1.000 |    1.002     | 1.003       | 1.004
\endtable

\chapter {\bf CLEO 2 $\dedx$ results}

The initial energy correction for CLEO 2 was determined using the 120 $\pb$
$BB^*$ data sample using $K_s$'s, $\Lambda$s and $D$s. In this note I will show
the results for the recent 1066 $\pb$ 4S2\_5 and 4S3\_1 sample. I select
events as follows:
 
1.  $K_s$ and $\Lambda$. I require DI particle ID consistency (2.5 $\sigma$)
for all particles and demand that all $V^0$ vertices have a radius less than
3.4 cm, to force the decay products to pass through the beam
pipe. $K_s$ and $\Lambda$ masses
were plotted in 1.0 and 0.5 MeV bins, respectively. I fit the mass
peaks to a gaussian plus a quadratic background.
      
2.  $D^0 \to K\pi$, $D^0 \to K_s\pi\pi$ and $D^0 \to K3\pi$ decays from $D^{*+}
\to D^0\pi^+$ and $D^+ \to K\pi\pi$ from $D^{*+}\to D^+\pi^0$. Again I demanded
2.5 $\sigma$ consistency for all particles to clean up the signals. Masses were
plotted in 5 MeV bins. I fit the histograms to a gaussian signal plus a
quadratic background.

To get the corrections I tried out several values of the two correction
constants. My criteria were that the particle masses should be centered as
closely as possible on the true positions and that they should be momentum
independent. After several trials I obtained best guess values of 1.75 MeV
and 1.0025 for the $dE/dx$ material and the $B$ field correction, respectively
(The 1.0025 correction is applied in {\tt GETCD}).

The results are shown in Figures 1--6. Figures 1--2 (3--4) show the $K_s$
($\Lambda$) masses as
a function of momentum, before and after corrections are applied. Note that
the effect of correcting for energy loss is easily discernable for
both particles. After correction the
$K_s$ mass rises slightly as a function of momentum, whereas the
opposite is true for the $\Lambda$. Figures 5 and 6 show the
$D^0 \to K\pi,\; K_s\pi\pi,\; K3\pi$
and $D^+ \to K\pi\pi$ masses as a function of $x=p/p_{\rm max}$. For
amusement, I have plotted the theoretical uncertainty in the $D^0$ and $D^+$
masses as a dotted line.
The correction seems to make the masses come out about right, although there
is a tendency to rise at high momentum. This rise could be cancelled by
slightly decreasing the $B$ field and slightly increasing the amount of material.

\chapter {\bf Determining the CLEO 1.5 energy correction}

For this study I analyzed 320 $\pb$ of CLEO 1.5 data using the SB4Hxx.ROR
files. The energy correction that has been used by all previous  CLEO 1.5
analysis has been based on the {\tt GET4} (charged tracks) and {\tt GET4V}
($K_s$ and $\Lambda$) routines. The amount of material and the B field
multiplication factors that were used were 1.05 MeV and 1.000, respectively.
The $dE/dx$ value contradicts the calculation of approximation of 1.7 MeV done
by Thorndike and Sparks (May 1, 1991 e-mail note). Indeed, when I looked at the
mass dependence of $K_s$, $\Lambda$ and $D^0$ particles I discovered a
significant momentum dependence. I concluded that the values were incorrect and
proceeded to try out new sets of numbers by hand until the masses stabilized.
My new values for the $\dedx$ thickness and $R$ are 1.9 MeV and 0.9990,
respectively. The masses as a function of momentum are
shown in the table below. As in the CLEO 2 case, I only use $V^0$s
which decay inside the beam pipe.
\vfill\eject
\begintable
\multispan{3}{\tstrut\hfill CLEO 1.5 $K_s$ mass vs. $p$ \hfill}    \cr
Momentum region  | Mass (old correction)  | Mass (new correction)  \cr
$0.0 < p < 0.5$  |  $496.10 \pm 0.07$     |  $497.72 \pm 0.03$     \nr
$0.5 < p < 1.0$  |  $496.70 \pm 0.06$     |  $497.54 \pm 0.03$     \nr
$0.0 < p < 1.5$  |  $497.25 \pm 0.10$     |  $497.65 \pm 0.05$     \nr
$1.5 < p < 2.0$  |  $497.61 \pm 0.16$     |  $497.62 \pm 0.08$     \nr
$2.0 < p < 2.5$  |  $497.85 \pm 0.12$     |  $497.72 \pm 0.16$     \nr
$2.5 < p < 3.0$  |  $497.89 \pm 0.22$     |  $497.79 \pm 0.26$
\endtable

\vskip 0.3 truein
\begintable
\multispan{3}{\tstrut\hfill CLEO 1.5 $\Lambda$ mass vs. $p$ \hfill}\cr
Momentum region  | Mass (old correction)  | Mass (new correction)  \cr
$0.0 < p < 0.5$  |  $1115.1 \pm 0.15$     |  $1115.95 \pm 0.09$    \nr
$0.5 < p < 1.0$  |  $1115.4 \pm 0.03$     |  $1115.93 \pm 0.03$    \nr
$1.0 < p < 1.5$  |  $1115.5 \pm 0.04$     |  $1115.73 \pm 0.04$    \nr
$1.5 < p < 2.0$  |  $1115.8 \pm 0.10$     |  $1115.88 \pm 0.09$    \nr
$2.0 < p < 2.5$  |  $1115.8 \pm 0.14$     |  $1115.88 \pm 0.13$
\endtable
\vskip 0.8 truein
\centerline{\bf\fourteenpoint Figures}

\item{1.} $K_s$ mass as a function of momentum. Open circles have no $B$
field or $\dedx$ correction applied. Open and filled triangles refer to
4s2\_4 and 4s2\_5 data, respectively.

\item{2.} $K_s$ mass as a function of momentum on an expanded vertical scale.
Open and filled triangles refer to 4s2\_4 and 4s2\_5 data, respectively.

\item{3.} $\Lambda$ mass as a function of momentum. Open circles have no $B$
field or $\dedx$ correction applied. Open and filled triangles refer to
4s2\_4 and 4s2\_5 data, respectively.

\item{4.} $\Lambda$ mass as a function of momentum on an expanded vertical
scale. Open and filled triangles refer to 4s2\_4 and 4s2\_5 data,
respectively.

\item{5.} $D^0$ mass as a function of $x = p/p_{\rm max}$.

\item{6.} $D^+$ mass as a function of $x = p/p_{\rm max}$.
\end
