1 |
// |
// |
2 |
// Check the calorimter calibrations - Emiliano Mocchiutti |
// Check the calorimter calibrations - Emiliano Mocchiutti |
3 |
// |
// |
4 |
// FCaloCHKCALIB.c version 1.13 (2006-09-22) |
// FCaloCHKCALIB.c version 1.14 (2007-07-18) |
5 |
// |
// |
6 |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
7 |
// |
// |
8 |
// Changelog: |
// Changelog: |
9 |
// |
// |
10 |
|
// 1.12 - 1.14 (2007-07-18): 05953 bug fixed (infinite loop). |
11 |
|
// |
12 |
// 1.12 - 1.13 (2006-09-22): Set upper limit in calvar plot. |
// 1.12 - 1.13 (2006-09-22): Set upper limit in calvar plot. |
13 |
// |
// |
14 |
// 1.07 - 1.12 (2006-08-04): bugs fixed. |
// 1.07 - 1.12 (2006-08-04): bugs fixed. |
33 |
// |
// |
34 |
#include <iostream> |
#include <iostream> |
35 |
#include <fstream> |
#include <fstream> |
36 |
|
#include <cstdlib> |
37 |
// |
// |
38 |
|
#include <TROOT.h> |
39 |
#include <TTree.h> |
#include <TTree.h> |
40 |
#include <TObject.h> |
#include <TObject.h> |
41 |
#include <TString.h> |
#include <TString.h> |
314 |
Int_t s = 0; |
Int_t s = 0; |
315 |
obt = cpuhead[hi]; |
obt = cpuhead[hi]; |
316 |
// printf(" qui cpu header : %i hi %i entry %i \n",obt,hi,ci); |
// printf(" qui cpu header : %i hi %i entry %i \n",obt,hi,ci); |
317 |
while ( labs((Int_t)(obt-cpuhead[hi])) < 100000 && ci < maxev){ |
if ( !obt ) break; |
318 |
|
while ( (labs((Int_t)(obt-cpuhead[hi])) < 100000 && ci < maxev) || !cpuobt ){ |
319 |
|
|
320 |
tr->GetEntry(ci);//sceglie la entry (calibrazione)del tree in cui ho tutte le sottostrutture |
tr->GetEntry(ci);//sceglie la entry (calibrazione)del tree in cui ho tutte le sottostrutture |
321 |
// tr->GetEntry(ci+s);//sceglie la entry (calibrazione)del tree in cui ho tutte le sottostrutture |
// tr->GetEntry(ci+s);//sceglie la entry (calibrazione)del tree in cui ho tutte le sottostrutture |
593 |
incalvar++; |
incalvar++; |
594 |
}; |
}; |
595 |
calbase->Fill((float)g,(float)calib.calbase[l][m][n]);//controlla baseline |
calbase->Fill((float)g,(float)calib.calbase[l][m][n]);//controlla baseline |
596 |
if ( calib.calbase[l][m][n] > 4500. || calib.calbase[l][m][n] < 2000. ){ |
if ( calib.calbase[l][m][n] > 5500. || calib.calbase[l][m][n] < 2000. ){ |
597 |
outcalbas++; |
outcalbas++; |
598 |
} else { |
} else { |
599 |
incalbas++; |
incalbas++; |
945 |
calbase->SetYTitle("ADC channels"); |
calbase->SetYTitle("ADC channels"); |
946 |
calbase->Draw(); |
calbase->Draw(); |
947 |
Double_t xg[4] = {0.,264.,264.,0.}; |
Double_t xg[4] = {0.,264.,264.,0.}; |
948 |
Double_t yg[4] = {2000.,2000.,4500.,4500.}; |
Double_t yg[4] = {2000.,2000.,5500.,5500.}; |
949 |
banda1 = new TPolyLine(4,xg,yg); |
banda1 = new TPolyLine(4,xg,yg); |
950 |
banda1->SetLineColor(5); |
banda1->SetLineColor(5); |
951 |
banda1->SetFillColor(5); |
banda1->SetFillColor(5); |
1052 |
pad3->Draw(); |
pad3->Draw(); |
1053 |
pad4->Draw(); |
pad4->Draw(); |
1054 |
// |
// |
1055 |
char *sezione = 0; |
const char *sezione = ""; |
1056 |
for (Int_t si = 0; si < 4; si++){ |
for (Int_t si = 0; si < 4; si++){ |
1057 |
if (si == 2) |
if (si == 2) |
1058 |
{ |
{ |