| 36 |
// |
// |
| 37 |
#include <iostream> |
#include <iostream> |
| 38 |
#include <fstream> |
#include <fstream> |
| 39 |
|
#include <cstdlib> |
| 40 |
// |
// |
| 41 |
#include <TObject.h> |
#include <TObject.h> |
| 42 |
#include <TString.h> |
#include <TString.h> |
| 43 |
#include <TFile.h> |
#include <TFile.h> |
| 44 |
|
#include <TROOT.h> |
| 45 |
#include <TCanvas.h> |
#include <TCanvas.h> |
| 46 |
#include <TH1.h> |
#include <TH1.h> |
| 47 |
#include <TH1F.h> |
#include <TH1F.h> |
| 57 |
#include <physics/calorimeter/CalorimeterEvent.h> |
#include <physics/calorimeter/CalorimeterEvent.h> |
| 58 |
// |
// |
| 59 |
#include <FCaloQLOOKfun.h> |
#include <FCaloQLOOKfun.h> |
| 60 |
|
#include <sys/stat.h> |
| 61 |
|
#include <cstdlib> |
| 62 |
// |
// |
| 63 |
using namespace std; |
using namespace std; |
| 64 |
// |
// |
| 195 |
return; |
return; |
| 196 |
}; |
}; |
| 197 |
Int_t const size = nevents; |
Int_t const size = nevents; |
| 198 |
Double_t iev2[size+1]; |
// Double_t iev2[size+1]; |
| 199 |
//aumentata la lunghezza di ver, prima era 23 |
//aumentata la lunghezza di ver, prima era 23 |
| 200 |
Int_t ver[4][24], lver[4][23],shit[4][11], rshit[4][11], se,bl, pl, fulldiff[4],cshit, cpre[4],nullsh[4][11], lalarm[4]; |
Int_t ver[4][24], lver[4][23],shit[4][11], rshit[4][11], se,bl, pl, fulldiff[4],cshit, cpre[4],nullsh[4][11], lalarm[4]; |
| 201 |
se = 0; |
se = 0; |
| 204 |
Int_t tshit, trshit, compdata,rawdata, errorfull, calevn1, calevn2, calevn3, calevn4, pshit[4][11]; |
Int_t tshit, trshit, compdata,rawdata, errorfull, calevn1, calevn2, calevn3, calevn4, pshit[4][11]; |
| 205 |
tshit = 0; |
tshit = 0; |
| 206 |
trshit = 0; |
trshit = 0; |
| 207 |
char *sezione; |
const char *sezione = ""; |
| 208 |
Bool_t check = false; |
Bool_t check = false; |
| 209 |
sezione = ""; |
// sezione = ""; |
| 210 |
stringstream errore; |
stringstream errore; |
| 211 |
errore.str(""); |
errore.str(""); |
| 212 |
// |
// |
| 387 |
trshit = 0; |
trshit = 0; |
| 388 |
tr->GetEntry(i); |
tr->GetEntry(i); |
| 389 |
|
|
| 390 |
iev2[i] = ce->iev; |
// iev2[i] = ce->iev; |
| 391 |
// |
// |
| 392 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 393 |
headco = headc; |
headco = headc; |
| 524 |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
| 525 |
}; |
}; |
| 526 |
lver[se][2]++ ; |
lver[se][2]++ ; |
| 527 |
sighandler(headc,obt,i,se,nevents,evdone); |
if ( lver[se][2] == 1000 ){ |
| 528 |
printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); |
sighandler(headc,obt,i,se,nevents,evdone); |
| 529 |
|
printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); |
| 530 |
|
printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); |
| 531 |
|
printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); |
| 532 |
|
}; |
| 533 |
|
if ( lver[se][2] < 1000 ){ |
| 534 |
|
sighandler(headc,obt,i,se,nevents,evdone); |
| 535 |
|
printf(" latch up (data) in DSP mode alldexy %i planebases %i \n",alldexy,planebases); |
| 536 |
|
}; |
| 537 |
}; |
}; |
| 538 |
} |
} |
| 539 |
// |
// |
| 540 |
if ( !bdone ){ |
if ( !bdone ){ |
| 541 |
Baseline->Fill(ce->base[l][ii][bl]); |
Baseline->Fill(ce->base[l][ii][bl]); |
| 542 |
if ( ce->base[l][ii][bl] > 2000. && ce->base[l][ii][bl] < 4500. ){ |
if ( ce->base[l][ii][bl] > 2000. && ce->base[l][ii][bl] < 5500. ){ |
| 543 |
inbase++; |
inbase++; |
| 544 |
} else { |
} else { |
| 545 |
outbase++; |
outbase++; |
| 607 |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
if ( obt > maxobt[se] ) maxobt[se] = obt; |
| 608 |
}; |
}; |
| 609 |
lver[se][2]++ ; |
lver[se][2]++ ; |
| 610 |
sighandler(headc,obt,i,se,nevents,evdone); |
if ( lver[se][2] == 1000 ){ |
| 611 |
printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); |
sighandler(headc,obt,i,se,nevents,evdone); |
| 612 |
|
printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); |
| 613 |
|
printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); |
| 614 |
|
printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); |
| 615 |
|
}; |
| 616 |
|
if ( lver[se][2] < 1000 ){ |
| 617 |
|
sighandler(headc,obt,i,se,nevents,evdone); |
| 618 |
|
printf(" latch up (data) in RAW mode alldexy2 %i \n",alldexy2); |
| 619 |
|
}; |
| 620 |
}; |
}; |
| 621 |
}; |
}; |
| 622 |
if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) { |
if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) { |
| 664 |
if ( cestw & (1 << 3) ) ver[k][3]++ ; // raw mode |
if ( cestw & (1 << 3) ) ver[k][3]++ ; // raw mode |
| 665 |
if ( cestw & (1 << 4) ){ |
if ( cestw & (1 << 4) ){ |
| 666 |
ver[k][2]++ ; |
ver[k][2]++ ; |
| 667 |
sighandler(headc,obt,i,k,nevents,evdone); |
if ( ver[k][2] == 1000 ){ |
| 668 |
printf(" latch up alarm (st. word)\n"); |
sighandler(headc,obt,i,k,nevents,evdone); |
| 669 |
|
printf(" latch up alarm (st. word)\n"); |
| 670 |
|
printf(" WARNING TOO MANY LATCHUP ERRORS ON DATA FOR THIS SECTION \n"); |
| 671 |
|
printf(" THEY WILL NOT BE DISPLAYED HERE ANYMORE FOR THIS FILE! \n"); |
| 672 |
|
}; |
| 673 |
|
if ( ver[k][2] < 1000 ){ |
| 674 |
|
sighandler(headc,obt,i,k,nevents,evdone); |
| 675 |
|
printf(" latch up alarm (st. word)\n"); |
| 676 |
|
}; |
| 677 |
lupstw[k]->Fill(obt); |
lupstw[k]->Fill(obt); |
| 678 |
if ( swfirstobt[k] ) swminobt[k] = obt; |
if ( swfirstobt[k] ) swminobt[k] = obt; |
| 679 |
if ( obt > swmaxobt[k] ) swmaxobt[k] = obt; |
if ( obt > swmaxobt[k] ) swmaxobt[k] = obt; |
| 1108 |
Baseline->SetYTitle("Number of events"); |
Baseline->SetYTitle("Number of events"); |
| 1109 |
Baseline->Draw(); |
Baseline->Draw(); |
| 1110 |
h1max = Baseline->GetMaximum()*1.05; |
h1max = Baseline->GetMaximum()*1.05; |
| 1111 |
Double_t xc[4] = {2000.,4500.,4500.,2000.}; |
Double_t xc[4] = {2000.,5500.,5500.,2000.}; |
| 1112 |
Double_t yc[4] = {0.,0.,h1max,h1max}; |
Double_t yc[4] = {0.,0.,h1max,h1max}; |
| 1113 |
banda1 = new TPolyLine(4,xc,yc); |
banda1 = new TPolyLine(4,xc,yc); |
| 1114 |
banda1->SetLineColor(5); |
banda1->SetLineColor(5); |