3 plSwap_byCrate(
int icr=2,
int set=2) {
7 char *fname=
"sum.hist.root";
8 if(set==0) fname=
"sum-noswap.hist.root";
9 if(set==1) fname=
"sum-swap14.hist.root";
10 if(set==2) fname=
"/star/data05/scratch/balewski/sched-swapA/R9068088.barCal.hist.root";
11 if(set==99) fname=
"sum.hist.root";
14 fd=
new TFile(fname); assert(fd->IsOpen());
15 printf(
"Work with %s\n", fd->GetName());
16 gStyle->SetOptStat(1000010);
17 gStyle->SetPalette(1,0);
32 float x1=1,x2=340,x3=1541,x4=2400;
36 x1=2401; x2=2900; x3=4101; x4=4800;
39 TH2F* hA[4]; hA[0]=hr; hA[2]=hm;
41 hA[1+2*i]=(TH2F*) hA[2*i]->Clone();
42 hA[2*i]->SetAxisRange(x1,x2);
43 hA[2*i]->SetAxisRange(x1,x2);
44 hA[1+2*i]->SetAxisRange(x3,x4);
45 hA[1+2*i]->SetAxisRange(x3,x4);
50 c->cd(i+1); hA[i]->Draw(
"colz");
51 if(i<2) gPad->SetLogz();
67 c->cd(1); hr->Draw(
"colz"); gPad->SetLogz();gPad->SetGrid();
68 hr->SetAxisRange(x1,x2);
69 hr->SetAxisRange(y1,y2,
"y");
70 c->cd(2); hm->Draw(
"colz") ;gPad->SetGrid();
71 hm->SetAxisRange(x1,x2);
72 hm->SetAxisRange(y1,y2,
"y");
82 for(
int i=0;i<4;i++) {
83 float id1=1461+i*20+ipmt*4;
85 for(
int j=0;j<4;j++) {
87 printf(
"==========%d\n",
id);
90 TH1F *hr=getSlice( BPRS_c0,
id,
"raw");
91 TH1F *hm=getSlice(mipBprsAdc,
id,
"mip");
92 c=
new TCanvas(
"a",
"a",500,500);
96 hr->Draw();gPad->SetLogy();gPad->SetGrid();
102 sprintf(txt1,
"ps/pmt%d_id%d.ps",kpmt,
id);
107 printf(
"MANY pages has piled up!!!\n");
113 for(
int i=0;i<4;i++) {
114 float x1=1461+i*20-0.5;
116 ln=
new TLine(x1,y,x2,y);
118 ln->SetLineColor(kRed); ln->SetLineWidth(2.);
123 TH1F * getSlice(TH2F * h2,
int id,
char *ctit) {
125 float x1=axX->GetXmin();
126 float x2=axX->GetXmax();
127 int nbX=axX->GetNbins();
128 printf(
"X-axis range --> [%.1f, %.1f], nb=%d %s\n",x1,x2,nbX,axX->GetTitle());
131 float y1=axY->GetXmin();
132 float y2=axY->GetXmax();
133 int nbY=axY->GetNbins();
134 printf(
"Y-axis range --> [%.1f, %.1f], nb=%d\n",y1,y2,nbY);
136 assert(
id>=1 &&
id<=nbX);
138 char txt1[100], txt2[1000];
139 sprintf(txt1,
"%s_id%d",ctit,
id);
140 sprintf(txt2,
"%s soft id=%d;%s ",ctit,
id,axY->GetTitle());
141 TH1F*h=
new TH1F(txt1,txt2,nbY,y1,y2);
144 for(i=1;i<=nbY;i++) h->SetBinContent(i,h2->GetBinContent(
id,i));
149 h->SetAxisRange(x1,x2);
150 h->SetEntries(h->Integral());
165 ln=
new TLine(x,0,x,y); ln->Draw();
166 ln->SetLineColor(kRed);
167 ln=
new TLine(-x,0,-x,y); ln->Draw();
168 ln->SetLineColor(kRed);
169 mipZverAc->Draw(
"same"); mipZverAc->SetLineColor(kBlue);
173 mipTrPt->Draw();gPad->SetLogy();
175 ln=
new TLine(x,0,x,y); ln->Draw();
176 ln->SetLineColor(kRed);
177 mipTrPtAc->Draw(
"same"); mipTrPtAc->SetLineColor(kBlue);
180 mipDeDx->Draw(
"colz");gPad->SetLogz();
182 ln=
new TLine(0,y,20,y); ln->Draw();
183 ln->SetLineColor(kRed);
185 ln=
new TLine(0,y,20,y); ln->Draw();
186 ln->SetLineColor(kRed);
189 mipTrRZ21->Draw(
"colz");