The CFIT constrained kinematical fitter
$Id: cfitter.html,v 1.2 1995/05/27 12:11:08 olchansk Exp $
Introduction
The purpose of constrained kinematical fitters is to
enhance the resolution of experimental data
by combining the experimental measurements with additional information
known apriory.
This additional information includes, for example, the law of 4-momentum
conservation,
knowledge about the existance of known resonances, and
estimates of experimental errors, both systematic and stochastic.
This information is applied to the data using a fitting procedure:
by varying the measured quantities (such as particle momenta
and energies) to satisfy given constraints, which, for example,
require that pairs of photons should form a pi0 or an eta, or
that the missing mass in an event should be equal to the missing
mass of a known nucleon.
Apart from the fitted parameters, a kinematical fitter calculates
a Chi-Squared, a quantity that tells us how well any given
event satisifies the constraints imposed on that event.
The Chhi-Squared can be used later to do hypothesis testing
(such as "is this a pi0+pi0 event or an eta+eta event?")
and event selection (to select "well measured" events).
The CFIT constrained fitter
The CFIT constrained fitter implements the following constraints:
- the effective mass of pairs of particles
- the missing mass in the event
If necessary, the fitter can be extended to implement more constraints,
it is easy to add things like effective masses of three or more particles, phi or theta
angles of the missing momentum, etc...
Include files and libraries
Programs using the fitter should include:
- cfitter.h
and be linked with libraries:
- libcfitter.a
How to use the fitter
The 'cfitter' subsystem contains some sample files that illustrate
the use of the fitter. The Makefile in the same
subsystem can be used to build these examples.
Here is the list of example programs:
- sample1.c - fits the mass of the eta and the missing mass for 1-3-3-eta data
The inputs of the CFIT fitter
To use the fitter, the user should create an array of constraints
and an array of particles to be fit and pass them to the fitter.
The array of constraints may be constructed only once at the begining
of the program. The array of particles should be recreated
for each event using the contents of the group GROUP_GEO_TRACKS
for that event. This group contains particle charges, momenta
and covariance matrices.
Fitter entry points and helper functions
cfitter
- Description: Fitter main entry point. Performs the constrained fitting.
- Prototype:
int cfitter(const cfitConstraints_t *constraints,const cfitEvent_t *eventIn,cfitEvent_t *eventOut,float* xi2,int flags);
- Arguments:
- constraints - the array of constraints. The fitter does not modify this array.
- eventIn - input event (array of particles). The fitter does not modify this array.
- eventOut - fitted event. The fitter writes the fitted data into this array.
- xi2 - the Chi-Squared of the fit
- flags - various flags to control the fitter. Normally should be set to 0.
For other possible values see the
cfitter.h
include file.
- Return value: 0 if success, otherwise an error code
cfit_makeParticle0
- Description: Define a "dummy" particle. The fitter does not try to fit
the parameters of dummy particles, but they are used in effective
mass and missing mass calculations.
- Prototype:
int cfit_makeParticle0(cfitParticle_t *par,int add,float mass,const vector3_t* v3);
- Arguments:
- par - the particle structure (input to the fitter)
- add -
- 0 - if final state particle (subtracted from the missing mass, i.e. outgoing particles)
- 1 - if initial state particle (added to the missing mass, i.e. beam and target particles)
- mass - mass of the particle in GeV
- v3 - 3-momentum of the particle
- Return value: 0 if success, otherwise an error code
cfit_makeParticleGtrk
- Description: Define a regular particle. Regular particles may have different
number and kind of fit parameters:
- photons - 3 fit parameters: energy and X and Y components of the momentum unit vector.
- charged particles without covariance matrix - 1 fit parameter: 1/pmag, where pmag is
the magnitude of the momentum.
- charged particles with covariance matrix - 3 fit parameters: 1/pmag, X and Y
components of the momentum unit vector.
-
- Prototype:
int cfit_makeParticleGtrk(cfitParticle_t *par,int add,float mass,const geo_track_t *gtrk);
- Arguments:
- par - the particle structure (input to the fitter)
- add -
- 0 - if final state particle (subtracted from the missing mass, i.e. outgoing particles)
- 1 - if initial state particle (added to the missing mass, i.e. beam and target particles)
- mass - mass of the particle in GeV
- gtrk - the track structure (contains the charge, momentum and covariance matrix)
- Return value: 0 if success, otherwise an error code
cfit_constrainMMSQR
- Description: Define a constraint for the square of the missing mass.
- Prototype:
int cfit_constrainMMSQR(cfitConstraint_t *con,float mmsqr);
- Arguments:
- con - the constraint structure (input to the fitter)
- mmsqr - fit the missing mass to this value, in (GeV)^2
- Return value: 0 if success, otherwise an error code
cfit_constrainPairMass
- Description: Define a constraint for the effective mass of two particles.
- Prototype:
int cfit_constrainPairMass(cfitConstraint_t *con,int p1,int p2,float mass,float width);
- Arguments:
- con - the constraint structure (input to the fitter)
- p1 - index of the first particle in the cfitEvent_t array
- p2 - index of the second particle in the cfitEvent_t array
- mass - mass to fit to, in GeV
- width - width to fit to, in GeV. Use 0 to fit width-less particles (i.e. pi0 and eta)
- Return value: 0 if success, otherwise an error code
cfit_getFourVector
- Description: Extract the fitted 4-momentum from the particle structure
- Prototype:
vector4_t cfit_getFourVector(const cfitParticle_t *p);
- Arguments:
- p - particle in the fitter internal representation
- Return value: returns the 4-momentum decoded from the cfitParticle_t structure.
Bugs
No known bugs
What is inside the fitter?
(empty, CO 1995-May-27)
$Id: cfitter.html,v 1.2 1995/05/27 12:11:08 olchansk Exp $