ANASEN_analysis/scratch/sx3z_vs_phiz/scan_offset.C

41 lines
1.2 KiB
C

int quit=0;
void handler(int){quit=1;}
void scan_offset(){
signal(SIGINT,handler);
TCanvas c("c1","c1",0,0,1600,800);
c.Divide(2,1);
for(int i=36; i<=43; i++) {
auto c1=c.cd(1);
c1->SetGrid(1,1);
TFile *f = new TFile(Form("../../results_run%d.root",i));
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3z_phiCut1_TC1"));
// TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3z_2C1A_phiCut_TC1"));
//TH1F *h2 = (TH1F*)(f->Get("pcz_sx3Coinc_phiCut1_TC1"));
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
if(!h2) continue;
h2->SetTitle(Form("case%d",i));
h2->Draw("colz");
c1->Modified();
c1->Update();
auto c2=c.cd(2);
c2->SetGrid(1,1);
TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
if(!h3) continue;
h3->SetTitle(Form("case%d",i));
h3->Draw("colz");
c2->Modified();
c2->Update();
while(gPad->WaitPrimitive());
f->Close();
if(i==43) i=35;
if(quit) break;
}
}