/[PAMELA software]/DarthVader/ToFLevel2/inc/ToFCore.h
ViewVC logotype

Diff of /DarthVader/ToFLevel2/inc/ToFCore.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by mocchiut, Sat Jun 17 12:14:55 2006 UTC revision 1.5 by pam-de, Wed Apr 4 07:22:26 2007 UTC
# Line 3  Line 3 
3  #include <TSystem.h>  #include <TSystem.h>
4  #include <TSQLServer.h>  #include <TSQLServer.h>
5    
6    
7    /**
8     * \brief  Variables needed for ToF calculations: Raw data, calibration constants, etc...
9     */
10    
11  struct ToFInput {  struct ToFInput {
12    Double_t al_pp[5];   //! The alpha vector from the track fit
13    Float_t k_s11s31[24][2];    Double_t al_pp[5];  
14    //! The 24 k1 and k2 constants for S11-S31
15      Float_t k_s11s31[24][2];
16    //! The 24 k1 and k2 constants for S11-S32
17    Float_t k_s11s32[24][2];    Float_t k_s11s32[24][2];
18    //! The 18 k1 and k2 constants for S12-S31
19    Float_t k_s12s31[18][2];    Float_t k_s12s31[18][2];
20    //! The 18 k1 and k2 constants for S12-S32
21    Float_t k_s12s32[18][2];    Float_t k_s12s32[18][2];
22    //! The 6 k1 and k2 constants for S21-S31
23    Float_t k_S21S31[6][2];    Float_t k_S21S31[6][2];
24    //! The 6 k1 and k2 constants for S21-S32
25    Float_t k_S21S32[6][2];    Float_t k_S21S32[6][2];
26    //! The 6 k1 and k2 constants for S22-S31
27    Float_t k_S22S31[6][2];    Float_t k_S22S31[6][2];
28    //! The 6 k1 and k2 constants for S22-S32
29    Float_t k_S22S32[6][2];    Float_t k_S22S32[6][2];
30    //! The 16 k1 and k2 constants for S11-S21
31    Float_t k_s11s21[16][2];    Float_t k_s11s21[16][2];
32    //! The 16 k1 and k2 constants for S11-S22
33    Float_t k_s11s22[16][2];    Float_t k_s11s22[16][2];
34    //! The 12 k1 and k2 constants for S12-S21
35    Float_t k_s12s21[12][2];    Float_t k_s12s21[12][2];
36    //! The 12 k1 and k2 constants for S12-S22
37    Float_t k_s12s22[12][2];    Float_t k_s12s22[12][2];
38    //! parameters for the attenuation fit for S11
39    Float_t adcx11[2][8][2];    Float_t adcx11[2][8][2];
40    //! parameters for the attenuation fit for S12
41    Float_t adcx12[2][6][2];    Float_t adcx12[2][6][2];
42    //! parameters for the attenuation fit for S21
43    Float_t adcx21[2][2][2];    Float_t adcx21[2][2][2];
44    //! parameters for the attenuation fit for S22
45    Float_t adcx22[2][2][2];    Float_t adcx22[2][2][2];
46    //! parameters for the attenuation fit for S31
47    Float_t adcx31[2][3][2];    Float_t adcx31[2][3][2];
48    //! parameters for the attenuation fit for S32
49    Float_t adcx32[2][3][2];    Float_t adcx32[2][3][2];
50    //! constants for the time-walk for S11
51    Float_t tw11[8][2];    Float_t tw11[8][2];
52    //! constants for the time-walk for S12
53    Float_t tw12[6][2];    Float_t tw12[6][2];
54    //! constants for the time-walk for S21
55    Float_t tw21[2][2];    Float_t tw21[2][2];
56    //! constants for the time-walk for S22
57    Float_t tw22[2][2];    Float_t tw22[2][2];
58    //! constants for the time-walk for S31
59    Float_t tw31[3][2];    Float_t tw31[3][2];
60    //! constants for the time-walk for S32
61    Float_t tw32[3][2];    Float_t tw32[3][2];
62    //! constants to get the position from the timing for S11
63    Float_t y_coor_lin11[2][8];    Float_t y_coor_lin11[2][8];
64    //! constants to get the position from the timing for S12
65    Float_t y_coor_lin12[2][6];    Float_t y_coor_lin12[2][6];
66    //! constants to get the position from the timing for S21
67    Float_t y_coor_lin21[2][2];    Float_t y_coor_lin21[2][2];
68    //! constants to get the position from the timing for S22
69    Float_t y_coor_lin22[2][2];    Float_t y_coor_lin22[2][2];
70    //! constants to get the position from the timing for S31
71    Float_t y_coor_lin31[2][3];    Float_t y_coor_lin31[2][3];
72    //! constants to get the position from the timing for S32
73    Float_t y_coor_lin32[2][3];    Float_t y_coor_lin32[2][3];
74    //! raw ADC matrix 4x12 : 12 half-boards @ 4 channels
75    Int_t adc[12][4];    Int_t adc[12][4];
76    //! raw TDC matrix 4x12 : 12 half-boards @ 4 channels
77    Int_t tdc[12][4];    Int_t tdc[12][4];
78    //! patterntrig contains trigger information
79    Int_t patterntrig[6];    Int_t patterntrig[6];
80    Int_t ntrk;    Int_t ntrk;
81  };  };
82    
83    /**
84     * \brief  Internal output variables from ToF calculations: beta, etc...
85     *
86     * Look at ToFLevel2 class for the real Level2 ToF output
87     */
88    
89  struct ToFOutput {  struct ToFOutput {
90    //! beta track dependend, 12 measurements for the 12 combinations, beta[13] is weighted mean
91    Float_t beta_a[13];    Float_t beta_a[13];
92    //! internal variable: beta ToF standalone, 12 measurements for the 12 combinations, beta[13] is weighted mean
93    Float_t betatof_a[13];    Float_t betatof_a[13];
94    //! x-measurement using the TDC values and the calibration
95    Float_t xtofpos[3];    Float_t xtofpos[3];
96    //! y-measurement using the TDC values and the calibration
97    Float_t ytofpos[3];    Float_t ytofpos[3];
98    //! matrix 4x12 which contains the dEdx value for each PMT
99    Float_t adc_c[12][4];    Float_t adc_c[12][4];
100    //! internal variable: ToF standalone: matrix 4x12 which contains the dEdx value for each PMT
101    Float_t adctof_c[12][4];    Float_t adctof_c[12][4];
102    //! matrix 4x12 which contains the time-walk corrected TDC value for each PMT
103    Float_t tdc_c[12][4];    Float_t tdc_c[12][4];
104    Int_t  tof_i_flag[6];  //! internal variable: matrix is filled if beta is calculated
105      Int_t tofmask[12][4];
106    //! internal variable: number of the hitted paddle for each ToF layer from ToF standalone
107      Int_t tof_i_flag[6];
108    //! number of hitted paddle(s) from ToF standalone for each ToF layer: flag = flag + 2**(paddlenumber-1)
109    Int_t tof_j_flag[6];    Int_t tof_j_flag[6];
110    //! internal variable: array flagging the artificial ToF standalone ADCs, "0" if normal ADC value
111      Int_t adcflagtof[12][4];
112    //! internal variable: array is always "0" since there are no artificial TDC values with ToF standalone
113      Int_t tdcflagtof[12][4];
114    //! array flagging the artificial track dependend ADCs, "0" if normal ADC value
115      Int_t adcflag[12][4];
116    //! array flagging the artificial track dependend TDCs, "0" if normal TDC value
117      Int_t tdcflag[12][4];
118  };  };
119    
120  extern int ToFCore(ULong64_t run, TFile *file, TSQLServer *dbc, Int_t ToFargc, char *ToFargv[]);  extern int ToFCore(UInt_t run, TFile *file, TSQLServer *dbc, Int_t ToFargc, char *ToFargv[]);
121    
122  #endif  #endif
123    

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23