| 2 |
* FTrkCalibQLook_BASIC.cxx |
* FTrkCalibQLook_BASIC.cxx |
| 3 |
* |
* |
| 4 |
* autor: D.Fedele |
* autor: D.Fedele |
| 5 |
* version v1r10 |
* version v1r11 |
| 6 |
* Parameters: |
* Parameters: |
| 7 |
* file - the data file to analyze |
* file - the data file to analyze |
| 8 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
| 19 |
#include <TTree.h> |
#include <TTree.h> |
| 20 |
#include <TStyle.h> |
#include <TStyle.h> |
| 21 |
#include <TString.h> |
#include <TString.h> |
| 22 |
|
#include <TAxis.h> |
| 23 |
|
#include <TH1F.h> |
| 24 |
|
#include <TROOT.h> |
| 25 |
|
#include <cstdlib> |
| 26 |
// |
// |
| 27 |
#include <PscuHeader.h> |
#include <PscuHeader.h> |
| 28 |
#include <EventHeader.h> |
#include <EventHeader.h> |
| 30 |
#include <CalibTrk2Event.h> |
#include <CalibTrk2Event.h> |
| 31 |
// |
// |
| 32 |
|
|
| 33 |
typedef struct caltrk_def{ |
struct caltrk_def{ |
| 34 |
Int_t good0[2]; |
Int_t good0[2]; |
| 35 |
Int_t daqmode[12]; |
Int_t daqmode[12]; |
| 36 |
Int_t dspnum[12]; |
Int_t dspnum[12]; |
| 78 |
Int_t nevents=0; |
Int_t nevents=0; |
| 79 |
Int_t minevent = 0; |
Int_t minevent = 0; |
| 80 |
Int_t maxevent = 0; |
Int_t maxevent = 0; |
| 81 |
ULong64_t OBT[2]; |
ULong_t OBT[2]; |
| 82 |
|
|
| 83 |
OBT[0]=0; |
OBT[0]=0; |
| 84 |
OBT[1]=0; |
OBT[1]=0; |
| 196 |
Int_t canvasx=900; |
Int_t canvasx=900; |
| 197 |
Int_t canvasy=1200; |
Int_t canvasy=1200; |
| 198 |
|
|
| 199 |
Int_t ndsp =0,alarm=0; |
Int_t alarm=0; |
| 200 |
Float_t pedav[12][12],pedavtemp[12][12],sigav[12][12],sigavtemp[12][12]; |
Float_t pedav[12][12],pedavtemp[12][12],sigav[12][12],sigavtemp[12][12]; |
| 201 |
Int_t flpedav[12][12],flsigav[12][12]; |
Int_t flpedav[12][12],flsigav[12][12]; |
| 202 |
Float_t siglimsup[12][12],sigliminf[12][12],pedlimsup[12][12],pedliminf[12][12]; |
Float_t siglimsup[12][12],sigliminf[12][12],pedlimsup[12][12],pedliminf[12][12]; |
| 345 |
} |
} |
| 346 |
} |
} |
| 347 |
|
|
| 348 |
Int_t nn,ok=0; |
Int_t nn=0,ok=0; |
| 349 |
|
|
| 350 |
// |
// |
| 351 |
// write warning if it occur |
// write warning if it occur |
| 352 |
for(Int_t n = 0; n<12; n++){ |
for(Int_t n = 0; n<12; n++){ |
| 353 |
|
|
| 354 |
ndsp = ctrk.dspnum[n]; |
if(ctrk.dspnum[n]==0) |
| 355 |
nn = ndsp-1; |
continue; |
| 356 |
|
nn = ctrk.dspnum[n]-1; |
| 357 |
|
|
| 358 |
for(Int_t iii=0;iii<3;iii++){ |
for(Int_t iii=0;iii<3;iii++){ |
| 359 |
if(ctrk.crc_c[nn][iii]!=0){ |
if(ctrk.crc_c[nn][iii]!=0){ |
| 420 |
space[wc]-=spacep; |
space[wc]-=spacep; |
| 421 |
} |
} |
| 422 |
|
|
| 423 |
if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ |
// if(ctrk.good0[0]==1 && ctrk.good0[1]==1){ |
| 424 |
// |
// |
| 425 |
// evaluate the mean value of the sigma and pedestal |
// evaluate the mean value of the sigma and pedestal |
| 426 |
for(Int_t j = 0; j < 3072; j++){ |
for(Int_t j = 0; j < 3072; j++){ |
| 481 |
} |
} |
| 482 |
} |
} |
| 483 |
} |
} |
| 484 |
} |
// } |
| 485 |
} |
} |
| 486 |
if(ok==0 && ctrk.good0[0]==1 && ctrk.good0[1]==1){ |
if(ok==0){ |
| 487 |
|
// if(ok==0 && ctrk.good0[0]==1 && ctrk.good0[1]==1){ |
| 488 |
if(space[wc]<=10){ |
if(space[wc]<=10){ |
| 489 |
wc+=1; |
wc+=1; |
| 490 |
flcanvas+=1; |
flcanvas+=1; |