| 9 |
#define NTRKMAX 10 |
#define NTRKMAX 10 |
| 10 |
#define NSINGMAX 100 |
#define NSINGMAX 100 |
| 11 |
|
|
| 12 |
|
#include <CalibTrk1Event.h> |
| 13 |
|
#include <CalibTrk2Event.h> |
| 14 |
|
|
| 15 |
#include <TString.h> |
#include <TString.h> |
| 16 |
#include <TFile.h> |
#include <TFile.h> |
| 17 |
|
#include <TTree.h> |
| 18 |
|
|
| 19 |
|
#include <fstream> |
| 20 |
|
#include <iostream> |
| 21 |
/** |
/** |
| 22 |
* \brief Struct to pass calibration data to F77 routines |
* \brief Struct to pass calibration parameters to F77 routines |
| 23 |
*/ |
*/ |
| 24 |
struct cTrkCalib { |
struct cTrkCalib { |
| 25 |
|
|
| 26 |
float pedestal[128][24][12]; |
float pedestal[128][24][12]; |
| 27 |
float pedestal_t[128][24][12]; |
float pedestal_t[128][24][12]; |
| 28 |
float sigma[128][24][12]; |
float sigma[128][24][12]; |
| 29 |
float sigma_t[128][24][12]; |
float sigma_t[128][24][12]; |
| 30 |
int bad[128][24][12]; |
int bad[128][24][12]; |
| 31 |
|
|
| 32 |
void FillFrom(TFile* , Int_t , Int_t ); |
void FillACalibFrom(TFile* , Int_t , Int_t ); |
| 33 |
|
void FillFCalibFrom(TFile* , Int_t , Int_t ); |
| 34 |
|
void FillTCalibFrom(TFile* , Int_t , Int_t ); |
| 35 |
|
void FillTCalibFrom(TString); |
| 36 |
|
|
| 37 |
}; |
}; |
| 38 |
// ================================================================== |
// ================================================================== |
| 39 |
/** |
/** |
| 84 |
int indmax[500]; |
int indmax[500]; |
| 85 |
int totCLlength; |
int totCLlength; |
| 86 |
float clsignal[8500]; |
float clsignal[8500]; |
| 87 |
float cnev[24][12]; |
float cnev[24][12]; |
| 88 |
|
float cnevflag[24][12]; |
| 89 |
}; |
}; |
| 90 |
// ================================================================== |
// ================================================================== |
| 91 |
/** |
/** |
| 125 |
float dedx_x[NTRKMAX][6]; |
float dedx_x[NTRKMAX][6]; |
| 126 |
float dedx_y[NTRKMAX][6]; |
float dedx_y[NTRKMAX][6]; |
| 127 |
float bdl[NTRKMAX]; |
float bdl[NTRKMAX]; |
| 128 |
|
|
| 129 |
|
void InitcTrkLevel2(){ |
| 130 |
|
|
| 131 |
|
good2 = 0; |
| 132 |
|
for(Int_t i=0; i<12 ; i++) |
| 133 |
|
crc[i] = 0; |
| 134 |
|
// ---------------------------- |
| 135 |
|
nclsx = 0; |
| 136 |
|
nclsy = 0; |
| 137 |
|
for(Int_t i=0; i<NSINGMAX ; i++){ |
| 138 |
|
planex[i] = 0; |
| 139 |
|
xs[i][0] = 0; |
| 140 |
|
xs[i][1] = 0; |
| 141 |
|
signlxs[i] = 0; |
| 142 |
|
planey[i] = 0; |
| 143 |
|
ys[i][0] = 0; |
| 144 |
|
ys[i][1] = 0; |
| 145 |
|
signlys[i] = 0; |
| 146 |
|
} |
| 147 |
|
// ---------------------------- |
| 148 |
|
ntrk =0 ; |
| 149 |
|
|
| 150 |
|
for(Int_t i=0; i<NTRKMAX ; i++){ |
| 151 |
|
image[i] = 0; |
| 152 |
|
chi2_nt[i] = 0; |
| 153 |
|
bdl[i] = 0; |
| 154 |
|
|
| 155 |
|
for(Int_t ii=0; ii<5 ; ii++){ |
| 156 |
|
al_nt[i][ii] = 0; |
| 157 |
|
for(Int_t iii=0; iii<5 ; iii++) |
| 158 |
|
coval[i][ii][iii] = 0; |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
for(Int_t ii=0; ii<6 ; ii++){ |
| 162 |
|
xm_nt[i][ii] = 0; |
| 163 |
|
ym_nt[i][ii] = 0; |
| 164 |
|
zm_nt[i][ii] = 0; |
| 165 |
|
resx_nt[i][ii] = 0; |
| 166 |
|
resy_nt[i][ii] = 0; |
| 167 |
|
xgood_nt[i][ii] = 0; |
| 168 |
|
ygood_nt[i][ii] = 0; |
| 169 |
|
xv_nt[i][ii] = 0; |
| 170 |
|
yv_nt[i][ii] = 0; |
| 171 |
|
zv_nt[i][ii] = 0; |
| 172 |
|
axv_nt[i][ii] = 0; |
| 173 |
|
ayv_nt[i][ii] = 0; |
| 174 |
|
dedx_x[i][ii] = 0; |
| 175 |
|
dedx_y[i][ii] = 0; |
| 176 |
|
} |
| 177 |
|
} |
| 178 |
|
} |
| 179 |
|
|
| 180 |
}; |
}; |
| 181 |
// ================================================================== |
// ================================================================== |
| 182 |
/** |
/** |
| 185 |
struct cPath { |
struct cPath { |
| 186 |
char path[80]; |
char path[80]; |
| 187 |
int pathlen; |
int pathlen; |
| 188 |
int error; |
int error; |
|
int debug; |
|
| 189 |
/** |
/** |
| 190 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
| 191 |
*/ |
*/ |
| 192 |
void FillWith(TString s){ |
void FillWith(TString s){ |
| 193 |
pathlen = s.Length(); |
pathlen = s.Length(); |
| 194 |
const char *pc = s.Data(); |
const char *pc = s.Data(); |
| 195 |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
for(Int_t i=0; i<=pathlen; i++) path[i] = *pc++; |
| 196 |
}; |
}; |
| 197 |
|
|
| 198 |
void SetDebug(){ debug=1;}; |
|
|
|
|
| 199 |
}; |
}; |
| 200 |
|
|
| 201 |
// ================================================================== |
// ================================================================== |
| 206 |
char b_path[80]; |
char b_path[80]; |
| 207 |
int b_pathlen; |
int b_pathlen; |
| 208 |
int b_error; |
int b_error; |
|
int b_debug; |
|
| 209 |
int b_loaded; |
int b_loaded; |
| 210 |
/** |
/** |
| 211 |
* Fill the struct variables from a TString object and set |
* Fill the struct variables from a TString object and set |
| 221 |
* Fill the struct variables from a TString object |
* Fill the struct variables from a TString object |
| 222 |
*/ |
*/ |
| 223 |
int BIsLoaded(){ return b_loaded; }; |
int BIsLoaded(){ return b_loaded; }; |
|
void SetDebug(){ b_debug=1; }; |
|
| 224 |
|
|
| 225 |
}; |
}; |
| 226 |
|
|
| 227 |
|
// ================================================================== |
| 228 |
|
/** |
| 229 |
|
* \brief Struct to set debug mode in F77 routines |
| 230 |
|
*/ |
| 231 |
|
struct cDbg { |
| 232 |
|
int debug; |
| 233 |
|
int verbose; |
| 234 |
|
int warning; |
| 235 |
|
// bool debug; |
| 236 |
|
// bool verbose; |
| 237 |
|
void SetNone() {debug=0; verbose=0; warning=0;}; |
| 238 |
|
void SetWarning(){debug=0; verbose=0; warning=1;}; |
| 239 |
|
void SetVerbose(){debug=0; verbose=1; warning=1;}; |
| 240 |
|
void SetDebug() {debug=1; verbose=1; warning=1;}; |
| 241 |
|
}; |
| 242 |
|
|
| 243 |
|
extern "C" { |
| 244 |
|
extern struct cTrkCalib pedsigbad_; |
| 245 |
|
extern struct cTrkLevel0 level0event_; |
| 246 |
|
extern struct cTrkLevel1 level1event_; |
| 247 |
|
extern struct cTrkLevel2 level2event_; |
| 248 |
|
extern struct cPath path_; |
| 249 |
|
extern struct cBPath bpath_; |
| 250 |
|
extern struct cDbg dbg_; |
| 251 |
|
void fillpedsigfromdefault_(); |
| 252 |
|
int readmipparam_(); |
| 253 |
|
int readchargeparam_(); |
| 254 |
|
int readvkmask_(); |
| 255 |
|
int readalignparam_(); |
| 256 |
|
int readetaparam_(); |
| 257 |
|
void reductionflight_(int*); |
| 258 |
|
int analysisflight_(); |
| 259 |
|
} |
| 260 |
|
|
| 261 |
|
|
| 262 |
#endif |
#endif |
| 263 |
|
|