{ 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->SetLabelSize(0.05,"xy"); gStyle->SetTitleSize(0.06,"xy"); gStyle->SetTitleOffset(1.0,"x"); gStyle->SetTitleOffset(1.1,"y"); gStyle->SetTitleBorderSize(0); gStyle->SetTitleSize(0.065,"t"); TFile f_500("hd_rawdata_022105_000.root"); TFile f_500_st("hd_rawdata_022104_000.root"); TFile f_400("hd_rawdata_022102_000.root"); TFile f_400_st("hd_rawdata_022103_000.root"); TFile f_300("hd_rawdata_022106_000.root"); TFile f_300_st("hd_rawdata_022108_000.root"); // TH1F *occup = (TH1F*)f.Get("tagh_occup1"); TH1F *fadc_500 = (TH1F*)f_500.Get("fadc_size_all"); TH1F *fadc125_500 = (TH1F*)f_500.Get("fadc125_size_all"); TH1F *f1_500 = (TH1F*)f_500.Get("f1_size_all"); TH1F *fadc_500_st = (TH1F*)f_500_st.Get("fadc_size_all"); TH1F *fadc125_500_st = (TH1F*)f_500_st.Get("fadc125_size_all"); TH1F *f1_500_st = (TH1F*)f_500_st.Get("f1_size_all"); TH1F *fadc_400 = (TH1F*)f_400.Get("fadc_size_all"); TH1F *fadc125_400 = (TH1F*)f_400.Get("fadc125_size_all"); TH1F *f1_400 = (TH1F*)f_400.Get("f1_size_all"); TH1F *fadc_400_st = (TH1F*)f_400_st.Get("fadc_size_all"); TH1F *fadc125_400_st = (TH1F*)f_400_st.Get("fadc125_size_all"); TH1F *f1_400_st = (TH1F*)f_400_st.Get("f1_size_all"); TH1F *fadc_300 = (TH1F*)f_300.Get("fadc_size_all"); TH1F *fadc125_300 = (TH1F*)f_300.Get("fadc125_size_all"); TH1F *f1_300 = (TH1F*)f_300.Get("f1_size_all"); TH1F *fadc_300_st = (TH1F*)f_300_st.Get("fadc_size_all"); TH1F *fadc125_300_st = (TH1F*)f_300_st.Get("fadc125_size_all"); TH1F *f1_300_st = (TH1F*)f_300_st.Get("f1_size_all"); fadc_500->Scale(4.*125/40./1000); fadc125_500->Scale(4.*125/40./1000); f1_500->Scale(4.*125/40./1000); fadc_500_st->Scale(4.*83/40./1000); fadc125_500_st->Scale(4.*83/40./1000); f1_500_st->Scale(4.*83/40./1000); fadc_400->Scale(4.*99.2/40./1000); fadc125_400->Scale(4.*99.2/40./1000); f1_400->Scale(4.*99.2/40./1000); fadc_400_st->Scale(4.*61/40./1000); fadc125_400_st->Scale(4.*61/40./1000); f1_400_st->Scale(4.*61/40./1000); fadc_300->Scale(4.*73/40./1000); fadc125_300->Scale(4.*73/40./1000); f1_300->Scale(4.*73/40./1000); fadc_300_st->Scale(4.*43/40./1000); fadc125_300_st->Scale(4.*43/40./1000); f1_300_st->Scale(4.*43/40./1000); TCanvas *c1 = new TCanvas("c1","Cosmic",200,10, 900, 900); c1->Divide(2,3,0,0); c1->cd(1); gPad->SetBottomMargin(0.02); gPad->SetTopMargin(0.1); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); fadc_500->GetXaxis()->SetNdivisions(508); fadc_500->GetXaxis()->SetRangeUser(10.,96.); fadc_500->GetYaxis()->SetRangeUser(0.,140); fadc_500->SetMarkerStyle(20); fadc_500->SetMarkerSize(0.9); fadc_500->SetMarkerColor(4); fadc_500->SetTitle("FCAL & BCAL, PS (7.5%) Triggers"); fadc_500->Draw("phisto"); fadc_500->GetYaxis()->SetTitle("Data rate (MB/s)"); fadc125_500->SetMarkerStyle(21); fadc125_500->SetMarkerSize(0.9); fadc125_500->SetMarkerColor(2); fadc125_500->Draw("psame"); f1_500->SetMarkerStyle(23); f1_500->SetMarkerSize(0.9); f1_500->SetMarkerColor(8); f1_500->Draw("psame"); fadc_500->GetXaxis()->SetLabelSize(0); TLatex *text = new TLatex(); text -> SetTextFont(22); text -> SetTextColor(1); text -> SetTextSize(0.07); text -> SetTextAlign(22); text -> SetTextAngle(0); text -> DrawLatex(30., 125, "500 nA"); text -> SetTextSize(0.05); text -> DrawLatex(25., 110, "Trig Rate 128 kHz"); #if 0 TLatex *text1 = new TLatex(); text1 -> SetTextFont(22); text1 -> SetTextColor(1); text1 -> SetTextSize(0.042); text1 -> SetTextAlign(22); text1 -> SetTextAngle(0); text1 -> DrawLatex(16., -0.12, "FCAL"); text1 -> SetTextAngle(90); text1 -> DrawLatex(26., -0.12, "CDC"); text1 -> SetTextAngle(0); text1 -> DrawLatex(36., -0.12, "BCAL"); text1 -> DrawLatex(56., -0.12, "FDC"); text1 -> SetTextAngle(90); text1 -> DrawLatex(68., -0.12, "TAGM"); text1 -> DrawLatex(72., -0.12, "TAGH"); text1 -> DrawLatex(78., -0.12, "TOF"); text1 -> DrawLatex(83., -0.12, "PS1/PS2"); text1 -> DrawLatex(94., -0.12, "ST"); #endif c1->cd(2); gPad->SetBottomMargin(0.02); gPad->SetTopMargin(0.1); // gPad->SetLeftMargin(0.01); gPad->SetRightMargin(0.05); gPad->SetGrid(1); // 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_500_st->GetXaxis()->SetNdivisions(508); fadc_500_st->SetLineColor(1); fadc_500_st->SetLineWidth(1); fadc_500_st->GetXaxis()->SetRangeUser(10.,96.); fadc_500_st->GetYaxis()->SetRangeUser(0.,140.); fadc_500_st->SetMarkerStyle(20); fadc_500_st->SetMarkerSize(0.9); fadc_500_st->SetMarkerColor(4); fadc_500_st->SetTitle("FCAL & BCAL & ST, PS (12.3%) Triggers"); fadc_500_st->Draw("phisto"); fadc125_500_st->SetMarkerStyle(21); fadc125_500_st->SetMarkerSize(0.9); fadc125_500_st->SetMarkerColor(2); fadc125_500_st->Draw("psame"); f1_500_st->SetMarkerStyle(23); f1_500_st->SetMarkerSize(0.9); f1_500_st->SetMarkerColor(8); f1_500_st->Draw("psame"); fadc_500_st->GetXaxis()->SetLabelSize(0); fadc_500_st->GetYaxis()->SetLabelSize(0); leg = new TLegend(0.4,0.65,0.7,0.85); leg->SetFillColor(0); leg->SetTextSize(0.035); leg->AddEntry(fadc_500,"FADC250 ","p"); leg->AddEntry(fadc125_500,"FADC125 ","p"); leg->AddEntry(f1_500,"F1/CAEN TDC ","p"); leg->Draw(); text -> DrawLatex(25., 110, "Trig Rate 83 kHz"); c1->cd(3); gPad->SetBottomMargin(0.02); gPad->SetTopMargin(0.05); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); fadc_400->GetXaxis()->SetNdivisions(508); fadc_400->GetXaxis()->SetRangeUser(10.,96.); fadc_400->GetYaxis()->SetRangeUser(0.,140); fadc_400->SetMarkerStyle(20); fadc_400->SetMarkerSize(0.9); fadc_400->SetMarkerColor(4); fadc_400->SetTitle(""); fadc_400->Draw("phisto"); fadc_400->GetYaxis()->SetTitle("Data rate (MB/s)"); fadc125_400->SetMarkerStyle(21); fadc125_400->SetMarkerSize(0.9); fadc125_400->SetMarkerColor(2); fadc125_400->Draw("psame"); f1_400->SetMarkerStyle(23); f1_400->SetMarkerSize(0.9); f1_400->SetMarkerColor(8); f1_400->Draw("psame"); fadc_400->GetXaxis()->SetLabelSize(0); text -> SetTextSize(0.07); text -> DrawLatex(30., 125, "400 nA"); text -> SetTextSize(0.05); text -> DrawLatex(25., 110, "Trig Rate 99 kHz"); c1->cd(4); gPad->SetBottomMargin(0.02); gPad->SetTopMargin(0.05); // gPad->SetLeftMargin(0.01); gPad->SetRightMargin(0.05); gPad->SetGrid(1); gPad->SetGrid(1); fadc_400_st->GetXaxis()->SetNdivisions(508); fadc_400_st->GetXaxis()->SetRangeUser(10.,96.); fadc_400_st->GetYaxis()->SetRangeUser(0.,140); fadc_400_st->SetMarkerStyle(20); fadc_400_st->SetMarkerSize(0.9); fadc_400_st->SetMarkerColor(4); fadc_400_st->SetTitle(""); fadc_400_st->Draw("phisto"); fadc_400_st->GetYaxis()->SetTitle("Data rate (MB/s)"); fadc125_400_st->SetMarkerStyle(21); fadc125_400_st->SetMarkerSize(0.9); fadc125_400_st->SetMarkerColor(2); fadc125_400_st->Draw("psame"); f1_400_st->SetMarkerStyle(23); f1_400_st->SetMarkerSize(0.9); f1_400_st->SetMarkerColor(8); f1_400_st->Draw("psame"); fadc_400_st->GetXaxis()->SetLabelSize(0); text -> DrawLatex(25., 110, "Trig Rate 61 kHz"); c1->cd(5); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.05); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); fadc_300->GetXaxis()->SetNdivisions(508); fadc_300->GetXaxis()->SetRangeUser(10.,96.); fadc_300->GetYaxis()->SetRangeUser(0.,140); fadc_300->SetMarkerStyle(20); fadc_300->SetMarkerSize(0.9); fadc_300->SetMarkerColor(4); fadc_300->SetTitle(""); fadc_300->Draw("phisto"); fadc_300->GetYaxis()->SetTitle("Data rate (MB/s)"); fadc125_300->SetMarkerStyle(21); fadc125_300->SetMarkerSize(0.9); fadc125_300->SetMarkerColor(2); fadc125_300->Draw("psame"); f1_300->SetMarkerStyle(23); f1_300->SetMarkerSize(0.9); f1_300->SetMarkerColor(8); f1_300->Draw("psame"); fadc_300->GetXaxis()->SetLabelSize(0); TLatex *text1 = new TLatex(); text1 -> SetTextFont(22); text1 -> SetTextColor(1); text1 -> SetTextSize(0.05); text1 -> SetTextAlign(22); text1 -> SetTextAngle(0); text1 -> DrawLatex(16., -20, "FCAL"); text1 -> SetTextAngle(90); text1 -> DrawLatex(26., -20, "CDC"); text1 -> SetTextAngle(0); text1 -> DrawLatex(36., -20, "BCAL"); text1 -> DrawLatex(56., -20, "FDC"); text1 -> SetTextAngle(90); text1 -> DrawLatex(70., -20, "TAGM"); text1 -> DrawLatex(74., -20, "TAGH"); text1 -> DrawLatex(78., -20, "TOF"); text1 -> DrawLatex(83., -20, "PS1/PS2"); text1 -> DrawLatex(94., -20, "ST"); text -> SetTextSize(0.07); text -> DrawLatex(30., 125, "300 nA"); text -> SetTextSize(0.05); text -> DrawLatex(25., 110, "Trig Rate 73 kHz"); c1->cd(6); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.05); // gPad->SetLeftMargin(0.01); gPad->SetRightMargin(0.05); gPad->SetGrid(1); gPad->SetGrid(1); fadc_300_st->GetXaxis()->SetNdivisions(508); fadc_300_st->GetXaxis()->SetRangeUser(10.,96.); fadc_300_st->GetYaxis()->SetRangeUser(0.,140); fadc_300_st->SetMarkerStyle(20); fadc_300_st->SetMarkerSize(0.9); fadc_300_st->SetMarkerColor(4); fadc_300_st->SetTitle(""); fadc_300_st->Draw("phisto"); fadc_300_st->GetYaxis()->SetTitle("Data rate (MB/s)"); fadc125_300_st->SetMarkerStyle(21); fadc125_300_st->SetMarkerSize(0.9); fadc125_300_st->SetMarkerColor(2); fadc125_300_st->Draw("psame"); f1_300_st->SetMarkerStyle(23); f1_300_st->SetMarkerSize(0.9); f1_300_st->SetMarkerColor(8); f1_300_st->Draw("psame"); fadc_300_st->GetXaxis()->SetLabelSize(0); text -> DrawLatex(25., 110, "Trig Rate 43 kHz"); text1 -> SetTextAngle(0); text1 -> DrawLatex(16., -20, "FCAL"); text1 -> SetTextAngle(90); text1 -> DrawLatex(26., -20, "CDC"); text1 -> SetTextAngle(0); text1 -> DrawLatex(36., -20, "BCAL"); text1 -> DrawLatex(56., -20, "FDC"); text1 -> SetTextAngle(90); text1 -> DrawLatex(70., -20, "TAGM"); text1 -> DrawLatex(74., -20, "TAGH"); text1 -> DrawLatex(78., -20, "TOF"); text1 -> DrawLatex(83., -20, "PS1/PS2"); text1 -> DrawLatex(94., -20, "ST"); #if 0 text1 -> SetTextAngle(0); text1 -> DrawLatex(16., -0.12, "FCAL"); text1 -> SetTextAngle(90); text1 -> DrawLatex(26., -0.12, "CDC"); text1 -> SetTextAngle(0); text1 -> DrawLatex(36., -0.12, "BCAL"); text1 -> DrawLatex(56., -0.12, "FDC"); text1 -> SetTextAngle(90); text1 -> DrawLatex(68., -0.12, "TAGM"); text1 -> DrawLatex(72., -0.12, "TAGH"); text1 -> DrawLatex(78., -0.12, "TOF"); text1 -> DrawLatex(83., -0.12, "PS1/PS2"); text1 -> DrawLatex(94., -0.12, "ST"); #endif 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_500->GetBinContent(crate); // cout << rate_400[ii] << endl; } // BCAL Crates 31, 32, 34, 35, 37, 38, 40, 41 rate_400[12] = fadc_500->GetBinContent(31); rate_400[13] = fadc_500->GetBinContent(32); rate_400[14] = fadc_500->GetBinContent(34); rate_400[15] = fadc_500->GetBinContent(35); rate_400[16] = fadc_500->GetBinContent(37); rate_400[17] = fadc_500->GetBinContent(38); rate_400[18] = fadc_500->GetBinContent(40); rate_400[19] = fadc_500->GetBinContent(41); // ST Crates 94 rate_400[20] = fadc_500->GetBinContent(94); // PS1, PS2 Crates 83, 84 rate_400[21] = fadc_500->GetBinContent(83); rate_400[22] = fadc_500->GetBinContent(84); // TOF Crate 77 rate_400[23] = fadc_500->GetBinContent(77); // TAGM1, TAGH1 Crates 71, 73 rate_400[24] = fadc_500->GetBinContent(71); rate_400[25] = fadc_500->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(); }