E852 Moments Code
Author -- Dave Thompson (dave@glueball.hep.nd.edu)
Overview
This document describes a procedure for predicting experimental moments
using the outcome of a PWA fit and comparing these with the measured
experimental moments. Moments are calculated for L<=8 and M<=4.
The E852 moments code is divided into two programs: LogMoments
and EsrMoments. LogMoments.cc, EsrMoments.cc, and moments.kumac are all in sccs
in the PWA subsystem. LogMoments reads an E852 PWA logfile (containing
the fit results from one or more massbins) and calculates the
pure moments via equation 28 from Suh Urk's Amplitude Analysis of
two-pseudoscalar systems -- Version VI (2PS). EsrMoments reads the output of
LogMoments and GROUP_ESR_NPARTICLE from data, raw Monte Carlo and accepted Monte Carlo,
and calculates the experimental moments (2PS eqn 80), the Psi matrix (2PS eqn 85),
and the predicted experimental moments (2PS eqn 82).
Note: If you make changes to the moments code, please let me (and the rest of the collaboration) know
about it. I depend on this code for my analysis, and I don't want it to change underneath me
without my knowledge.
LogMoments
Usage: LogMoments [-ofilename] Logfile
filename - name of binary file to which calculated pure moments will be written (default = log.moments)
Logfile - name of PWA logfile used as input
The stderr of LogMoments can be redirected to a file to give an ascii record of the
pure moments.
EsrMoments
Usage: EsrMoments [flags]
Recognized flags:
-a( ) Set accepted MC esr filename
-D Read experimental moments from file Data.dat
and error matrix from file ErrMat.dat
-d( ) Set data esr filename (one can alternatively list multiple
data esr files at the end of the command line)
-h Print this message
-L( ) Set lower limit on -t range
-l( ) Set lower limit of mass range
-m( ) Set filename containing output of LogMoments
-P Read Psi matrix from file Psi.dat
-R( ) Set topology
Current supported topologies are:
etapi-
etaprimepi-
etaeta
etapi0
pi0pi0
-r( ) Set raw MC esr filename
-s( ) Set size of one mass bin (def = 0.02 GeV)
-U( ) Set upper limit on -t range
-u( ) Set upper limit of mass range
Notes on EsrMoments:
- The -P and -D flags can be used only when one is calculating moments for a fit
with the same mass binning, mass range, and t range as a previous fit for which
moments have been calculated.
- The -P flag replaces the -a( ) and -r( ) flags. When -P is used, the
file Psi.dat (saved by a previous execution of EsrMoments) should be in the current
directory.
- The -D flag replaces the -d( ) flag. When -D is used, the files Data.dat and
ErrMat.dat (saved by a previous execution of EsrMoments) should be in the current directory.
- The output of the program is a series of text files (*.txt), corresponding to the
values and errors on each moment, and the values of chi-squared calculated six different
ways (using moments with L<=4, L<=6, and L<=8 -- and then again for each of the 3 previous cases, but
using only the diagonal elements of the covariance matrix).
- The moments files are numbered in
increasing order of L, then M (i.e. hist100.txt contains the values for H(00), hist101.txt = H(10),
hist102.txt = H(11), hist103.txt = H(20), etc. -- err100.txt contains the errors for H(00), and
hist200.txt contains the predicted moments for H(00)).
- For pawX11 users, I have created a kumac file (moments.kumac described below) which reads all the
text files and places them into appropriate histograms.
- The etapi0 and pi0pi0 cases have not been tested, but they should be okay. You should look at the
code to make sure your topology is being handled correctly, though.
- EsrMoments and LogMoments have been tested only on the IBM rs6000 platform. In fact, I've had
trouble compiling and/or linking the code on SGI at various times. I make no guarantees that this
code will work on SGIs (C++ does not seem to be nearly as portable as C). If you have problems, I'll
be happy to try to help you figure it out. But I've got lots of other stuff to do, and getting this code
to work on all platforms will probably not be my first priority.
moments.kumac
This kumac file uses variables for everything you should need to change to fit
your own situation. They are defined at the top of the file as follows:
nbins - number of mass bins in your PWA fit
lowmass - low end of your mass range
highmass - high end of your mass range
lmax, mmax, nmoments - don't change these unless EsrMoments.cc and LogMoments.cc are similarly
changed (i.e. you're calculating a different set of moments than those described above).
title1, title2 - I like the simple titles, but you may want yours to be more descriptive.
Dave (dave@glueball.hep.nd.edu)