To run the program provide calibrations files in the directory calibration and masks file in the align_masks directory. You can use different masks to produce ntuples in the prod_masks and change the masks link in the prod directory. First of all, we have 2 possible positions for the chip under test, referred as demostrator 1 and demonstrator 2, so from the same run you can produce 2 different ntples. Both the db and h8 program need to know which demonstrator you want analise: this is done, on both programs, with the -cn switch where n=1 (default) or n=2. Input and output files (but the rd13 data file) contains somewhere in the name d1 or d2 to distinguish between the two. Then in all the following commands you should add the option -c1 to analyse data of DEM1 or -c2 DEM2 To analyse a run, first initialise the database db -innnn nnnn run number db has many options: check them with db -h Then run the program h8 4 times: h8 -s -nxxxx -- nnnn search hot strips xxxx how many events nnnn run to analyse h8 -e -nxxxx -- nnnn evaluate the eta for the telescope h8 -a0 -- nnnn align the telescope and the pixel (a file skim_nnnn.dat is produced and has to be deteted manually if you want to rerun the alignment. h8 -d -- nnnn produce the ntuple Format of the ntuple: common / track /xs1,xs2,xs3,xs4, + ys1,ys2,ys3,ys4, + ax,ay,bx,by,cx,cy, + ipatx,ipaty,chi2x,chi2y,prbx,prby, + tdc,xepi,yepi,xepo,yepo, + icoli,irowi,icolo,irowo, + yloc,xloc(1) common/hits/nphit,phit(6,20) common/pix_clust/nclu,cphit(23,20) xs, ys telescope coordinate ax,bx,cx ... track parameter (straight line or parabola) ipatx,ipaty points used in the track: 0 only 4 hits 1-4 2 hits in plane 1-4 5-8 missing hit plane ipatx-4 chi2,prob chisquare and probability of the fit tdc tdc raw data xepi,yepi track extrapolated to the pixel in the local reference frame of the pixel detector. Coordinate of the entrance point xepo,yepo Coordinate of the exit point icoli,irowi expected column and row at the entrance icolo,irowo expected column and row at the exit yloc,xloc(1) meaningful at 0 degree. Track coordinate with respecte to center of the expected hit pixel nphit number of pixel hits (max 20) phit(n,m) hit data of the mth hit n = 1 x coordinate n = 2 y coordinate n = 3 TOT n = 4 lvl1 of the hit n = 5 row n = 5 column nclu number of clusters in the pixel detector (max 20) cphit(n,m) data for the mth cluster n = 1 x coordinate n = 2 y coordinate n = 3 number of hits for this cluster n = 4 pointer to first hit (index in phit) n = 5 pointer to second hit ........ Files There are 3 input files needed (if missing, defaults are used: WARNING the defaults could nod be suited foe your analysis). The database file is created with the db command and later modified by h8. The calibration file contains calibration data for the TOT. Both 1998 and 1999 format are accepted. The so called mask file is as follows 10. 10. 10. 10. 10. 10. 10. 10. strip cluster ph thresholds 18. 18. 18. 18. 18. 18. 18. 18. high thresholds to start strip cluster 7. 7. 6. 6. 7. 9. 6. 6. low threshold to end a stripcluster 1 0 1 1 3 idral idcal idran idcan minlen 2 n lines defining the mask 0 15 0 153 17 159 ich1 ich2 ic1 ir1 ic2 ir2 first line of mask 0 15 10 0 17 159 last line of mask idral max delta_row allowed to cluster to hits (during alignment) idcal max delta_col " idran | as before but for analysis idcan | minln the cluster size has to be larger than the expeted size (for a given angle) minus minln the mask the following pixels are masked do ich=ich1,ich2 loop on chips do ic=ic1,ic2 loop on columns do ir=ir1,ir2 loop on rows pixel(ich,ic,ir) masked enddo enddo enddo Have fun. Francesco