#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "TH1.h"
#include "TFile.h"
#include "TTree.h"
#include "CSCEvent.h"
#include "CSCHitList.h"
#include "CalServer.h"
#include "GeoServer.h"
Defines | |
| #define | maxSize 4000*32 |
| Buffer size for an entire ATLAS event. | |
| #define | maxChamber 32 |
| allocate space for all 32 chambers | |
Functions | |
| void | linfit (double x[], double y[], int ndata, double sig[], int mwt, double *a, double *b, double *siga, double *sigb, double *chi2) |
| line fit from numerical recipes | |
| void | linfit2 (double x[], double y[], int ndata, double sig[], double *a, double *b, double *siga, double *sigb, double *chi2) |
| line fit from numerical recipes with outliers de-weighted | |
| int | main (int argc, char *argv[]) |
| main program | |
The unbiased hits can be used to get efficiencies of sparsification or reconstruction.
This application selects events with one X hit per layer in the outer chambers. If a layer has more than one X hits, the larger hit is used. This prevents the efficiency loss from spurious hits (due to crosstalk).
The X hits are matched to Y hits. If there is no Y hit with a similar amplitude, the Y hit is null.
The X hits are fitted to a straight line and events with bad chi squared are rejected. The Y hits are also fitted, but there is no rejection. In both cases, only non-saturated and well-shaped hits are used in the line fit. The Z positions are 441mm per chamber and 26.1mm per layer. No corrections to the positions are applied yet.
The variables of the tree are stored in nobi_t.
This includes alignment.
|
||||||||||||||||||||||||||||||||||||||||||||
|
line fit from numerical recipes Given a set of points x[0..ndata-1], y[0..ndata-1] with standard deviations sig[0..ndata-1], fit them to a straight line y = a+bx by minimizing chi-squared. Returned are a,b and their respective probable uncertainties siga and sigb, the chi-square chi2. If mwt = 0 on input, then the standard deviations are assumed to be unavailable: the normalization of chi2 is to unit standard deviation on all points.
|
|
||||||||||||||||||||||||||||||||||||||||
|
line fit from numerical recipes with outliers de-weighted Given a set of points x[0..ndata-1], y[0..ndata-1] with standard deviations sig[0..ndata-1], fit them to a straight line y = a+bx by minimizing chi-squared. Returned are a,b and their respective probable uncertainties siga and sigb, the chi-square chi2. If mwt = 0 on input, then the standard deviations are assumed to be unavailable: the normalization of chi2 is to unit standard deviation on all points.
|
|
||||||||||||
|
main program the reconstructed x position in strip units for each layer. the left strip amplitude for ach layer. the center strip amplitude for each layer. the right strip amplitude for each layer. the amplitude for each layer two strips to the right. the amplitude for each layer two strips to the left. the center strip number for each layer. the reconstructed y position in strip units for each layer. the left amplitude for each layer. the center amplitude for each layer. the right amplitude for each layer. the center strip number for each layer. the event number increments accross data files. the intercept of the X line fit. the slope of the X line fit. the error of the intercept of the X line fit. the error of the slope of the X line fit. the chi squared of the X line fit. the predicted X position in strips from the line fit for each layer. the measured X position in mm after alignment the Z position of each layer. the charge-profile chi squared for each X layer. the charge-profile chi squared for each Y layer. the predicted Y position in strips from the line fit for each layer. the measured Y position in mm after alignment the intercept of the Y line fit. the slope of the Y line fit. the error of the intercept of the Y line fit. the error of the slope of the Y line fit. the chi squared of the X line fit. the number of good X hits used to fit this track. the number of good Y hits used to fit this track. the peaking time of the X hit the peaking time of the Y hit the sampling phase 0 or 1 for each chamber |
1.3.9.1