/*DSPACK_IGNORE*/ /* $Log: na49_event_str.h,v $ Revision 1.13 1999/07/01 09:50:09 buncic Added definition of BPD relative gain factors and removed R3D flag macros * Revision 1.12 1998/11/06 09:01:50 buncic * Oct98 production version. * * Revision 1.11 1998/03/17 10:27:23 buncic * Added definition of cmd_hit_t. * * Revision 1.10 1998/01/30 12:39:53 buncic * Added PESTOF data structures. * * Revision 1.9 1997/11/26 18:37:15 buncic * itrack_t intrack_p changed to void. Added cmd_t, cmd_data_t, ring_cal_t, * calib_data_t, calib_type and kalib definitions. * * Revision 1.8 1997/06/12 16:22:17 buncic * Added comment for vertex iflags. * * Revision 1.7 1997/04/15 16:30:18 buncic * Added vertex_fit variable. * * Revision 1.6 1997/04/12 13:14:42 buncic * Added definiton of bpd_vertex_t. * * Revision 1.5 1997/03/24 12:04:11 buncic * Added definitions of g_track_ref_t and rtrack_quali_t to na49_event_str.h. * * Revision 1.4 1997/02/03 12:06:49 buncic * Added definition of mini_pnt_lst_t and mini_pnt_hdr_t. * * Revision 1.3 1996/11/05 13:43:17 buncic * Added bpd_data_t and bpd_t definitions. * * Revision 1.2 1996/08/12 08:58:32 buncic * Added g_ptr_list_t and g_predict_pnt_t for global tracking. * * Revision 1.1.1.1 1996/05/23 08:15:54 jcs * Import NA49 library sources * * Revision 1.7.2.23 1996/03/01 08:56:36 buncic * Fixed typo in definition of beam variable. * * Revision 1.7.2.22 1996/02/15 17:20:54 buncic * Added $Log: na49_event_str.h,v $ * Added Revision 1.13 1999/07/01 09:50:09 buncic * Added Added definition of BPD relative gain factors and removed R3D flag macros * Added * Revision 1.12 1998/11/06 09:01:50 buncic * Oct98 production version. * * Revision 1.11 1998/03/17 10:27:23 buncic * Added definition of cmd_hit_t. * * Revision 1.10 1998/01/30 12:39:53 buncic * Added PESTOF data structures. * * Revision 1.9 1997/11/26 18:37:15 buncic * itrack_t intrack_p changed to void. Added cmd_t, cmd_data_t, ring_cal_t, * calib_data_t, calib_type and kalib definitions. * * Revision 1.8 1997/06/12 16:22:17 buncic * Added comment for vertex iflags. * * Revision 1.7 1997/04/15 16:30:18 buncic * Added vertex_fit variable. * * Revision 1.6 1997/04/12 13:14:42 buncic * Added definiton of bpd_vertex_t. * * Revision 1.5 1997/03/24 12:04:11 buncic * Added definitions of g_track_ref_t and rtrack_quali_t to na49_event_str.h. * * Revision 1.4 1997/02/03 12:06:49 buncic * Added definition of mini_pnt_lst_t and mini_pnt_hdr_t. * * Revision 1.3 1996/11/05 13:43:17 buncic * Added bpd_data_t and bpd_t definitions. * * Revision 1.2 1996/08/12 08:58:32 buncic * Added g_ptr_list_t and g_predict_pnt_t for global tracking. * * Revision 1.1.1.1 1996/05/23 08:15:54 jcs * Import NA49 library sources * * Revision 1.7.2.23 1996/03/01 08:56:36 buncic * Fixed typo in definition of beam variable. * on top of .h files. * */ /*DSPACK_END_IGNORE*/ /*----------------------------------------------------------------------*/ /* */ /* NA49 Structures */ /* Event Structures */ /* */ /* dev - version 1.0 6.11.1995 */ /* */ /* */ /* Comments: */ /* units: GeV, cm (if not given in the comments) */ /* */ /* Coordinate systems: */ /* Internal coordinate systemr: */ /* system connected with the center of the detector */ /* as defined by the Hepdb data */ /* */ /* NA49 coordinate system: */ /* x - Jura */ /* y - up */ /* z - NA49 nominal beam */ /* */ /* Beam coordinate system: */ /* x - Jura */ /* y - up */ /* z - beam */ /* */ /* Structures in the internal coordinate system: */ /* itrack_t */ /* Structures in the NA49 coordinate system: */ /* point_t, rtrack_t, vertex_t, track_t, ktrack_t */ /* Structures in the beam coordinate system: */ /* atrack_t */ /* avertex_t */ /* */ /* Detector id and index: */ /* 1 - VT1 */ /* 2 - VT2 */ /* 3 - MTL */ /* 4 - MTR */ /* id_det = */ /* sum(id=1 to 4) [0(non-active) or 1(active)]*2^id */ /* */ /* */ /* Track parameters (NA49 c.s.): */ /* qpxz = charge/sqrt(px^2 + pz^2) */ /* tanl = py/sqrt(px^2 + pz^2) */ /* phi = atan2(pz, px) */ /* if(phi<0) then phi = phi + 2.*pi */ /* (0 =< phi < 2*pi) */ /* */ /* Track parameters (beam c.s.): */ /* pt = sqrt(px^2 +py^2) */ /* psi = atan2(py, px) */ /* if(psi<0) then psi = psi + 2.*pi */ /* (0 =< psi < 2*pi) */ /* y.. = 0.5*ln[(e+pz)/(e-pz)] */ /* [e = sqrt(px^2 + py^2 + pz^2 + m..^2)] */ /* */ /* Vertex types (id_vtx) and kinematical fit types (id_type) */ /* and the stored number of elements of the covariance */ /* matrix vertex.covar(...) are given */ /* 0 - Main vertex (6) */ /* 11 - V0 (both tracks in the magnetic field - ff) (45) */ /* 12 - V0 (positive track in field, negative outside- fn)(36)*/ /* 13 - V0 (positive track outside field, negative in- nf)(36)*/ /* 14 - V0 (both tracks outside field - nn) (28) */ /* 21 - kink+ (ff) (45) */ /* 22 - kink+ (fn) (36) */ /* 23 - kink+ (nn) (28) */ /* 21 - kink- (ff) (45) */ /* 22 - kink- (fn) (36) */ /* 23 - kink- (nn) (28) */ /* 31 - tau+ (ffff) (190) */ /* 32 - tau+ (nnnn) (120) */ /* 31 - tau- (ffff) (190) */ /* 32 - tau- (nnnn) (120) */ /* 41 - xi+ */ /* 41 - xi- */ /* */ /* Identical data structures are used to store different */ /* magnetic field configurations */ /* */ /* Covariance matrix: */ /* only upper right 'corner' of the covariance matrix*/ /* is stored, */ /* the elements are stored from left to right, row by row*/ /* starting from the top row, e.g. */ /* 1 2 3 */ /* covarinace matrix: 4 5 6 */ /* 7 8 9 */ /* covar(1) = 1 */ /* covar(2) = 2 */ /* covar(3) = 3 */ /* covar(4) = 5 */ /* covar(5) = 6 */ /* covar(6) = 9 */ /* */ /* The order of the variables in the covarinace */ /* matrix is given by the order in which they are */ /* listed in the structure. */ /* */ /* In the case when covariance matrix is larger than*/ /* needed (field off data) the first elements of the*/ /* matrix are used according to the above convention.*/ /* */ /* In the case of ktrack only elements which correspond*/ /* to a given track parameter are stored. */ /* */ /* */ /*-----------------------------------------------------------------------*/ /*********************** includes ******************************/ #ifndef _na49_event_str_included_ #define _na49_event_str_included_ #include "dspack_types.h" typedef struct covar3x3_t DS_TEMPLATE { float_t c[6]; } covar3x3_t; typedef struct covar4x4_t DS_TEMPLATE { float_t c[10]; } covar4x4_t; typedef struct covar5x5_t DS_TEMPLATE { float_t c[15]; } covar5x5_t; typedef struct covar9x9_t DS_TEMPLATE { float_t c[45]; } covar9x9_t; typedef struct covar13x13_t DS_TEMPLATE { float_t covar[91]; } covar13x13_t; /********************** event ***********************************/ typedef struct event_t DS_TEMPLATE { /* Event Header */ int_t n_run; /* Run number */ int_t n_event; /* Event number */ int_t mask_trig; /* Trigger mask */ int_t date; /* date of the trigger */ int_t time; /* time of the trigger */ float_t pressure; /* pressure in mb */ float_t clock_phase[4]; /* Clock phase (raw TDC) */ float_t gas_gain[4]; /* gas gain (raw) */ float_t v_drift[4]; /* drift velocity cm/musec (raw) */ float_t temperature[4]; /* gas temperature (raw) */ float_t mag_field[2]; /* magnetic field (Gauss, probes) */ struct bos_t *bos_p; /* Ptr to non-tpc raw data header */ struct bos_t *bos_vt1_p; /* Ptr to raw data header for vt1 */ struct bos_t *bos_vt2_p; /* Ptr to raw data header for vt2 */ struct bos_t *bos_mtl_p; /* Ptr to raw data header for mtl */ struct bos_t *bos_mtr_p; /* Ptr to raw data header for mtr */ struct tpc_t *vt1_p; /* Pointer to VTPC 1 struct */ struct tpc_t *vt2_p; /* Pointer to VTPC 2 struct */ struct tpc_t *mtl_p; /* Pointer to MTPC left struct */ struct tpc_t *mtr_p; /* Pointer to MTPC right struct */ struct tof_t *tofl_p; /* Pointer to TOF left struct */ struct tof_t *tofr_p; /* Pointer to TOF right struct */ struct tof_t *tofgl_p; /* Pointer to left grid TOF struct */ struct tof_t *tofgr_p; /* Pointer to right grid TOF struct */ struct veto_t *veto_p; /* Pointer to VETO struct */ struct ring_t *ring_p; /* Pointer to RING struct */ struct beam_t *beam_p; /* Pointer to BEAM struct */ struct sihodo_t *sihodo_p; /* Pointer to SIHODO struct */ void *global_p; /* Pointer to future global ev. str. */ } event_t; typedef struct event_t event DS_VARIABLE; /**************************** TPC ***********************************/ /*--------------------------- bos -------------------------------------*/ typedef struct bos_t DS_TEMPLATE { /* raw data header */ int_t name_bos; /* BOS name */ int_t number_bos; /* BOS number */ int_t length_bos; /* BOS length in words */ int_t index; /* index to start of this bank in raw data */ } bos_t; typedef struct bos_t bos DS_VARIABLE; typedef struct bos_t bos_vt1 DS_VARIABLE; typedef struct bos_t bos_vt2 DS_VARIABLE; typedef struct bos_t bos_mtr DS_VARIABLE; typedef struct bos_t bos_mtl DS_VARIABLE; /*-----------------------------------------------------------------------*/ typedef struct bos_data_t DS_TEMPLATE { /* raw data */ int_t data[2]; /* ADC data packed in BOS format */ } bos_data_t; typedef struct bos_data_t bos_data DS_VARIABLE; /*-------------------------- detector header ------------------------------*/ typedef struct tpc_t DS_TEMPLATE { int_t n_point; /* number of points in detector */ int_t n_itrack; /* number of itracks in detector */ int_t n_rtrack; /* number of rtracks in detector */ int_t n_vertex; /* number of vertices in detector */ float_t v_drift; /* cm/us (used for reconstruction ) */ int_t iflag_vdrift;/* flags origin of used v_drift */ float_t t_offset; /* time offset incl. clock jitter (used) */ float_t pressure; /* pressure in mb (used) */ float_t gas_gain; /* gas gain (used) */ float_t temperature; /* gas temperature (used) */ struct point_t *point_p; /* ptr to first detector point */ struct itrack_t *itrack_p; /* ptr to first detector itrack */ struct rtrack_t *rtrack_p; /* ptr to first detector rtrack */ struct vertex_t *vertex_p; /* ptr to first detector vertex */ struct vertex_t *main_vertex_p; /* ptr to main vertex for detector*/ } tpc_t; typedef struct tpc_t vt1 DS_VARIABLE; typedef struct tpc_t vt2 DS_VARIABLE; typedef struct tpc_t mtl DS_VARIABLE; typedef struct tpc_t mtr DS_VARIABLE; typedef struct tpc_t all DS_VARIABLE; /*------------------- coded point structure ------------------------------*/ typedef struct point_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; /* bitmask of information */ int_t position; /* sec row position and pad & time sizes */ int_t charge; /* total charge and max_adc */ float_t x; /* positions in external coordinates */ float_t y; float_t z; int_t sigma; /* Uncertainty in the position of the point */ int_t variance; /* Width of the cluster */ void *irtrack_p; /* ptr to itrack/rtrack to which this belongs */ struct point_t *next_tpoint_p; /* pointer to next point on rtrack */ } point_t; typedef struct point_t point_vt1 DS_VARIABLE; typedef struct point_t point_vt2 DS_VARIABLE; typedef struct point_t point_mtl DS_VARIABLE; typedef struct point_t point_mtr DS_VARIABLE; /* Packing Conventions: */ /* position contains in the following information in the specified bits: */ /* 0-7 absolute row number, 1-234 */ /* 8-12 sector number, 1-6 (VTPC) or 1-25 (MTPC) */ /* 13-17 row number, 1-18 */ /* 18-20 detector number, 1-4 */ /* 21-24 number of pads */ /* 25-30 number of time slices from end to end */ /* charge contains the following information in the specified bits: */ /* 0-23 Integrated/summed charge */ /* 24-31 The maximum ADC value contained in the cluster */ /* sigma and variance are packed in the following manner: */ /* sigma = (int) (sig_x*1000+0.5) + (int) (sig_y*1000+0.5) * 1000 * 10 */ /* variance = (int) (var_x*1000+0.5) + (int) (var_y*1000+0.5) * 1000 * 10 */ /* where sig_x/y and var_x/y are *positive* values in the range [0,10] cm */ /* with 3 digit precision for an overall possible resolution of 10 microns. */ /* C macros for packing and unpacking these values are in the file */ /* point_macros.h. The package ppacker provides functions for packing */ /* and unpacking entire points and fat points rather than the individual */ /* values. */ /*-------------------- decoded point ------------------------------------*/ /* Note: only for use for writing out points for viewing in PAW, etc. */ /* This structure should not be used in most programs because of its size. */ typedef struct point_fat_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; /* bit flag */ int_t id_det; /* detector ID number */ int_t n_sec; /* sector number */ int_t n_row; /* row number */ int_t abs_row; /* absolute row number, 1-234 */ int_t max_adc; /* maximum ADC count in the cluster */ int_t charge; /* integrated/summed charge of the cluster */ int_t n_pads; /* number of pads in the cluster */ int_t n_slices; /* number of timeslices the cluster spans */ float_t x; /* positions in external coordinates */ float_t y; float_t z; float_t sig_x; /* uncertainty of the point position */ float_t sig_y; float_t var_x; /* cluster width */ float_t var_y; float_t res_x; /* distance from the track */ float_t res_y; void *irtrack_p; /* ptr to the itrack/rtrack to which it belongs */ struct point_t *next_tpoint_p; /* pointer to next point on rtrack */ } point_fat_t; typedef struct point_fat_t point_fat_vt1 DS_VARIABLE; typedef struct point_fat_t point_fat_vt2 DS_VARIABLE; typedef struct point_fat_t point_fat_mtl DS_VARIABLE; typedef struct point_fat_t point_fat_mtr DS_VARIABLE; typedef struct mini_pnt_lst_t DS_TEMPLATE { /* list of mini points */ int_t packed_pos_amp; /* packed position and amplitude */ } mini_pnt_lst_t; typedef struct mini_pnt_hdr_t DS_TEMPLATE { /* header for mini pnt list */ int_t id_det; /* detector id */ int_t npoints_vt1; /* points on track in VT1 */ float_t z0_vt1; /* app. midplane of det. */ float_t mean_amp_vt1; /* mean amplitude of hits on track in VT1 */ struct mini_pnt_lst_t *mini_pnt_vt1_p; /* pointer to list of pnts. */ int_t npoints_vt2; /* points on track in VT2 */ float_t z0_vt2; /* app. midplane of det. */ float_t mean_amp_vt2; /* mean amplitude of hits on track in VT2 */ struct mini_pnt_lst_t *mini_pnt_vt2_p; int_t npoints_mtp; /* points on track in MTP */ float_t z0_mtp; /* app. midplane of det. */ float_t mean_amp_mtp; /* mean amplitude of hits on track in MTP */ struct mini_pnt_lst_t *mini_pnt_mtp_p; } mini_pnt_hdr_t; typedef struct mini_pnt_lst_t mini_pnt_lst DS_VARIABLE; typedef struct mini_pnt_hdr_t mini_pnt_hdr DS_VARIABLE; /*------------------------- itrack ---------------------------------*/ typedef struct itrack_t DS_TEMPLATE { /* Internal c.s. */ int_t iflag; /* Raw track flag */ int_t id_det; /* Detector id */ int_t n_point; /* Number of points */ int_t n_max_point; /* The maximum possible number of points */ int_t n_fit_point; /* Number of points used for the fit */ int_t n_dedx_point; /* number of dedx points */ float_t slope_xz; /* straight line slopes */ float_t slope_yz; /* yz */ float_t x; /* Point at reference surface (z=0) */ float_t y; /* y */ float_t pchi2_xz; /* P(chi^2,ndf) of fit */ float_t pchi2_yz; /* yz */ float_t tmean_charge; /* 'truncated mean' charge */ float_t var_tmean; /* Variance of 'trunc. mean' charge */ float_t x_first; /* First point on the track (measured) */ float_t y_first; /* y */ float_t z_first; /* z */ float_t x_last; /* Last point on the track (measured)*/ float_t y_last; /* y */ float_t z_last; /* z */ struct covar4x4_t *covar_p; /* Pointer to covariance matrix */ struct point_t *point_p; /* Pointer to first space point on itrack */ struct rtrack_t *rtrack_p; /* Pointer to rtrack */ struct itrack_t *next_p; /* Pointer to next detector itrack */ } itrack_t; typedef struct itrack_t itrack DS_VARIABLE; typedef struct covar4x4_t covar_itrack DS_VARIABLE; /*------------------------- rtrack ---------------------------------*/ typedef struct rtrack_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; /* Raw track flag */ int_t id_det; /* Detector id */ int_t n_point; /* Number of points */ int_t n_max_point; /* The maximum possible number of points */ int_t n_fit_point; /* Number of points used for the fit */ int_t n_dedx_point; /* number of dedx points */ float_t charge; /* Particle charge */ float_t qpxz; /* Momentum vector at fitted first point */ float_t tanl; /* tan(lam) */ float_t phi; /* azimuthal angle */ float_t x; /* x */ float_t y; /* y fitted first point */ float_t z; /* z */ float_t px; /* Momentum vector at fitted first point */ float_t py; /* */ float_t pz; /* */ float_t sig_px; /* Errors of px, py, pz */ float_t sig_py; /* */ float_t sig_pz; /* */ float_t pchi2; /* P(chi^2,ndf) of fit */ float_t tmean_charge; /* 'truncated mean' charge */ float_t var_tmean; /* Variance of 'trunc. mean' charge */ float_t x_first; /* First point on rtrack (measured) */ float_t y_first; /* y */ float_t z_first; /* z */ float_t x_last; /* Last point on rtrack (measured) */ float_t y_last; /* y */ float_t z_last; /* z */ struct covar5x5_t *covar_p; /* Pointer to covariance matrix */ struct point_t *point_p; /* Pointer to first space point on rtrack */ struct track_t *first_track_p; /* Ptr. to first trk gen. by rtrack */ void *itrack_p; /* Pointer to itrack */ struct rtrack_t *next_p; /* Pointer to next detector rtrack */ } rtrack_t; typedef struct rtrack_t rtrack DS_VARIABLE; typedef struct covar5x5_t covar_rtrack DS_VARIABLE; /*---------------------------- vertex -----------------------------------*/ /* Vertex flags: */ /* iflag = 0 vertex is the one found and fitted by vtx */ /* iflag = 1 z is taken from geom_target_t, x,y from bpd_vertex */ /* iflag = 2 vertex is taken from HEPDB (geom_target_t) */ typedef struct vertex_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; /* vertex flag */ int_t id_det; /* Detector id */ int_t id_vtx; /* vertex type */ int_t n_trk_fit; /* Number of tracks used for fit */ int_t n_trk_out; /* number of outgoing tracks */ float_t x; /* coordinates of vertex */ float_t y; /* y */ float_t z; /* z */ float_t sig_x; /* error of x */ float_t sig_y; /* error of y */ float_t sig_z; /* error of z */ float_t pchi2; /* P(chi^2,ndf) of vertex fit */ struct track_t *daughter_p; /* ptr to first daughter trk */ struct track_t *mother_p; /* ptr to mother trk */ void *covar_p; /* ptr to error matrix of vertex */ void *avertex_p; /* ptr to auxillary vertex struct */ struct kfit_t *kfit_p; /* ptr to kinematic fit struct */ struct vertex_t *next_p; /* ptr to next detector vertex */ } vertex_t; typedef struct vertex_t vertex DS_VARIABLE; typedef struct vertex_t vertex_fit DS_VARIABLE; typedef struct covar3x3_t covar_vtx_fit DS_VARIABLE; typedef struct covar9x9_t covar_v0_fit DS_VARIABLE; typedef struct covar9x9_t covar_kink_fit DS_VARIABLE; typedef struct covar13x13_t covar_tau_fit DS_VARIABLE; typedef struct covar13x13_t covar_xi_fit DS_VARIABLE; /*--------------------------- track -------------------------------------*/ /*----------- track momentum at the vertex point ------------------------*/ typedef struct track_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; /* track flag */ int_t id_det; /* detector id */ int_t n_fit_point; /* number of fitted points */ float_t qpxz; /* charge/pxz at the vertex */ float_t tanl; /* tangent of dip angle */ float_t phi; /* azimuthal angle */ float_t sig_qpxz; /* error on momentum */ float_t sig_tanl; /* */ float_t sig_phi; /* */ float_t px; /* momentum at vertex */ float_t py; /* */ float_t pz; /* */ float_t sig_px; /* error on momentum */ float_t sig_py; /* */ float_t sig_pz; /* */ float_t trk_length; /* trk length from vertex to z=400.0cm */ float_t pchi2; /* P(chi^2,ndf) of fit */ float_t bx; /* x_track-x_vertex at z_vertex */ float_t by; /* y_track-y_vertex at z_vertex */ struct rtrack_t *rtrack_p; /* ptr to rtrack */ struct vertex_t *start_vertex_p; /* ptr back to vertex */ struct vertex_t *stop_vertex_p; /* ptr to stop vertex of this track */ struct covar3x3_t *covar_p; /* ptr to error matrix (only track elements*/ struct atrack_t *atrack_p; /* ptr to additional track structure */ struct track_tof_t *track_tof_p; /* ptr to track_tof */ struct track_t *next_track_p; /* ptr to next trk of the same rtrk */ struct track_t *next_daughter_p; /* ptr to next daughter of the same vtx */ } track_t; typedef struct track_t track DS_VARIABLE; typedef struct covar3x3_t covar_track DS_VARIABLE; /*--------------------------- global tracks -----------------------------*/ typedef struct g_predict_pnt_t DS_TEMPLATE { /* predicted pseudo point */ float_t x; float_t y; float_t z; struct g_predict_pnt_t *next_p; /* next point on this track */ } g_predict_pnt_t; typedef struct g_ptr_list_t DS_TEMPLATE { /* list of rtrack pointers */ rtrack_t *rtrack_vt1_p; /* pointer to VTP1 rtrack */ rtrack_t *rtrack_vt2_p; /* pointer to VTP2 rtrack */ itrack_t *itrack_mtp_p; /* pointer to MTPC itrack */ rtrack_t *rtrack_mtp_p; /* pointer to MTPC rtrack */ rtrack_t *rtrack_glb_p; /* pointer to global rtrack */ struct g_predict_pnt_t *point_vt1_p; /* pointer to first point in vt1 */ struct g_predict_pnt_t *point_vt2_p; /* pointer to first point in vt2 */ struct g_predict_pnt_t *point_mtp_p; /* pointer to first point in mt */ } g_ptr_list_t; typedef struct g_predict_pnt_t g_predict_pnt DS_VARIABLE; typedef struct g_ptr_list_t g_ptr_list DS_VARIABLE; typedef struct rtrack_quali_t DS_TEMPLATE { /* rtrack quality measures */ int_t n_point[3]; /* number of points in subdets */ int_t n_max_point[3]; /* maximum possible number of points */ int_t n_unfold[3]; /* number of unfolded points */ int_t n_dedx_point[3];/* number of dedx points */ float_t dist_next; /* distance to closest track */ } rtrack_quali_t; typedef struct rtrack_quali_t rtrack_quali DS_VARIABLE; typedef struct g_track_ref_t DS_TEMPLATE { /* reference for global rtrack info */ struct g_ptr_list_t *g_ptr_list_p; /* global pointer list */ struct mini_pnt_hdr_t *mini_pnt_p; /* pointer to mini pointheader*/ struct rtrack_quali_t *quali_p; /* pointer to quality structure */ void *local_p; /* pointer to local rtrack values */ } g_track_ref_t; typedef struct g_track_ref_t g_track_ref DS_VARIABLE; /*----------------------------- avertex_v0 -------------------------------*/ typedef struct avertex_v0_t DS_TEMPLATE { /* Beam c.s. */ float_t px; /* momentum at vertex */ float_t py; /* y */ float_t pz; /* z */ float_t sig_px; /* error on momentum */ float_t sig_py; /* y */ float_t sig_pz; /* z */ float_t pt; /* transverse momentum */ float_t yla; /* lambda rapidity */ float_t yk0; /* k-short rapidity */ float_t alpha; /* Armenteros alpha */ float_t ptarm; /* Armenteros pt */ float_t mala; /* mass lambda hypothesis */ float_t malb; /* mass anti-lambda hypothesis */ float_t mak0; /* mass k-short hypothesis */ float_t xtarg; /* v0 impact position at the target */ float_t ytarg; /* y */ float_t ztarg; /* z */ float_t x1minx2; /* daughter position x1 minus x2 at target */ } avertex_v0_t; typedef struct avertex_v0_t avertex_v0 DS_VARIABLE; /*------------------------------- atrack -------------------------------*/ typedef struct atrack_t DS_TEMPLATE { /* Beam c.s. */ int_t iflag; /* iflag */ int_t id_det; /* Detector id */ int_t id_part; /* Particle id (Geant codes) */ float_t charge; /* Charge */ float_t px; /* px momentum at the vertex */ float_t py; /* py momentum */ float_t pz; /* pz (=pl) momentum */ float_t pt; /* transverse momentum */ float_t psi; /* azimuthal angle (x-y plane) */ float_t ypi; /* rapidity pion mass */ float_t ypr; /* rapidity proton mass */ float_t yka; /* rapidity kaon mass */ } atrack_t; typedef struct atrack_t atrack DS_VARIABLE; /*----------------- Kinematical Fits ------------------------------*/ typedef struct kfit_t DS_TEMPLATE { /* NA49 c.s. */ /*------------------------------------------------------------------*/ /* Kinematical fit types and hypthesis */ /* type = 1x (V0 fit) = vertex type */ /* 1 - L -> p+ + pi- (non-vertex constrain) */ /* 2 - AL -> pi+ + ap- (non-vertex constrain) */ /* 3 - K0 -> pi+ + pi- (non-vertex constrain) */ /* 4 - gamma -> e+ + e- (non-vertex constrain) */ /* 5 - L -> p+ + pi- (vertex constrain) */ /* 6 - AL -> pi+ + ap- (vertex constrain) */ /* 7 - K0 -> pi+ + pi- (vertex constrain) */ /* 8 - gamma -> e+ + e- (vertex constrain) */ /* type = 2x (kink fit) = vertex type */ /* 1 - K+/- -> mu+/- + nu */ /* 2 - K+/- -> pi+/- + pi0 */ /* 3 - pi+/- -> mu+/- + nu */ /* 4 - mu+/- -> e+/- + 2nu */ /* type = 3x (tau fit) = vertex type */ /* 1 - K+/- -> pi+/- + pi+/- + pi-/+ */ /* type = 4x (xi fit) = veretx type */ /* 1 - xi-/+ -> pi-/+ + Lambda/Antilambda */ /*------------------------------------------------------------------*/ int_t iflag; /* (0-unfitted,1-fitted,-1-error)*/ int_t id_det; /* detector id */ int_t id_type; /* fit type */ int_t id_hyp; /* fit hypothesis */ int_t n_trk; /* number of tracks fitted */ float_t chi2; /* fit chisq */ float_t pchi2; /* fit probability */ struct ktrack_t *ktrack_p; /* Pointer to first fitted track */ struct vertex_t *vertex_p; /* Pointer to vertex */ struct kfit_t *kfit_p; /* Pointer to next kfit */ } kfit_t; typedef struct kfit_t v0_kfit DS_VARIABLE; typedef struct kfit_t kink_kfit DS_VARIABLE; typedef struct kfit_t tau_kfit DS_VARIABLE; typedef struct kfit_t xi_kfit DS_VARIABLE; typedef struct ktrack_t DS_TEMPLATE { /* NA49 c.s. */ int_t iflag; float_t charge; float_t qpxz; float_t tanl; float_t phi; struct covar3x3_t *covar_p; /* Ptr to covar, only ktrack elements */ struct ktrack_t *next_vtx_ktrk_p; /* Pointer to the vertex ktrack */ } ktrack_t; typedef struct ktrack_t v0_ktrack DS_VARIABLE; typedef struct ktrack_t kink_ktrack DS_VARIABLE; typedef struct ktrack_t tau_ktrack DS_VARIABLE; typedef struct ktrack_t xi_ktrack DS_VARIABLE; typedef struct covar3x3_t covar_v0_ktrack DS_VARIABLE; typedef struct covar3x3_t covar_kink_ktrack DS_VARIABLE; typedef struct covar3x3_t covar_tau_ktrack DS_VARIABLE; typedef struct covar3x3_t covar_xi_ktrack DS_VARIABLE; /**************************** Beam *************************************/ typedef struct beam_t DS_TEMPLATE { /* BEAM Header: */ int_t s1; /* scalars - Station 1 */ int_t s2; int_t v0; int_t s4; int_t scl; int_t bs4; int_t bung; /* Station 2 */ int_t bgated; int_t bi; int_t trigger; int_t empty[14]; /* 2 words of station 2, station 3 and 4 */ int_t adc_s1; /* ADC-Data Station 7 */ int_t adc_s2; int_t adc_s3; int_t adc_empty[45]; /* 9 wds of stat. 7, stat. 8,9, and 10 */ int_t tdc_vtpc1; /* TDC-Data Station 11 */ int_t tdc_vtpc2; int_t tdc_mtpcl; int_t tdc_mtpcr; int_t tdc_empty[20]; /* 4 wds of stat. 11, stat. 12, and 13 */ int_t pat_unit_1; /* Pattern-Unit Station 14 */ int_t pat_unit_2; /* Station 15 */ int_t pat_unit_empty; /* Station 16 */ float_t version; /* structure version number */ } beam_t; typedef struct beam_t beam DS_VARIABLE; /************ Beam counters additional information ********************/ typedef struct beam_aux_t DS_TEMPLATE {/* Additional beam counter iformation */ int_t s3; /* s3 scaler */ int_t t0; /* t0 scaler */ int_t c1; /* c1 scaler */ int_t pulser_trigger; /* scaler slot #6 */ int_t adc_s4; /* scaler slot #8 */ int_t adc_t0; /* scaler slot #8 */ int_t adc_s1_new[12]; /* station #9 QS11,QS12,QS13,QS14 */ int_t tpc_phase; /* TPC clock - slot #11 */ int_t padc[8]; /* scaler slot #13 Peak-sensitive ADC */ int_t latch_scaler[32]; /* BPD stuff - slot # 17 */ int_t station5[11]; int_t station6[11]; int_t station8[7]; int_t station11[11]; int_t empty1[24]; /* 24 empty reads (udefined) (73-96) */ int_t empty2[8]; /* empty laser phase (113-120) */ int_t empty3[2]; /* empty pattern_unit (122-123) reads */ } beam_aux_t; typedef struct beam_aux_t beam_aux DS_VARIABLE; /************************ Si Hodoscope *************************************/ typedef struct sihodo_data_t DS_TEMPLATE { int_t iflag; /* quality flag (several clusters, missing ADC) */ int_t adc[192]; /* ADC values from strip 1 to 192 */ float_t mean; /* Centroid of highest cluster in strip units */ float_t rms; /* RMS width in strip units */ int_t maximum; /* maximum ADC value of cluster */ int_t charge; /* sum of ADC counts in highest cluster */ int_t sum_of_all; /* sum of all 192 ADC counts */ int_t detector; /* H1=1, V1=2, H2=3, V2=4 */ } sihodo_data_t; typedef struct sihodo_data_t sihodo_data DS_VARIABLE; /*---------------------------------------------------------------------*/ typedef struct sihodo_t DS_TEMPLATE { int_t iflag; /*quality flag */ float_t x; /* x offset in cm of beam in SIHODO system */ float_t slope_xz; /* xz slope of beam in SIHODO system */ float_t y; /* y offset in cm of beam in SIHODO system */ float_t slope_yz; /* yz slope of beam in SIHODO system */ float_t covar[10]; /* covariance matrix */ float_t z; /* z of xy calc in internal system */ float_t ext_x; /* x offset in cm in survey system at z = T1 */ float_t ext_slope_xz; /* xz slope of beam in survey system */ float_t ext_y; /* y offset in cm in survey system at z = T1 */ float_t ext_slope_yz; /* yz slope of beam in survey system */ float_t ext_z; /* z of xy calc in survey system (T1 if known) */ struct sihodo_data_t *h1_p; /* pointer to H1 data structure */ struct sihodo_data_t *v1_p; /* pointer to V1 data structure */ struct sihodo_data_t *h2_p; /* pointer to H2 data structure */ struct sihodo_data_t *v2_p; /* pointer to V2 data structure */ } sihodo_t; typedef struct sihodo_t sihodo DS_VARIABLE; /************************ Beam Position Detectors *************************/ typedef struct bpd_data_t DS_TEMPLATE { int_t iflag; /* quality flag (several clusters, missing ADC) */ int_t adc[16]; /* ADC values from strip 1 to 16 */ float_t mean; /* Centroid of highest cluster in strip units */ float_t rms; /* RMS width in strip units */ int_t maximum; /* maximum ADC value of cluster */ int_t charge; /* sum of ADC counts in highest cluster */ int_t sum_of_all; /* sum of all 192 ADC counts */ int_t detector; /* H1=1, V1=2, H2=3, V2=4, H3, V3, H4, V4=8 */ } bpd_data_t; typedef struct bpd_data_t bpd_data DS_VARIABLE; /*---------------------------------------------------------------------*/ typedef struct bpd_t DS_TEMPLATE { int_t iflag; /*quality flag */ float_t x; /* x offset in cm of beam in SIHODO system */ float_t slope_xz; /* xz slope of beam in SIHODO system */ float_t y; /* y offset in cm of beam in SIHODO system */ float_t slope_yz; /* yz slope of beam in SIHODO system */ float_t covar[10]; /* covariance matrix */ float_t z; /* z of xy calc in internal system */ float_t ext_x; /* x offset in cm in survey system at z = T1 */ float_t ext_slope_xz; /* xz slope of beam in survey system */ float_t ext_y; /* y offset in cm in survey system at z = T1 */ float_t ext_slope_yz; /* yz slope of beam in survey system */ float_t ext_z; /* z of xy calc in survey system (T1 if known) */ struct bpd_data_t *h1_p; /* pointer to H1 data structure */ struct bpd_data_t *v1_p; /* pointer to V1 data structure */ struct bpd_data_t *h2_p; /* pointer to H2 data structure */ struct bpd_data_t *v2_p; /* pointer to V2 data structure */ struct bpd_data_t *h3_p; /* pointer to H3 data structure */ struct bpd_data_t *v3_p; /* pointer to V3 data structure */ struct bpd_data_t *h4_p; /* pointer to H4 data structure */ struct bpd_data_t *v4_p; /* pointer to V4 data structure */ } bpd_t; typedef struct bpd_t bpd DS_VARIABLE; typedef struct bpd_vertex_t DS_TEMPLATE { int_t iflag; /*quality flag */ float_t x; /* x vertex of target T1 */ float_t y; /* y vertex of target T1 */ float_t z; /* z vertex of target T1 */ float_t sx; /* sigma x */ float_t sy; /* sigma y */ float_t sz; /* sigma z */ } bpd_vertex_t; typedef struct bpd_vertex_t bpd_vertex DS_VARIABLE; /******************** Central Multiplicity Detector *********************/ typedef struct cmd_data_t DS_TEMPLATE { int_t wire[8]; } cmd_data_t; typedef struct cmd_t DS_TEMPLATE { int_t n_wires; /* Number of wires with signal */ int_t n_clusters; /* Number of clusters */ int_t adc[12]; /* Measured total ADC value */ cmd_data_t *data_p; } cmd_t; typedef struct cmd_hit_t DS_TEMPLATE { /* Centrality Det. Hit */ int_t n_pads; /* number of hitted pads */ float_t x; /* x coordinate of hit */ float_t y; /* y coordinate of hit */ float_t z; /* z coordinate of hit */ struct cmd_hit_t *next_p; /* Pointer to next CMD point */ } cmd_hit_t; typedef struct cmd_t cmd DS_VARIABLE; typedef struct cmd_data_t cmd_data DS_VARIABLE; typedef struct cmd_hit_t cmd_hit DS_VARIABLE; /*************************** Ring Calorimeter ****************************/ typedef struct ring_t DS_TEMPLATE { /* RING CALO Header: */ int_t adc_photon[240]; /* Stations 1-20 of Crate 2 */ int_t adc_hadron[240]; /* Stations 1-20 of Crate 3 */ float_t version; /* structure version number */ } ring_t; typedef struct ring_cal_t DS_TEMPLATE { /* Calibrated RING CALO */ float_t adc_photon[240]; /* Stations 1-20 of Crate 2 */ float_t adc_hadron[240]; /* Stations 1-20 of Crate 3 */ float_t energy; /* Total energy */ } ring_cal_t; typedef struct ring_t ring DS_VARIABLE; typedef struct ring_cal_t ring_cal DS_VARIABLE; /****************************** Veto Calorimeter **************************/ typedef struct veto_t DS_TEMPLATE { /* VETO CALO Header */ int_t adc_photon[4]; /* Stations 21 */ int_t adc_hadron[4]; int_t adc_empty[4]; int_t atten_photon[4]; /* Stations 22 */ int_t atten_hadron[4]; int_t atten_empty[4]; float ped_photon[4]; /* Photon pedestals used */ float ped_hadron[4]; /* Hadron pedestals used */ float gev_veto; /* Calibration constant used */ float eveto; /* Veto energy - calibrated */ float_t version; /* structure version number */ } veto_t; typedef struct veto_t veto DS_VARIABLE; /*************************** PEDESTALS **********************************/ typedef struct pedestal_t DS_TEMPLATE { /* CAMAC pedestals */ float_t value; /* pedestal value */ float_t sigma; /* pedestal sigma */ } pedestal_t; typedef struct pedestal_t trigger_ped DS_VARIABLE; typedef struct pedestal_t bpd_ped DS_VARIABLE; typedef struct pedestal_t veto_ped DS_VARIABLE; typedef struct pedestal_t ring_hadron_ped DS_VARIABLE; typedef struct pedestal_t ring_photon_ped DS_VARIABLE; typedef struct pedestal_t bpd_gain DS_VARIABLE; typedef struct rel_gains_t DS_TEMPLATE { /* BPD relative gain factors */ float_t value; /* gain factors value */ float_t sigma; /* gain factors sigma */ } rel_gains_t; typedef struct rel_gains_t bpd_rel_gains DS_VARIABLE; /***************************** TOF ***********************************/ /*---------------------------- bos --------------------------------------*/ typedef struct bos_tof_t DS_TEMPLATE { /* TOF raw data */ int_t data[2000]; /* TOF data packed in BOS format */ } bos_tof_t; typedef struct bos_tof_t bos_tofr DS_VARIABLE; typedef struct bos_tof_t bos_tofl DS_VARIABLE; /*-----------------------------------------------------------------------*/ typedef struct bos_gtof_t DS_TEMPLATE { /* Grid TOF raw data */ int_t data[800]; /* Grid TOF data packed in BOS format */ } bos_gtof_t; /* left and right together */ typedef struct bos_gtof_t bos_gtof DS_VARIABLE; /*------------------------ detector header ----------------------------*/ typedef struct tof_t DS_TEMPLATE { /* TOF Header */ int_t iflag; /* 1 if can use the tof inf. */ int_t n_mtpc; /* # of tracks hited the wall */ int_t n_mtpc_match; /* # of tracks matched whit tof */ int_t n_actdet; /* # of active detectors */ int_t n_match; /* # of used tof hits */ struct track_tof_t *track_tof_p; /* ptr to the first track_tof*/ struct tof_hits_t *hits_tof_p; /* ptr to the first hit_tof */ } tof_t; typedef struct tof_t tofl DS_VARIABLE; typedef struct tof_t tofr DS_VARIABLE; typedef struct tof_t tofgl DS_VARIABLE; typedef struct tof_t tofgr DS_VARIABLE; /*----------------------------- tof hits ------------------------------*/ typedef struct tof_hits_t DS_TEMPLATE { /* TOF */ int_t iflag; /* 1 if can use the tof information */ int_t id_det; /* Detector id. */ int_t id_pm; /* PM number */ int_t n_tracks; /* # of candidate tracks */ float_t TDC; /* tof measured by the PM in ns. */ float_t QDC; /* Normalized amplitude */ struct track_t *track_p1; /* Pointer to 1. track candidate */ struct track_t *track_p2; /* Pointer to 2. track candidate */ struct track_t *track_p3; /* Pointer to 3. track candidate */ } tof_hits_t; typedef struct tof_hits_t tof_hits DS_VARIABLE; /*----------------------------- track --------------------------------*/ typedef struct track_tof_t DS_TEMPLATE { /* final PID from TOFR */ int_t iflag; /* quality flag */ int_t id_det; /* detector id number */ int_t id_pm; /* PM number */ float_t x; /* hit position in det coord. */ float_t y; /* */ float_t pathl; /* tracklength from target to det */ float_t charge; /* normalized QDC signal */ float_t tof; /* time of flight from target to det */ float_t sig_tof; /* sigma of tof */ float_t beta; /* pathl/tof/c */ float_t sig_beta; /* sigma of beta */ float_t mass2; /* squared mass */ float_t sig_mass2; /* sigma of mass2 */ struct track_t *track_p; /* ptr to track_t */ struct tof_hits_t *hits_tof_p; /* ptr to the hits if it is a single det. */ struct track_tof_t *next_tof_p; /* next tof-track associated w/ same track */ struct track_tof_t *next_p; /* next detector track_tof */ } track_tof_t; typedef struct track_tof_t track_tof DS_VARIABLE; /* ----------------- PesTOF stuctures --------------*/ typedef struct pestof_data_t DS_TEMPLATE { int_t data; } pestof_data_t; typedef struct bos_pestof_t DS_TEMPLATE { int_t event_id; /* 1. word in raw bos bank */ int_t event_date; /* 2. word in raw bos bank */ int_t event_num; /* 3. word in raw bos bank */ pestof_data_t *data_slow_p; /* 4-10. words in raw bos bank */ pestof_data_t *data_event_p; /* 5-ende */ } bos_pestof_t; typedef struct bos_pestof_t bos_pestof DS_VARIABLE; typedef struct pestof_data_t pestof_data DS_VARIABLE; typedef struct pestof_data_t pestof_slow DS_VARIABLE; /**************************** Monitor *************************************/ typedef struct monitor_tpc_t DS_TEMPLATE { int_t n_run; /* run number */ int_t n_event; /* event number */ int_t date; /* date from event structure */ int_t time; /* time from event structure */ int_t n_point; /* number of points */ int_t n_itrack; /* number of itracks */ int_t n_rtrack; /* number of rtracks */ int_t n_rtrack_kpass; /* number of rtracks found in kink finder passes */ int_t n_track; /* number of tracks */ int_t n_vertex; /* number of vertices found */ int_t sum_adc; /* sum of all rawdata ADC counts */ float_t tmean_charge; /* mean of the truncated mean charge */ float_t avg_res_x; /* mean abs x residuum of all i/rtracks */ float_t avg_res_y; /* mean abs y residuum of all i/rtracks */ float_t cur_vdrift; /* vdrift for this event from charge step */ float_t ave_vdrift; /* the running average vdrift from charge step */ float_t raw_vdrift; /* vdrift from raw data */ float_t mon_vdrift; /* processed time dependent drivt velocity (S') */ int_t iflag_vd_mod; /* the success flag of the vdrift module */ float_t gas_gain; /* gain factor from raw data */ float_t evt_gain; /* eventwise gain factor */ float_t temperature; /* temperature from raw data */ float_t pressure; /* pressure from raw data */ } monitor_tpc_t; typedef struct monitor_tpc_t monitor_vt1 DS_VARIABLE; typedef struct monitor_tpc_t monitor_vt2 DS_VARIABLE; typedef struct monitor_tpc_t monitor_mtl DS_VARIABLE; typedef struct monitor_tpc_t monitor_mtr DS_VARIABLE; typedef struct monitor_tpc_t monitor_all DS_VARIABLE; typedef struct monitor_tof_t DS_TEMPLATE { int_t n_run; /* run number */ int_t n_event; /* event number */ int_t date; /* date from event structure */ int_t time; /* time from event structure */ int_t n_mtpc; /* # of tracks hited the wall */ int_t n_mtpc_match; /* # of tracks matched whit tof */ int_t n_actdet; /* # of active detectors */ int_t n_match; /* # of used tof hits */ float_t tmean; /* average corrected TDC signal */ float_t sig_tmean; /* rms of tmean */ float_t qmean; /* average corrected QDC signal */ float_t sig_qmean; /* rms of qmean */ } monitor_tof_t; typedef struct monitor_tof_t monitor_tofl DS_VARIABLE; typedef struct monitor_tof_t monitor_tofr DS_VARIABLE; typedef struct monitor_tof_t monitor_tofgl DS_VARIABLE; typedef struct monitor_tof_t monitor_tofgr DS_VARIABLE; /**************************************************************************/ #endif /* _na49_event_str_included_ */