void detector_hit4(){ 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.055,"xy"); gStyle->SetTitleOffset(1.0,"x"); gStyle->SetTitleOffset(0.9,"y"); gStyle->SetTitleBorderSize(0); gStyle->SetTitleSize(0.06,"t"); Double_t x[6] = {50, 100, 200, 300, 400, 500}; // Double_t x[6] = {0.909, 1.891, 3.62, 5.63, 7.39, 9.33 }; Double_t tagm[6]; Double_t er_tagm[6]; Double_t tagm_ps[6]; Double_t er_tagm_ps[6]; Double_t tagh[6]; Double_t tagh_ps[6]; Double_t tagh_f1[6]; Double_t tagh_f1_ps[6]; Double_t tagm_f1[6]; Double_t tagm_f1_ps[6]; TFile f_500("run22084.root"); // TFile f_500("run22105.root"); // TFile f_500("run22104.root"); TFile f_400("run22102.root"); // TFile f_400("run22103.root"); TFile f_300("run22106.root"); // TFile f_300("run22108.root"); TFile f_200("run22110.root"); // TFile f_200("run22109.root"); TFile f_100("run22111.root"); // TFile f_100("run22112.root"); TFile f_50("run22114.root"); // TFile f_50("run22113.root"); TH1F *tagm_500 = (TH1F*)f_500.Get("tagm_hits"); TH1F *tagm_ps_500 = (TH1F*)f_500.Get("tagm_hits_ps"); TH1F *tagm_f1_500 = (TH1F*)f_500.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_500 = (TH1F*)f_500.Get("tagm_f1_hits_ps"); TH1F *tagh_500 = (TH1F*)f_500.Get("tagh_hits"); TH1F *tagh_ps_500 = (TH1F*)f_500.Get("tagh_hits_ps"); TH1F *tagh_f1_500 = (TH1F*)f_500.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_500 = (TH1F*)f_500.Get("tagh_f1_hits_ps"); TH1F *tagm_400 = (TH1F*)f_400.Get("tagm_hits"); TH1F *tagm_ps_400 = (TH1F*)f_400.Get("tagm_hits_ps"); TH1F *tagm_f1_400 = (TH1F*)f_400.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_400 = (TH1F*)f_400.Get("tagm_f1_hits_ps"); TH1F *tagh_400 = (TH1F*)f_400.Get("tagh_hits"); TH1F *tagh_ps_400 = (TH1F*)f_400.Get("tagh_hits_ps"); TH1F *tagh_f1_400 = (TH1F*)f_400.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_400 = (TH1F*)f_400.Get("tagh_f1_hits_ps"); TH1F *tagm_300 = (TH1F*)f_300.Get("tagm_hits"); TH1F *tagm_ps_300 = (TH1F*)f_300.Get("tagm_hits_ps"); TH1F *tagm_f1_300 = (TH1F*)f_300.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_300 = (TH1F*)f_300.Get("tagm_f1_hits_ps"); TH1F *tagh_300 = (TH1F*)f_300.Get("tagh_hits"); TH1F *tagh_ps_300 = (TH1F*)f_300.Get("tagh_hits_ps"); TH1F *tagh_f1_300 = (TH1F*)f_300.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_300 = (TH1F*)f_300.Get("tagh_f1_hits_ps"); TH1F *tagm_200 = (TH1F*)f_200.Get("tagm_hits"); TH1F *tagm_ps_200 = (TH1F*)f_200.Get("tagm_hits_ps"); TH1F *tagm_f1_200 = (TH1F*)f_200.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_200 = (TH1F*)f_200.Get("tagm_f1_hits_ps"); TH1F *tagh_200 = (TH1F*)f_200.Get("tagh_hits"); TH1F *tagh_ps_200 = (TH1F*)f_200.Get("tagh_hits_ps"); TH1F *tagh_f1_200 = (TH1F*)f_200.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_200 = (TH1F*)f_200.Get("tagh_f1_hits_ps"); TH1F *tagm_100 = (TH1F*)f_100.Get("tagm_hits"); TH1F *tagm_ps_100 = (TH1F*)f_100.Get("tagm_hits_ps"); TH1F *tagm_f1_100 = (TH1F*)f_100.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_100 = (TH1F*)f_100.Get("tagm_f1_hits_ps"); TH1F *tagh_100 = (TH1F*)f_100.Get("tagh_hits"); TH1F *tagh_ps_100 = (TH1F*)f_100.Get("tagh_hits_ps"); TH1F *tagh_f1_100 = (TH1F*)f_100.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_100 = (TH1F*)f_100.Get("tagh_f1_hits_ps"); TH1F *tagm_50 = (TH1F*)f_50.Get("tagm_hits"); TH1F *tagm_ps_50 = (TH1F*)f_50.Get("tagm_hits_ps"); TH1F *tagm_f1_50 = (TH1F*)f_50.Get("tagm_f1_hits"); TH1F *tagm_f1_ps_50 = (TH1F*)f_50.Get("tagm_f1_hits_ps"); TH1F *tagh_50 = (TH1F*)f_50.Get("tagh_hits"); TH1F *tagh_ps_50 = (TH1F*)f_50.Get("tagh_hits_ps"); TH1F *tagh_f1_50 = (TH1F*)f_50.Get("tagh_f1_hits"); TH1F *tagh_f1_ps_50 = (TH1F*)f_50.Get("tagh_f1_hits_ps"); tagm[0] = tagm_50->GetMean(1); tagm[1] = tagm_100->GetMean(1); tagm[2] = tagm_200->GetMean(1); tagm[3] = tagm_300->GetMean(1); tagm[4] = tagm_400->GetMean(1); tagm[5] = tagm_500->GetMean(1); tagm_ps[0] = tagm_ps_50->GetMean(1); tagm_ps[1] = tagm_ps_100->GetMean(1); tagm_ps[2] = tagm_ps_200->GetMean(1); tagm_ps[3] = tagm_ps_300->GetMean(1); tagm_ps[4] = tagm_ps_400->GetMean(1); tagm_ps[5] = tagm_ps_500->GetMean(1); tagh[0] = tagh_50->GetMean(1); tagh[1] = tagh_100->GetMean(1); tagh[2] = tagh_200->GetMean(1); tagh[3] = tagh_300->GetMean(1); tagh[4] = tagh_400->GetMean(1); tagh[5] = tagh_500->GetMean(1); tagh_ps[0] = tagh_ps_50->GetMean(1); tagh_ps[1] = tagh_ps_100->GetMean(1); tagh_ps[2] = tagh_ps_200->GetMean(1); tagh_ps[3] = tagh_ps_300->GetMean(1); tagh_ps[4] = tagh_ps_400->GetMean(1); tagh_ps[5] = tagh_ps_500->GetMean(1); tagh_f1[0] = tagh_f1_50->GetMean(1); tagh_f1[1] = tagh_f1_100->GetMean(1); tagh_f1[2] = tagh_f1_200->GetMean(1); tagh_f1[3] = tagh_f1_300->GetMean(1); tagh_f1[4] = tagh_f1_400->GetMean(1); tagh_f1[5] = tagh_f1_500->GetMean(1); tagh_f1_ps[0] = tagh_f1_ps_50->GetMean(1); tagh_f1_ps[1] = tagh_f1_ps_100->GetMean(1); tagh_f1_ps[2] = tagh_f1_ps_200->GetMean(1); tagh_f1_ps[3] = tagh_f1_ps_300->GetMean(1); tagh_f1_ps[4] = tagh_f1_ps_400->GetMean(1); tagh_f1_ps[5] = tagh_f1_ps_500->GetMean(1); tagm_f1[0] = tagm_f1_50->GetMean(1); tagm_f1[1] = tagm_f1_100->GetMean(1); tagm_f1[2] = tagm_f1_200->GetMean(1); tagm_f1[3] = tagm_f1_300->GetMean(1); tagm_f1[4] = tagm_f1_400->GetMean(1); tagm_f1[5] = tagm_f1_500->GetMean(1); cout << tagm_ps_500->GetMean(1) << " " << tagm_ps_500->GetRMS(1) << endl; TCanvas *c1 = new TCanvas("c1","Cosmic",200,10, 700, 500); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.1); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); TGraph *gr_tagm = new TGraph(6, x, tagm); gr_tagm->SetMarkerStyle(20); gr_tagm->SetMarkerSize(1.2); gr_tagm->SetMarkerColor(2); gr_tagm->GetXaxis()->SetRangeUser(0.,550); gr_tagm->GetYaxis()->SetRangeUser(0.,140); gr_tagm->SetTitle("Hit multiplicity"); gr_tagm->GetXaxis()->SetTitle("Current (nA)"); gr_tagm->GetYaxis()->SetTitle("Number of hits"); gr_tagm->Draw("APL"); TGraph *gr_tagh = new TGraph(6, x, tagh); gr_tagh->SetMarkerStyle(21); gr_tagh->SetMarkerSize(1.2); gr_tagh->SetMarkerColor(4); gr_tagh->Draw("PLsame"); TGraph *gr_tagh_f1 = new TGraph(6, x, tagh_f1); gr_tagh_f1->SetMarkerStyle(22); gr_tagh_f1->SetMarkerSize(1.2); gr_tagh_f1->SetMarkerColor(4); gr_tagh_f1->Draw("PLsame"); TGraph *gr_tagm_f1 = new TGraph(6, x, tagm_f1); gr_tagm_f1->SetMarkerStyle(23); gr_tagm_f1->SetMarkerSize(1.2); gr_tagm_f1->SetMarkerColor(2); gr_tagm_f1->Draw("PLsame"); TLatex *text1 = new TLatex(); text1 -> SetTextFont(22); text1 -> SetTextColor(1); text1 -> SetTextSize(0.05); text1 -> SetTextAlign(22); text1 -> SetTextAngle(0); text1 -> DrawLatex(350, 130, "FCAL & BCAL Trigger"); leg = new TLegend(0.2,0.65,0.45,0.85); leg->SetFillColor(0); leg->SetTextSize(0.035); leg->AddEntry(gr_tagm,"TAGM fadc250 ","p"); leg->AddEntry(gr_tagm_f1,"TAGM TDC ","p"); leg->AddEntry(gr_tagh,"TAGH fadc250 ","p"); leg->AddEntry(gr_tagh_f1,"TAGH TDC ","p"); leg->Draw(); }