{ gROOT->Reset(); gROOT->SetStyle("Plain"); gROOT->ForceStyle(); gStyle->SetOptStat(0); gStyle->SetOptFit(0); gStyle->SetTitleX(0.1f); gStyle->SetTitleW(0.8f); gStyle->SetLineWidth(1.5); gStyle->SetTextSize(1.5); gStyle->SetTitleFont(132,"xy"); gStyle->SetLabelFont(132,"xy"); // gStyle->SetLabelFont(62,"xy"); gStyle->SetLabelSize(0.073,"xy"); gStyle->SetTitleSize(0.086,"xy"); gStyle->SetTitleOffset(1.0,"x"); gStyle->SetTitleOffset(0.6,"y"); TFile f("hd_rawdata_022102_000.root"); // TH1F *occup = (TH1F*)f.Get("tagh_occup1"); TH1F *fadc_size_all = (TH1F*)f.Get("fadc_size_all"); TH1F *fadc125_size_all = (TH1F*)f.Get("fadc125_size_all"); TH1F *f1_size_all = (TH1F*)f.Get("f1_size_all"); TCanvas *c1 = new TCanvas("c1","Cosmic",200,10, 800, 400); c1->Divide(2,1); c1->cd(1); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.005); gPad->SetLeftMargin(0.2); gPad->SetRightMargin(0.05); // gPad->SetBottomMargin(0.1); // gPad->SetTopMargin(0.05); // gPad->SetLeftMargin(0.12); // gPad->SetRightMargin(0.05); // trig_time->GetXaxis()->SetNdivisions(508); // trig_time->SetMaximum(35); fadc_size_all->SetLineColor(1); fadc_size_all->SetLineWidth(1); fadc_size_all->GetXaxis()->SetRangeUser(10.,96.); fadc_size_all->GetYaxis()->SetRangeUser(0.,10000.); fadc_size_all->SetMarkerStyle(20); fadc_size_all->SetMarkerSize(0.9); fadc_size_all->SetMarkerColor(4); fadc_size_all->SetTitle(""); fadc_size_all->Draw("phisto"); fadc125_size_all->SetMarkerStyle(21); fadc125_size_all->SetMarkerSize(0.9); fadc125_size_all->SetMarkerColor(2); fadc125_size_all->Draw("psame"); f1_size_all->SetMarkerStyle(23); f1_size_all->SetMarkerSize(0.9); f1_size_all->SetMarkerColor(8); f1_size_all->Draw("psame"); TLatex *text = new TLatex(); text -> SetTextFont(42); text -> SetTextColor(1); text -> SetTextSize(0.05); text -> SetTextAlign(22); text -> SetTextAngle(0); text -> DrawLatex(19., 0.2, "FCAL"); Double_t rate_400[100]; Double_t x[100]; Double_t ey[100]; for(int ii = 0; ii < 50; ii++){ x[ii] = ii; } // FCAL Crates 11 - 22 for(int ii = 0; ii < 12; ii++){ int crate = 11 + ii; rate_400[ii] = fadc_size_all->GetBinContent(crate); // cout << rate_400[ii] << endl; } // BCAL Crates 31, 32, 34, 35, 37, 38, 40, 41 rate_400[12] = fadc_size_all->GetBinContent(31); rate_400[13] = fadc_size_all->GetBinContent(32); rate_400[14] = fadc_size_all->GetBinContent(34); rate_400[15] = fadc_size_all->GetBinContent(35); rate_400[16] = fadc_size_all->GetBinContent(37); rate_400[17] = fadc_size_all->GetBinContent(38); rate_400[18] = fadc_size_all->GetBinContent(40); rate_400[19] = fadc_size_all->GetBinContent(41); // ST Crates 94 rate_400[20] = fadc_size_all->GetBinContent(94); // PS1, PS2 Crates 83, 84 rate_400[21] = fadc_size_all->GetBinContent(83); rate_400[22] = fadc_size_all->GetBinContent(84); // TOF Crate 77 rate_400[23] = fadc_size_all->GetBinContent(77); // TAGM1, TAGH1 Crates 71, 73 rate_400[24] = fadc_size_all->GetBinContent(71); rate_400[25] = fadc_size_all->GetBinContent(73); c2 = new TCanvas("c2"," Acceptance ", 200, 10, 600, 500); for(int ii = 0; ii < 100; ii++){ rate_400[ii] = rate_400[ii]*99200*4/40; } TGraph *gr_400 = new TGraph(26, x, rate_400); gr_400->SetMarkerStyle(20); gr_400->SetMarkerSize(0.6); // gr_400->SetMaximum(0.5); // gr_400->SetMinimum(0.001); gr_400->SetFillColor(4); gr_400->Draw("AB"); // getchar(); // TLatex *text1 = new TLatex(850, 28, "(a)"); // text1 -> SetTextFont(132); // text1->SetTextSize(0.12); // text1->Draw(); // TText *text1 = new TText(); // text1 -> SetTeFont(1); // text1 -> SetTextColor(62); // text1 -> SetTextSize(0.03); // text1 -> SetTextAlign(22); // text1 -> SetTextAngle(0); // TF1 *f1 = new TF1("f1","gaus",265,295); // f1->SetLineColor(2); // f1->SetParameters(280, 10); // h1->Fit("f1","REM"); // TLatex *text2 = new TLatex(850, 420, "(b)"); // text2 -> SetTextFont(132); // text2->SetTextSize(0.12); // text2->Draw(); }