Geometry of the MPS wire chambers
Data structures
The geometry of the MPS wire chambers (beam PWCs and hodoscopes, TPX1..3, DM1..7, TDX4)
is described by the space_t structure defined in mpsX.h.
The space_t record contains following fields:
- ncmax --- (unknown)
- ntot --- number of chambers in the chamber array
- nact --- (unknown)
- nr --- number of regions
- region[] --- array of region_t recordsd describing the chamber regions
- chamber[] --- array of chamber_t records describing each chamber
All the chambers are subdivided into regions-
- region 0 --- upstream area- the beam PWCs and hodoscopes
- region 1 --- inside the magnet- TPXes and drift chambers
- region 2-9 --- not used by experiment E852
Each region is described by a region_t record:
- number --- number of planes in the region
- begin --- index of the first chamber on the chamber_t array
The information about each chamber is stored in chamber_t records.
Most useful fields of that record are described here, for full information, see the include file.
- idtype --- type of the chamber, consists of a 3-digit number: XXYY, where:
- XX --- is the chamber type
- YY --- is the measurement type: XMEASURE, YMEASURE, UMEASURE, VMEASURE and PHIMEASURE
For example, chamber 401 is an X-measureing beam PWC.
- ofset --- chamber offset (position) (see below for more info)
- dcos --- unit vector in the direction perpendicular to the wires
- unv --- unit vector normal to the chamber plane
- cell --- wire spacing
- driftv --- drift velocity (for drift chambers only. Undefined for PWCs)
- ncells --- number of wires
- dnorm --- distance for the chamber plane to the point (0,0,0)
- aname --- chamber name
- *nhits --- number of hits on the chamber
- (*hits)[] --- array of hits (Filled by the FillCoors subroutine)
- misc->efficiency --- chamber efficiency
- misc->t0 --- drift parameters
- misc->d0 --- drift parameters
- misc->nexclude --- number of disabled wires
- misc->exclude[] --- list of disabled wires
Loading the chamber parameters
Use the following code sequence to load the chamber parameters:
#include
#include
#include
space_t space; // the space structure to be loaded
int runNo; // run number
int ret; // error code
// Load the database file
ret = param_loadDatabase("space",runNo);
// load the chamber parameters
ret = space_getParameters(&space);
Loading the chamber hits
Use the following code sequence to load chamber hits
from an event into the space_t structure (chamber[]->hits[]):
#include
#include
#include
space_t space; // the space structure to be loaded
coors_t coors; // the hits buffer
int ret; // error code
itape_header_t *event; // the event
// Fill the chamber hits from the event
InitCoors(&space,&coors);
FillCoors(event,&space,&coors);
Chamber geometry
The section decribes the 3-D chamber geometry.
To define a plane in a 3 dimentional space, it is sufficient to specify it's normal vector (unv)
and the distance from the plane to the origin of coordinates (dnorm). To define the positions
of the cells (wires) on the plane, it is sufficient to specify either direction of the wires
or a vector orthogonal to the wires (dcos).
How to use the drift information
Assuming:
- chm --- the chamber structure
- iwire --- wire number (ocunting from 1)
- tdc --- drift as measured by a TDC
The drift distance shall be calculated as:
chamber_t chm; // chamber record
int iwire; // wire number (counting from 1)
int tdc; // drift time (tdc)
double dd; // drift distance
dd = chm.d0 + chm.driftv * (tdc - chm.misc->t0[iwire-1]);
Notes: the tdc value can be positive and negative, the drift velocity (driftv)
is positive for the MPS drift chamber and negative for TDX4.
CO 1995-June-12