10 gStyle->SetPalette(1,0);
11 gSystem -> Load(
"../ezGames/EEBlueLedBox/libEEBlueLedBox.so");
12 led=
new EEBlueLedBox();
14 f=
new TFile(
"smdCal-Xm1.hist.root");
18 plBlue(
int iuv=0,
int sect=1) {
19 gStyle->SetOptStat(11);
28 for(sec=1;sec<=12;sec++)
29 for(iuv=0;iuv<2;iuv++){
36 plPre(
float zMax=15.) {
38 c=
new TCanvas(
"xy",
"xy",590,600);
39 for(sec=1;sec<=12;sec++) {
42 if(sec>1) opt=
"col same";
45 sprintf(txt,
"xy%02d",sec);
46 printf(
"=%s=%s\n",txt,opt.Data());
47 TH2F *h=(TH2F *)f->Get(txt);
51 if(sec==1) { h->SetStats(0); h->SetTitle(
"MIP position, UxV only");}
57 plBlue1(
int iuv=0,
int sect=1) {
59 sprintf(txt,
"fr%02d%c",sect,iuv+
'U');
63 c=
new TCanvas(txt,txt,600,700);
66 h0->SetFillColor(kGreen);
70 h=(TH1F*) h0->Clone();
74 h->SetAxisRange((i-1)*80,i*80);
75 float ym=h->GetMaximum();
88 plotLed(
int iuv=0,
float ym) {
89 int colA[]={kBlack,kRed,kBlue,kMagenta};
96 for ( Int_t board = 0; board < 8; board++ ) {
98 TObjArray fibers = led->getFibersToSmdPlane( board, iplane );
99 std::cout <<
"Strips illuminated by LED board " << board+1 << std::endl;
102 for ( Int_t ifiber = 0; ifiber < fibers.GetEntries(); ifiber++ ) {
104 EEBlueLedFiber *fiber = (EEBlueLedFiber *)fibers[ifiber];
105 std::cout <<
"min strip = " << fiber->getMinStrip() <<
" "
106 <<
"max strip = " << fiber->getMaxStrip() <<
" "
107 <<
"led board = " << fiber->getLedBoard() <<
" "
108 <<
"led fiber = " << fiber->getLedFiber() <<
" "
111 totStrip+=1+fiber->getMaxStrip()-fiber->getMinStrip();
112 float y1=0.1,y2=log(ym)/2.;
113 float x1=fiber->getMinStrip()-0.4;
114 float x2=fiber->getMaxStrip()+0.4;
116 TBox *box =
new TBox(x1,y1,x2,y2);
117 int col=colA[board%4];
118 box -> SetLineColor(col);
119 box -> SetFillStyle(0);
124 sprintf(txt,
"br=%d fb=%d", fiber->getLedBoard(),fiber->getLedFiber() );
125 tt=
new TText(x1+1.,y2*1.01,txt);
130 cout <<
" totStrip="<<totStrip<<endl;