1 |
// |
// |
2 |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
// Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti |
3 |
// |
// |
4 |
// FCaloQLOOK.c version 1.08 (2006-05-29) |
// FCaloQLOOK.c version 1.11 (2006-07-17) |
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.07 - 1.08 (2006-05-29): Fixed bug in output filename when input is not in the form DW_YYMMDD_NNN. |
// 1.09 - 1.11 (2006-07-17): Adapted to flight conditions. |
11 |
|
// |
12 |
|
// 1.07 - 1.09 (2006-05-29): Fixed bug in output filename when input is not in the form DW_YYMMDD_NNN. Bug in latchup alarm not coming from the status word, fixed. |
13 |
// |
// |
14 |
// 1.06 - 1.07 (2006-05-23): Don't print warning in case of latchup not recognized from the status word, fixed. Added "expert" figures from 21 to 28 which appears only in the |
// 1.06 - 1.07 (2006-05-23): Don't print warning in case of latchup not recognized from the status word, fixed. Added "expert" figures from 21 to 28 which appears only in the |
15 |
// case of latchup alarm. |
// case of latchup alarm. |
43 |
#include <TPolyLine.h> |
#include <TPolyLine.h> |
44 |
#include <TStyle.h> |
#include <TStyle.h> |
45 |
#include <TSystem.h> |
#include <TSystem.h> |
46 |
|
#include <TApplication.h> |
47 |
// |
// |
48 |
#include <PamelaRun.h> |
#include <PamelaRun.h> |
49 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
86 |
return file2; |
return file2; |
87 |
} |
} |
88 |
|
|
89 |
void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "ps"){ |
void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "png", Bool_t iactive =false, Bool_t w4i=false){ |
90 |
gStyle->SetPaperSize(19.,25.); |
gStyle->SetPaperSize(19.,25.); |
91 |
const char* startingdir = gSystem->WorkingDirectory(); |
const char* startingdir = gSystem->WorkingDirectory(); |
92 |
// printf(" basename is %s \n",gSystem->BaseName(filename.Data())); |
// printf(" basename is %s \n",gSystem->BaseName(filename.Data())); |
93 |
// printf(" getfilename is %s \n",getFilename(filename).Data()); |
// printf(" getfilename is %s \n",getFilename(filename).Data()); |
94 |
if ( !strcmp(outDir.Data(),"") ) outDir = startingdir; |
if ( !strcmp(outDir.Data(),"") ) outDir = startingdir; |
95 |
// |
// |
96 |
|
TApplication *app = 0; |
97 |
|
if ( iactive ) app = new TApplication("app",0,0); |
98 |
// |
// |
99 |
ifstream myfile; |
ifstream myfile; |
100 |
myfile.open(filename.Data()); |
myfile.open(filename.Data()); |
117 |
Float_t ctshitthr = 0.65; |
Float_t ctshitthr = 0.65; |
118 |
Float_t cbasethr = 0.95; |
Float_t cbasethr = 0.95; |
119 |
Float_t cdexythr = 0.995; |
Float_t cdexythr = 0.995; |
120 |
|
//Float_t cdexythr = 0.90; |
121 |
Float_t cdexycthr = 0.95; |
Float_t cdexycthr = 0.95; |
122 |
|
Float_t h1rth = 0.90; |
123 |
|
Int_t calevnth = 13; |
124 |
// |
// |
125 |
pamela::calorimeter::CalorimeterEvent *ce = 0; |
pamela::calorimeter::CalorimeterEvent *ce = 0; |
126 |
pamela::EventHeader *eh = 0; |
pamela::EventHeader *eh = 0; |
206 |
hdiff->SetBit(TH1F::kCanRebin); |
hdiff->SetBit(TH1F::kCanRebin); |
207 |
Baseline = new TH1F("C9","baselines",100,0,3); |
Baseline = new TH1F("C9","baselines",100,0,3); |
208 |
Baseline->SetBit(TH1F::kCanRebin); |
Baseline->SetBit(TH1F::kCanRebin); |
209 |
Dexy = new TH1F("C12","dexy",100,0.,37000.); |
Dexy = new TH1F("C12","dexy",100,0.,10000.); |
210 |
Dexyc = new TH1F("C10","dexyc",100,0,3); |
Dexy->SetBit(TH1F::kCanRebin); |
211 |
Dexyc->SetBit(TH1F::kCanRebin); |
Dexyc = new TH1F("C10","dexyc",100,-100.,37000.); |
212 |
|
// Dexyc->SetBit(TH1F::kCanRebin); |
213 |
Calstriphit = new TH1F("C11","calstriphit[1:4]",100,0.,200.); |
Calstriphit = new TH1F("C11","calstriphit[1:4]",100,0.,200.); |
214 |
|
|
215 |
calev01 = new TH1F("C3","|calevnum(1)-calevnum(2)|",100,0,1); |
calev01 = new TH1F("C3","|calevnum(1)-calevnum(2)|",100,0,1); |
290 |
bool isRAW = 0; |
bool isRAW = 0; |
291 |
Int_t alldexy=0; |
Int_t alldexy=0; |
292 |
Int_t alldexy2=0; |
Int_t alldexy2=0; |
293 |
Int_t stri=0; |
Int_t planebases=0; |
294 |
|
// Int_t stri=0; |
295 |
Int_t fcheck = 0; |
Int_t fcheck = 0; |
296 |
Int_t cestw=0; |
Int_t cestw=0; |
297 |
Int_t cmask = 127 ; |
Int_t cmask = 127 ; |
319 |
Float_t headc = 0.; |
Float_t headc = 0.; |
320 |
Float_t headco = 0.; |
Float_t headco = 0.; |
321 |
Bool_t h1rcheck = false; |
Bool_t h1rcheck = false; |
322 |
|
Int_t h1rin = 0; |
323 |
|
Int_t h1rout = 0; |
324 |
Int_t intshit = 0; |
Int_t intshit = 0; |
325 |
Int_t outtshit = 0; |
Int_t outtshit = 0; |
326 |
Int_t incshit = 0; |
Int_t incshit = 0; |
356 |
headco = headc; |
headco = headc; |
357 |
headc = ph->GetCounter(); |
headc = ph->GetCounter(); |
358 |
obt = ph->GetOrbitalTime(); |
obt = ph->GetOrbitalTime(); |
359 |
calevn1 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])); |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])) ) calevn1++; |
360 |
calevn2 += (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])); |
if ( (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])) ) calevn2++; |
361 |
calevn3 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])); |
if ( (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])) ) calevn3++; |
362 |
|
// calevn1 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[1])); |
363 |
|
// calevn2 += (int)abs((int)(ce->calevnum[2]-ce->calevnum[3])); |
364 |
|
// calevn3 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[3])); |
365 |
calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1]))); |
calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1]))); |
366 |
calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3]))); |
calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3]))); |
367 |
calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3]))); |
calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3]))); |
447 |
bdone = 0; |
bdone = 0; |
448 |
bl++; |
bl++; |
449 |
allbase = ce->base[l][ii][bl]; |
allbase = ce->base[l][ii][bl]; |
450 |
|
// alldexy=0; |
451 |
|
// alldexy2=0; |
452 |
|
// stri=0; |
453 |
|
// for (Int_t e = 0; e < 16 ; e++ ){ |
454 |
|
// stri = e + 16 * bl; |
455 |
|
// alldexy += (int)ce->dexyc[l][ii][stri]; |
456 |
|
// alldexy2 += (int)ce->dexy[l][ii][stri]; |
457 |
|
// }; |
458 |
|
}; |
459 |
|
// |
460 |
|
if ( kk == 0 ){ |
461 |
|
planebases = 0; |
462 |
alldexy=0; |
alldexy=0; |
463 |
alldexy2=0; |
alldexy2=0; |
464 |
stri=0; |
for (Int_t e = 0; e < 96 ; e++ ){ |
465 |
for (Int_t e = 0; e < 16 ; e++ ){ |
if ( e < 6 ) planebases += (int)ce->base[l][ii][e]; |
466 |
stri = e + 16 * bl; |
alldexy += (int)ce->dexyc[l][ii][e]; |
467 |
alldexy += (int)ce->dexyc[l][ii][stri]; |
alldexy2 += (int)ce->dexy[l][ii][e]; |
|
alldexy2 += (int)ce->dexy[l][ii][stri]; |
|
468 |
}; |
}; |
469 |
}; |
}; |
470 |
|
// |
471 |
if ( !isRAW ) { |
if ( !isRAW ) { |
472 |
// |
// |
473 |
if ( !pdone ){ |
if ( !pdone ){ |
474 |
if ( (ce->base[l][ii][bl]>32000 || ce->base[l][ii][bl] == 0 ) && ( alldexy > 512000 || alldexy == 0) && ce->perror[se] == 0 ) { |
// if ( (ce->base[l][ii][bl]>32000 || ce->base[l][ii][bl] == 0 ) && ( alldexy > 512000 || alldexy == 0) && ce->perror[se] == 0 ) { |
475 |
|
if ( (planebases>192000 || planebases == 0 ) && ( alldexy > 3072000 || alldexy == 0) && ce->perror[se] == 0 ) { |
476 |
pdone = 1; |
pdone = 1; |
477 |
pshit[se][pl]++ ; |
pshit[se][pl]++ ; |
478 |
if ( (ce->stwerr[se] & (1 << 4)) == 0 ) { |
if ( (ce->stwerr[se] & (1 << 4)) == 0 ) { |
540 |
// |
// |
541 |
} else { |
} else { |
542 |
if ( !pdone ){ |
if ( !pdone ){ |
543 |
if ( (alldexy2>512000 || alldexy2 == 0) && ce->perror[se] == 0 ) { |
if ( ( alldexy2 > 3072000 || alldexy2 == 0) && ce->perror[se] == 0 ) { |
544 |
|
// if ( (alldexy2>512000 || alldexy2 == 0) && ce->perror[se] == 0 ) { |
545 |
pdone = 1; |
pdone = 1; |
546 |
pshit[se][pl]++ ; |
pshit[se][pl]++ ; |
547 |
if ( (ce->stwerr[se] & (1 << 4)) == 0 ){ |
if ( (ce->stwerr[se] & (1 << 4)) == 0 ){ |
610 |
trshit += rshit[k][kk]; |
trshit += rshit[k][kk]; |
611 |
}; |
}; |
612 |
}; |
}; |
613 |
Calstriphit->Fill(cshit); |
if (isCOMP || isFULL){ |
614 |
if ( (cshit > 0 && cshit < 25) || (cshit > 40 && cshit < 80) ){ |
Calstriphit->Fill(cshit); |
615 |
incshit++; |
// if ( (cshit > 0 && cshit < 25) || (cshit > 40 && cshit < 80) ){ |
616 |
} else { |
if ( (cshit > 10 && cshit < 100) ){ |
617 |
outcshit++; |
incshit++; |
618 |
}; |
} else { |
619 |
if ( tshit>0 ) h1->Fill(tshit); |
outcshit++; |
620 |
if ( (tshit > 0 && tshit < 25) || (tshit > 40 && tshit < 80) ){ |
}; |
621 |
intshit++; |
// |
622 |
} else { |
if ( tshit>0 ) h1->Fill(tshit); |
623 |
outtshit++; |
// if ( (tshit > 0 && tshit < 25) || (tshit > 40 && tshit < 80) ){ |
624 |
|
if ( (tshit > 10 && tshit < 100) ){ |
625 |
|
intshit++; |
626 |
|
} else { |
627 |
|
outtshit++; |
628 |
|
}; |
629 |
}; |
}; |
630 |
if ( trshit>0 ) { |
if ( trshit>0 ) { |
631 |
h1r->Fill(trshit); |
h1r->Fill(trshit); |
632 |
if ( trshit < 4210 ){ |
if ( trshit < 4210 ){ |
633 |
h1rcheck = true; |
h1rout++; |
634 |
// printf("ma come... trshit %i \n",trshit); |
// printf("ma come... trshit %i \n",trshit); |
635 |
|
} else { |
636 |
|
h1rin++; |
637 |
}; |
}; |
638 |
}; |
}; |
639 |
if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000); |
if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000); |
640 |
i++; |
i++; |
641 |
}; |
}; |
642 |
printf("\n"); |
printf("\n"); |
643 |
|
if ( (float)h1rout/((float)h1rin+(float)h1rout) > h1rth ){ |
644 |
|
h1rcheck = true; |
645 |
|
}; |
646 |
// |
// |
647 |
// output figures, first sheet: |
// output figures, first sheet: |
648 |
// |
// |
708 |
h1->Draw(); |
h1->Draw(); |
709 |
// |
// |
710 |
h1max = h1->GetMaximum()*1.05; |
h1max = h1->GetMaximum()*1.05; |
711 |
Double_t xc[4] = {0.,25.,25.,0.}; |
Double_t xc[4] = {10.,100.,100.,10.}; |
712 |
Double_t yc[4] = {0.,0.,h1max,h1max}; |
Double_t yc[4] = {0.,0.,h1max,h1max}; |
713 |
banda1 = new TPolyLine(4,xc,yc); |
banda1 = new TPolyLine(4,xc,yc); |
714 |
banda1->SetLineColor(5); |
banda1->SetLineColor(5); |
715 |
banda1->SetFillColor(5); |
banda1->SetFillColor(5); |
716 |
banda1->SetLineWidth(1); |
banda1->SetLineWidth(1); |
717 |
banda1->Draw("fSAME"); |
banda1->Draw("fSAME"); |
718 |
Double_t xd[4] = {40.,80.,80.,40.}; |
// Double_t xd[4] = {40.,80.,80.,40.}; |
719 |
Double_t yd[4] = {0.,0.,h1max,h1max}; |
// Double_t yd[4] = {0.,0.,h1max,h1max}; |
720 |
banda2 = new TPolyLine(4,xd,yd); |
// banda2 = new TPolyLine(4,xd,yd); |
721 |
banda2->SetLineColor(5); |
// banda2->SetLineColor(5); |
722 |
banda2->SetFillColor(5); |
// banda2->SetFillColor(5); |
723 |
banda2->SetLineWidth(1); |
// banda2->SetLineWidth(1); |
724 |
banda2->Draw("fSAME"); |
//banda2->Draw("fSAME"); |
725 |
h1->Draw("SAME"); |
h1->Draw("SAME"); |
726 |
// |
// |
727 |
figura->cd(); |
figura->cd(); |
758 |
h1->SetYTitle("Number of events"); |
h1->SetYTitle("Number of events"); |
759 |
h1->Draw(); |
h1->Draw(); |
760 |
h1max = h1->GetMaximum()*1.05; |
h1max = h1->GetMaximum()*1.05; |
761 |
Double_t xe[4] = {0.,25.,25.,0.}; |
Double_t xe[4] = {10.,100.,100.,10.}; |
762 |
Double_t ye[4] = {0.,0.,h1max,h1max}; |
Double_t ye[4] = {0.,0.,h1max,h1max}; |
763 |
banda1 = new TPolyLine(4,xe,ye); |
banda1 = new TPolyLine(4,xe,ye); |
764 |
banda1->SetLineColor(5); |
banda1->SetLineColor(5); |
765 |
banda1->SetFillColor(5); |
banda1->SetFillColor(5); |
766 |
banda1->SetLineWidth(1); |
banda1->SetLineWidth(1); |
767 |
banda1->Draw("fSAME"); |
banda1->Draw("fSAME"); |
768 |
Double_t xf[4] = {40.,80.,80.,40.}; |
// Double_t xf[4] = {40.,80.,80.,40.}; |
769 |
Double_t yf[4] = {0.,0.,h1max,h1max}; |
// Double_t yf[4] = {0.,0.,h1max,h1max}; |
770 |
banda2 = new TPolyLine(4,xf,yf); |
// banda2 = new TPolyLine(4,xf,yf); |
771 |
banda2->SetLineColor(5); |
// banda2->SetLineColor(5); |
772 |
banda2->SetFillColor(5); |
// banda2->SetFillColor(5); |
773 |
banda2->SetLineWidth(1); |
// banda2->SetLineWidth(1); |
774 |
banda2->Draw("fSAME"); |
// banda2->Draw("fSAME"); |
775 |
h1->Draw("SAME"); |
h1->Draw("SAME"); |
776 |
}; |
}; |
777 |
if ( trshit !=0 ) { |
if ( trshit !=0 ) { |
801 |
}; |
}; |
802 |
}; |
}; |
803 |
if ( !errorfull ) { |
if ( !errorfull ) { |
804 |
if ( calevn1 || calevn2 || calevn3 ) { |
if ( calevn1 > calevnth || calevn2 > calevnth || calevn3 > calevnth ) { |
805 |
pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.24,0.98,45); |
pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.24,0.98,45); |
806 |
pd2 = new TPad("pd2","This is pad2",0.26,0.51,0.49,0.98,45); |
pd2 = new TPad("pd2","This is pad2",0.26,0.51,0.49,0.98,45); |
807 |
pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.24,0.49,45); |
pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.24,0.49,45); |
976 |
Dexyc->Draw("SAME"); |
Dexyc->Draw("SAME"); |
977 |
// |
// |
978 |
pd3->cd(); |
pd3->cd(); |
979 |
|
// gPad->SetLogy(); |
980 |
Calstriphit->SetXTitle("Number of hit"); |
Calstriphit->SetXTitle("Number of hit"); |
981 |
Calstriphit->SetYTitle("Number of events"); |
Calstriphit->SetYTitle("Number of events"); |
982 |
Calstriphit->Draw(); |
Calstriphit->Draw(); |
983 |
h1max = Calstriphit->GetMaximum()*1.05; |
h1max = Calstriphit->GetMaximum()*1.05; |
984 |
Double_t xg[4] = {0.,25.,25.,0.}; |
Double_t xg[4] = {10.,100.,100.,10.}; |
985 |
Double_t yg[4] = {0.,0.,h1max,h1max}; |
Double_t yg[4] = {0.,0.,h1max,h1max}; |
986 |
banda1 = new TPolyLine(4,xg,yg); |
banda1 = new TPolyLine(4,xg,yg); |
987 |
banda1->SetLineColor(5); |
banda1->SetLineColor(5); |
988 |
banda1->SetFillColor(5); |
banda1->SetFillColor(5); |
989 |
banda1->SetLineWidth(1); |
banda1->SetLineWidth(1); |
990 |
banda1->Draw("fSAME"); |
banda1->Draw("fSAME"); |
991 |
Double_t xh[4] = {40.,80.,80.,40.}; |
// Double_t xh[4] = {40.,80.,80.,40.}; |
992 |
Double_t yh[4] = {0.,0.,h1max,h1max}; |
// Double_t yh[4] = {0.,0.,h1max,h1max}; |
993 |
banda2 = new TPolyLine(4,xh,yh); |
// banda2 = new TPolyLine(4,xh,yh); |
994 |
banda2->SetLineColor(5); |
// banda2->SetLineColor(5); |
995 |
banda2->SetFillColor(5); |
// banda2->SetFillColor(5); |
996 |
banda2->SetLineWidth(1); |
// banda2->SetLineWidth(1); |
997 |
banda2->Draw("fSAME"); |
// banda2->Draw("fSAME"); |
998 |
Calstriphit->Draw("SAME"); |
Calstriphit->Draw("SAME"); |
999 |
// |
// |
1000 |
pd4->cd(); |
pd4->cd(); |
1001 |
|
gPad->SetLogy(); |
1002 |
Dexy->SetXTitle("ADC channels"); |
Dexy->SetXTitle("ADC channels"); |
1003 |
Dexy->SetYTitle("Number of events"); |
Dexy->SetYTitle("Number of events"); |
1004 |
Dexy->Draw(); |
Dexy->Draw(); |
1005 |
h1max = Dexy->GetMaximum()*1.05; |
// h1max = Dexy->GetMaximum()*1.05; |
1006 |
|
h1max = Dexy->GetMaximum()*2.05; |
1007 |
Double_t xd[4] = {2000.,5000.,5000.,2000.}; |
Double_t xd[4] = {2000.,5000.,5000.,2000.}; |
1008 |
Double_t yd[4] = {0.,0.,h1max,h1max}; |
Double_t yd[4] = {0.,0.,h1max,h1max}; |
1009 |
banda1 = new TPolyLine(4,xd,yd); |
banda1 = new TPolyLine(4,xd,yd); |
1039 |
pd4->Draw(); |
pd4->Draw(); |
1040 |
// |
// |
1041 |
pd4->cd(); |
pd4->cd(); |
1042 |
|
gPad->SetLogy(); |
1043 |
Dexy->SetXTitle("ADC channels"); |
Dexy->SetXTitle("ADC channels"); |
1044 |
Dexy->SetYTitle("Number of events"); |
Dexy->SetYTitle("Number of events"); |
1045 |
Dexy->Draw(); |
Dexy->Draw(); |
1046 |
h1max = Dexy->GetMaximum()*1.05; |
// h1max = Dexy->GetMaximum()*1.05; |
1047 |
|
h1max = Dexy->GetMaximum()*2.05; |
1048 |
Double_t xd[4] = {2000.,5000.,5000.,2000.}; |
Double_t xd[4] = {2000.,5000.,5000.,2000.}; |
1049 |
Double_t yd[4] = {0.,0.,h1max,h1max}; |
Double_t yd[4] = {0.,0.,h1max,h1max}; |
1050 |
banda1 = new TPolyLine(4,xd,yd); |
banda1 = new TPolyLine(4,xd,yd); |
1110 |
pd7->Draw(); |
pd7->Draw(); |
1111 |
pd8->Draw(); |
pd8->Draw(); |
1112 |
pd1->cd(); |
pd1->cd(); |
1113 |
lup[0]->SetAxisRange((Double_t)minobt[0]*0.9,(Double_t)maxobt[0]*1.1,"X"); |
lup[0]->SetAxisRange((Double_t)min(minobt[0],swminobt[0])*0.9,(Double_t)max(maxobt[0],swmaxobt[0])*1.1,"X"); |
1114 |
|
lup[0]->SetXTitle("OBT"); |
1115 |
|
lup[0]->SetYTitle("Number of events"); |
1116 |
lup[0]->Draw(); |
lup[0]->Draw(); |
1117 |
pd5->cd(); |
pd5->cd(); |
1118 |
lupstw[0]->SetAxisRange((Double_t)swminobt[0]*0.9,(Double_t)swmaxobt[0]*1.1,"X"); |
lupstw[0]->SetAxisRange((Double_t)min(minobt[0],swminobt[0])*0.9,(Double_t)max(maxobt[0],swmaxobt[0])*1.1,"X"); |
1119 |
|
// lupstw[0]->SetAxisRange((Double_t)swminobt[0]*0.9,(Double_t)swmaxobt[0]*1.1,"X"); |
1120 |
|
lupstw[0]->SetXTitle("OBT"); |
1121 |
|
lupstw[0]->SetYTitle("Number of events"); |
1122 |
lupstw[0]->Draw(); |
lupstw[0]->Draw(); |
1123 |
pd2->cd(); |
pd2->cd(); |
1124 |
lup[1]->SetAxisRange((Double_t)minobt[1]*0.9,(Double_t)maxobt[1]*1.1,"X"); |
lup[1]->SetAxisRange((Double_t)min(minobt[1],swminobt[1])*0.9,(Double_t)max(maxobt[1],swmaxobt[1])*1.1,"X"); |
1125 |
|
// lup[1]->SetAxisRange((Double_t)minobt[1]*0.9,(Double_t)maxobt[1]*1.1,"X"); |
1126 |
|
lup[1]->SetXTitle("OBT"); |
1127 |
|
lup[1]->SetYTitle("Number of events"); |
1128 |
lup[1]->Draw(); |
lup[1]->Draw(); |
1129 |
pd6->cd(); |
pd6->cd(); |
1130 |
lupstw[1]->SetAxisRange((Double_t)swminobt[1]*0.9,(Double_t)swmaxobt[1]*1.1,"X"); |
lupstw[1]->SetAxisRange((Double_t)min(minobt[1],swminobt[1])*0.9,(Double_t)max(maxobt[1],swmaxobt[1])*1.1,"X"); |
1131 |
|
// lupstw[1]->SetAxisRange((Double_t)swminobt[1]*0.9,(Double_t)swmaxobt[1]*1.1,"X"); |
1132 |
|
lupstw[1]->SetXTitle("OBT"); |
1133 |
|
lupstw[1]->SetYTitle("Number of events"); |
1134 |
lupstw[1]->Draw(); |
lupstw[1]->Draw(); |
1135 |
pd3->cd(); |
pd3->cd(); |
1136 |
lup[2]->SetAxisRange((Double_t)minobt[2]*0.9,(Double_t)maxobt[2]*1.1,"X"); |
lup[2]->SetAxisRange((Double_t)min(minobt[2],swminobt[2])*0.9,(Double_t)max(maxobt[2],swmaxobt[2])*1.1,"X"); |
1137 |
|
// lup[2]->SetAxisRange((Double_t)minobt[2]*0.9,(Double_t)maxobt[2]*1.1,"X"); |
1138 |
|
lup[2]->SetXTitle("OBT"); |
1139 |
|
lup[2]->SetYTitle("Number of events"); |
1140 |
lup[2]->Draw(); |
lup[2]->Draw(); |
1141 |
pd7->cd(); |
pd7->cd(); |
1142 |
lupstw[2]->SetAxisRange((Double_t)swminobt[2]*0.9,(Double_t)swmaxobt[2]*1.1,"X"); |
lupstw[2]->SetAxisRange((Double_t)min(minobt[2],swminobt[2])*0.9,(Double_t)max(maxobt[2],swmaxobt[2])*1.1,"X"); |
1143 |
|
// lupstw[2]->SetAxisRange((Double_t)swminobt[2]*0.9,(Double_t)swmaxobt[2]*1.1,"X"); |
1144 |
|
lupstw[2]->SetXTitle("OBT"); |
1145 |
|
lupstw[2]->SetYTitle("Number of events"); |
1146 |
lupstw[2]->Draw(); |
lupstw[2]->Draw(); |
1147 |
pd4->cd(); |
pd4->cd(); |
1148 |
lup[3]->SetAxisRange((Double_t)minobt[3]*0.9,(Double_t)maxobt[3]*1.1,"X"); |
lup[3]->SetAxisRange((Double_t)min(minobt[3],swminobt[3])*0.9,(Double_t)max(maxobt[3],swmaxobt[3])*1.1,"X"); |
1149 |
|
// lup[3]->SetAxisRange((Double_t)minobt[3]*0.9,(Double_t)maxobt[3]*1.1,"X"); |
1150 |
|
lup[3]->SetXTitle("OBT"); |
1151 |
|
lup[3]->SetYTitle("Number of events"); |
1152 |
lup[3]->Draw(); |
lup[3]->Draw(); |
1153 |
pd8->cd(); |
pd8->cd(); |
1154 |
lupstw[3]->SetAxisRange((Double_t)swminobt[3]*0.9,(Double_t)swmaxobt[3]*1.1,"X"); |
lupstw[3]->SetAxisRange((Double_t)min(minobt[3],swminobt[3])*0.9,(Double_t)max(maxobt[3],swmaxobt[3])*1.1,"X"); |
1155 |
|
// lupstw[3]->SetAxisRange((Double_t)swminobt[3]*0.9,(Double_t)swmaxobt[3]*1.1,"X"); |
1156 |
|
lupstw[3]->SetXTitle("OBT"); |
1157 |
|
lupstw[3]->SetYTitle("Number of events"); |
1158 |
lupstw[3]->Draw(); |
lupstw[3]->Draw(); |
1159 |
}; |
}; |
1160 |
// |
// |
1311 |
errore << "Missing section: " << ver[i][j]; |
errore << "Missing section: " << ver[i][j]; |
1312 |
errore << " time(s)"; |
errore << " time(s)"; |
1313 |
t->DrawLatex(2.,50.,errore.str().c_str()); |
t->DrawLatex(2.,50.,errore.str().c_str()); |
1314 |
check = true; |
if ( ver[i][j] > 3 ) check = true; |
1315 |
} |
} |
1316 |
if (j == 10) { |
if (j == 10) { |
1317 |
errore.str(""); |
errore.str(""); |
1325 |
errore << "CRC error (data): " << ver[i][j]; |
errore << "CRC error (data): " << ver[i][j]; |
1326 |
errore << " time(s)"; |
errore << " time(s)"; |
1327 |
t->DrawLatex(2.,38.,errore.str().c_str()); |
t->DrawLatex(2.,38.,errore.str().c_str()); |
1328 |
check = true; |
if ( ver[i][j] > 10 ) check = true; |
1329 |
} |
} |
1330 |
if (j == 12) { |
if (j == 12) { |
1331 |
errore.str(""); |
errore.str(""); |
1512 |
figsave << format; |
figsave << format; |
1513 |
rapporto->SaveAs(figsave.str().c_str()); |
rapporto->SaveAs(figsave.str().c_str()); |
1514 |
}; |
}; |
1515 |
|
if ( iactive && w4i ){ |
1516 |
|
while ( gROOT->GetListOfCanvases()->FindObject(rapporto) || gROOT->GetListOfCanvases()->FindObject(figura3) || gROOT->GetListOfCanvases()->FindObject(figura2) || gROOT->GetListOfCanvases()->FindObject(figura) ){ |
1517 |
|
gSystem->ProcessEvents(); |
1518 |
|
gSystem->Sleep(10); |
1519 |
|
}; |
1520 |
|
}; |
1521 |
} |
} |
1522 |
|
|