TChain* chain; void DrawAoQ(int sec=8, float time_offset=0){ chain = new TChain("PhysicsTree"); //chain->Add("../../root/analysis/run_48_calib.root"); //chain->Add("../../root/analysis/run_48.root"); chain->Add("../../root/analysis/run_55.root"); // T13 // TString to_draw = Form("FF_Brho/3.10761* (FF_T13+%f)/FF_D13*29.9792*sqrt(1-pow(FF_D13,2)/(pow((FF_T13+%f)*29.9792,2)))>>h(1000,2.5,4.5)",time_offset,time_offset) ; TString to_draw2 = Form("FF_Q13:FF_Brho/3.10761* (FF_T13+%f)/FF_D13*29.9792*sqrt(1-pow(FF_D13,2)/(pow((FF_T13+%f)*29.9792,2)))>>h2(500,2.9,3.1,600,30,50)",time_offset,time_offset) ; // T14 // /*TString to_draw = Form("FF_Brho/3.10761* (FF_T14+%f)/FF_D14*29.9792*sqrt(1-pow(FF_D14,2)/(pow((FF_T14+%f)*29.9792,2)))>>h(1000,2.5,4.5)",time_offset,time_offset) ; TString to_draw2 = Form("FF_Q14:FF_Brho/3.10761* (FF_T14+%f)/FF_D14*29.9792*sqrt(1-pow(FF_D14,2)/(pow((FF_T14+%f)*29.9792,2)))>>h2(500,2.9,3.1,600,30,50)",time_offset,time_offset) ;*/ TString cond = Form("FPMW_Section==%i",sec); TCanvas * c1 = new TCanvas("c1","c1",1600,1600); c1->Divide(1,2); c1->cd(1)->SetGridx(); chain->Draw(to_draw2,cond,"colz",1e7); c1->cd(2); c1->cd(2)->SetGridx(); chain->Draw(to_draw,cond,"",1e7); //chain->Draw("FF_AoQ13>>haoq(1000,2.5,4.5)",cond,"same",1e7); //TH1F* haoq = (TH1F*)gDirectory->FindObjectAny("haoq"); //haoq->SetLineColor(2); //haoq->Draw("same"); }