void detector_hit_compare(){ 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.06,"t"); Double_t x[6] = {50, 100, 200, 300, 400, 500}; Double_t fcal[6]; Double_t er_fcal[6]; Double_t fcal_ps[6]; Double_t er_fcal_ps[6]; Double_t bcal[6]; Double_t bcal_ps[6]; Double_t fcal_st[6]; Double_t er_fcal_st[6]; Double_t fcal_st_ps[6]; Double_t er_fcal_st_ps[6]; Double_t bcal_st[6]; Double_t bcal_st_ps[6]; Double_t cdc[6]; Double_t er_cdc[6]; Double_t cdc_ps[6]; Double_t er_cdc_ps[6]; Double_t fdc_wire[6]; Double_t fdc_wire_ps[6]; Double_t fdc_cath[6]; Double_t fdc_cath_ps[6]; Double_t cdc_st[6]; Double_t er_cdc_st[6]; Double_t cdc_st_ps[6]; Double_t er_cdc_st_ps[6]; Double_t fdc_st_wire[6]; Double_t fdc_st_wire_ps[6]; Double_t fdc_st_cath[6]; Double_t fdc_st_cath_ps[6]; // TFile f_500("run22084.root"); TFile f_500("run22105.root"); TFile f1_500("run22104.root"); TFile f_400("run22102.root"); TFile f1_400("run22103.root"); TFile f_300("run22106.root"); TFile f1_300("run22108.root"); TFile f_200("run22110.root"); TFile f1_200("run22109.root"); TFile f_100("run22111.root"); TFile f1_100("run22112.root"); TFile f_50("run22114.root"); TFile f1_50("run22113.root"); TH1F *fcal_500 = (TH1F*)f_500.Get("fcal_hits"); TH1F *fcal_ps_500 = (TH1F*)f_500.Get("fcal_hits_ps"); TH1F *bcal_500 = (TH1F*)f_500.Get("bcal_hits"); TH1F *bcal_ps_500 = (TH1F*)f_500.Get("bcal_hits_ps"); TH1F *fcal_400 = (TH1F*)f_400.Get("fcal_hits"); TH1F *fcal_ps_400 = (TH1F*)f_400.Get("fcal_hits_ps"); TH1F *bcal_400 = (TH1F*)f_400.Get("bcal_hits"); TH1F *bcal_ps_400 = (TH1F*)f_400.Get("bcal_hits_ps"); TH1F *fcal_300 = (TH1F*)f_300.Get("fcal_hits"); TH1F *fcal_ps_300 = (TH1F*)f_300.Get("fcal_hits_ps"); TH1F *bcal_300 = (TH1F*)f_300.Get("bcal_hits"); TH1F *bcal_ps_300 = (TH1F*)f_300.Get("bcal_hits_ps"); TH1F *fcal_200 = (TH1F*)f_200.Get("fcal_hits"); TH1F *fcal_ps_200 = (TH1F*)f_200.Get("fcal_hits_ps"); TH1F *bcal_200 = (TH1F*)f_200.Get("bcal_hits"); TH1F *bcal_ps_200 = (TH1F*)f_200.Get("bcal_hits_ps"); TH1F *fcal_100 = (TH1F*)f_100.Get("fcal_hits"); TH1F *fcal_ps_100 = (TH1F*)f_100.Get("fcal_hits_ps"); TH1F *bcal_100 = (TH1F*)f_100.Get("bcal_hits"); TH1F *bcal_ps_100 = (TH1F*)f_100.Get("bcal_hits_ps"); TH1F *fcal_50 = (TH1F*)f_50.Get("fcal_hits"); TH1F *fcal_ps_50 = (TH1F*)f_50.Get("fcal_hits_ps"); TH1F *bcal_50 = (TH1F*)f_50.Get("bcal_hits"); TH1F *bcal_ps_50 = (TH1F*)f_50.Get("bcal_hits_ps"); TH1F *cdc_500 = (TH1F*)f_500.Get("cdc_hits"); TH1F *cdc_ps_500 = (TH1F*)f_500.Get("cdc_hits_ps"); TH1F *fdc_wire_500 = (TH1F*)f_500.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_500 = (TH1F*)f_500.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_500 = (TH1F*)f_500.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_500 = (TH1F*)f_500.Get("fdc_cath_hits_ps"); TH1F *cdc_400 = (TH1F*)f_400.Get("cdc_hits"); TH1F *cdc_ps_400 = (TH1F*)f_400.Get("cdc_hits_ps"); TH1F *fdc_wire_400 = (TH1F*)f_400.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_400 = (TH1F*)f_400.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_400 = (TH1F*)f_400.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_400 = (TH1F*)f_400.Get("fdc_cath_hits_ps"); TH1F *cdc_300 = (TH1F*)f_300.Get("cdc_hits"); TH1F *cdc_ps_300 = (TH1F*)f_300.Get("cdc_hits_ps"); TH1F *fdc_wire_300 = (TH1F*)f_300.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_300 = (TH1F*)f_300.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_300 = (TH1F*)f_300.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_300 = (TH1F*)f_300.Get("fdc_cath_hits_ps"); TH1F *cdc_200 = (TH1F*)f_200.Get("cdc_hits"); TH1F *cdc_ps_200 = (TH1F*)f_200.Get("cdc_hits_ps"); TH1F *fdc_wire_200 = (TH1F*)f_200.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_200 = (TH1F*)f_200.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_200 = (TH1F*)f_200.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_200 = (TH1F*)f_200.Get("fdc_cath_hits_ps"); TH1F *cdc_100 = (TH1F*)f_100.Get("cdc_hits"); TH1F *cdc_ps_100 = (TH1F*)f_100.Get("cdc_hits_ps"); TH1F *fdc_wire_100 = (TH1F*)f_100.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_100 = (TH1F*)f_100.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_100 = (TH1F*)f_100.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_100 = (TH1F*)f_100.Get("fdc_cath_hits_ps"); TH1F *cdc_50 = (TH1F*)f_50.Get("cdc_hits"); TH1F *cdc_ps_50 = (TH1F*)f_50.Get("cdc_hits_ps"); TH1F *fdc_wire_50 = (TH1F*)f_50.Get("fdc_wire_hits"); TH1F *fdc_wire_ps_50 = (TH1F*)f_50.Get("fdc_wire_hits_ps"); TH1F *fdc_cath_50 = (TH1F*)f_50.Get("fdc_cath_hits"); TH1F *fdc_cath_ps_50 = (TH1F*)f_50.Get("fdc_cath_hits_ps"); // ------------------------------------------------------------ TH1F *fcal_st_500 = (TH1F*)f1_500.Get("fcal_hits"); TH1F *fcal_st_ps_500 = (TH1F*)f1_500.Get("fcal_hits_ps"); TH1F *bcal_st_500 = (TH1F*)f1_500.Get("bcal_hits"); TH1F *bcal_st_ps_500 = (TH1F*)f1_500.Get("bcal_hits_ps"); TH1F *fcal_st_400 = (TH1F*)f1_400.Get("fcal_hits"); TH1F *fcal_st_ps_400 = (TH1F*)f1_400.Get("fcal_hits_ps"); TH1F *bcal_st_400 = (TH1F*)f1_400.Get("bcal_hits"); TH1F *bcal_st_ps_400 = (TH1F*)f1_400.Get("bcal_hits_ps"); TH1F *fcal_st_300 = (TH1F*)f1_300.Get("fcal_hits"); TH1F *fcal_st_ps_300 = (TH1F*)f1_300.Get("fcal_hits_ps"); TH1F *bcal_st_300 = (TH1F*)f1_300.Get("bcal_hits"); TH1F *bcal_st_ps_300 = (TH1F*)f1_300.Get("bcal_hits_ps"); TH1F *fcal_st_200 = (TH1F*)f1_200.Get("fcal_hits"); TH1F *fcal_st_ps_200 = (TH1F*)f1_200.Get("fcal_hits_ps"); TH1F *bcal_st_200 = (TH1F*)f1_200.Get("bcal_hits"); TH1F *bcal_st_ps_200 = (TH1F*)f1_200.Get("bcal_hits_ps"); TH1F *fcal_st_100 = (TH1F*)f1_100.Get("fcal_hits"); TH1F *fcal_st_ps_100 = (TH1F*)f1_100.Get("fcal_hits_ps"); TH1F *bcal_st_100 = (TH1F*)f1_100.Get("bcal_hits"); TH1F *bcal_st_ps_100 = (TH1F*)f1_100.Get("bcal_hits_ps"); TH1F *fcal_st_50 = (TH1F*)f1_50.Get("fcal_hits"); TH1F *fcal_st_ps_50 = (TH1F*)f1_50.Get("fcal_hits_ps"); TH1F *bcal_st_50 = (TH1F*)f1_50.Get("bcal_hits"); TH1F *bcal_st_ps_50 = (TH1F*)f1_50.Get("bcal_hits_ps"); TH1F *cdc_st_500 = (TH1F*)f1_500.Get("cdc_hits"); TH1F *cdc_st_ps_500 = (TH1F*)f1_500.Get("cdc_hits_ps"); TH1F *fdc_st_wire_500 = (TH1F*)f1_500.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_500 = (TH1F*)f1_500.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_500 = (TH1F*)f1_500.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_500 = (TH1F*)f1_500.Get("fdc_cath_hits_ps"); TH1F *cdc_st_400 = (TH1F*)f1_400.Get("cdc_hits"); TH1F *cdc_st_ps_400 = (TH1F*)f1_400.Get("cdc_hits_ps"); TH1F *fdc_st_wire_400 = (TH1F*)f1_400.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_400 = (TH1F*)f1_400.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_400 = (TH1F*)f1_400.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_400 = (TH1F*)f1_400.Get("fdc_cath_hits_ps"); TH1F *cdc_st_300 = (TH1F*)f1_300.Get("cdc_hits"); TH1F *cdc_st_ps_300 = (TH1F*)f1_300.Get("cdc_hits_ps"); TH1F *fdc_st_wire_300 = (TH1F*)f1_300.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_300 = (TH1F*)f1_300.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_300 = (TH1F*)f1_300.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_300 = (TH1F*)f1_300.Get("fdc_cath_hits_ps"); TH1F *cdc_st_200 = (TH1F*)f1_200.Get("cdc_hits"); TH1F *cdc_st_ps_200 = (TH1F*)f1_200.Get("cdc_hits_ps"); TH1F *fdc_st_wire_200 = (TH1F*)f1_200.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_200 = (TH1F*)f1_200.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_200 = (TH1F*)f1_200.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_200 = (TH1F*)f1_200.Get("fdc_cath_hits_ps"); TH1F *cdc_st_100 = (TH1F*)f1_100.Get("cdc_hits"); TH1F *cdc_st_ps_100 = (TH1F*)f1_100.Get("cdc_hits_ps"); TH1F *fdc_st_wire_100 = (TH1F*)f1_100.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_100 = (TH1F*)f1_100.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_100 = (TH1F*)f1_100.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_100 = (TH1F*)f1_100.Get("fdc_cath_hits_ps"); TH1F *cdc_st_50 = (TH1F*)f1_50.Get("cdc_hits"); TH1F *cdc_st_ps_50 = (TH1F*)f1_50.Get("cdc_hits_ps"); TH1F *fdc_st_wire_50 = (TH1F*)f1_50.Get("fdc_wire_hits"); TH1F *fdc_st_wire_ps_50 = (TH1F*)f1_50.Get("fdc_wire_hits_ps"); TH1F *fdc_st_cath_50 = (TH1F*)f1_50.Get("fdc_cath_hits"); TH1F *fdc_st_cath_ps_50 = (TH1F*)f1_50.Get("fdc_cath_hits_ps"); fcal[0] = fcal_50->GetMean(1); fcal[1] = fcal_100->GetMean(1); fcal[2] = fcal_200->GetMean(1); fcal[3] = fcal_300->GetMean(1); fcal[4] = fcal_400->GetMean(1); fcal[5] = fcal_500->GetMean(1); fcal_ps[0] = fcal_ps_50->GetMean(1); fcal_ps[1] = fcal_ps_100->GetMean(1); fcal_ps[2] = fcal_ps_200->GetMean(1); fcal_ps[3] = fcal_ps_300->GetMean(1); fcal_ps[4] = fcal_ps_400->GetMean(1); fcal_ps[5] = fcal_ps_500->GetMean(1); bcal[0] = bcal_50->GetMean(1); bcal[1] = bcal_100->GetMean(1); bcal[2] = bcal_200->GetMean(1); bcal[3] = bcal_300->GetMean(1); bcal[4] = bcal_400->GetMean(1); bcal[5] = bcal_500->GetMean(1); bcal_ps[0] = bcal_ps_50->GetMean(1); bcal_ps[1] = bcal_ps_100->GetMean(1); bcal_ps[2] = bcal_ps_200->GetMean(1); bcal_ps[3] = bcal_ps_300->GetMean(1); bcal_ps[4] = bcal_ps_400->GetMean(1); bcal_ps[5] = bcal_ps_500->GetMean(1); cdc[0] = cdc_50->GetMean(1); cdc[1] = cdc_100->GetMean(1); cdc[2] = cdc_200->GetMean(1); cdc[3] = cdc_300->GetMean(1); cdc[4] = cdc_400->GetMean(1); cdc[5] = cdc_500->GetMean(1); cdc_ps[0] = cdc_ps_50->GetMean(1); cdc_ps[1] = cdc_ps_100->GetMean(1); cdc_ps[2] = cdc_ps_200->GetMean(1); cdc_ps[3] = cdc_ps_300->GetMean(1); cdc_ps[4] = cdc_ps_400->GetMean(1); cdc_ps[5] = cdc_ps_500->GetMean(1); fdc_wire[0] = fdc_wire_50->GetMean(1); fdc_wire[1] = fdc_wire_100->GetMean(1); fdc_wire[2] = fdc_wire_200->GetMean(1); fdc_wire[3] = fdc_wire_300->GetMean(1); fdc_wire[4] = fdc_wire_400->GetMean(1); fdc_wire[5] = fdc_wire_500->GetMean(1); fdc_wire_ps[0] = fdc_wire_ps_50->GetMean(1); fdc_wire_ps[1] = fdc_wire_ps_100->GetMean(1); fdc_wire_ps[2] = fdc_wire_ps_200->GetMean(1); fdc_wire_ps[3] = fdc_wire_ps_300->GetMean(1); fdc_wire_ps[4] = fdc_wire_ps_400->GetMean(1); fdc_wire_ps[5] = fdc_wire_ps_500->GetMean(1); fdc_cath[0] = fdc_cath_50->GetMean(1); fdc_cath[1] = fdc_cath_100->GetMean(1); fdc_cath[2] = fdc_cath_200->GetMean(1); fdc_cath[3] = fdc_cath_300->GetMean(1); fdc_cath[4] = fdc_cath_400->GetMean(1); fdc_cath[5] = fdc_cath_500->GetMean(1); fdc_cath_ps[0] = fdc_cath_ps_50->GetMean(1); fdc_cath_ps[1] = fdc_cath_ps_100->GetMean(1); fdc_cath_ps[2] = fdc_cath_ps_200->GetMean(1); fdc_cath_ps[3] = fdc_cath_ps_300->GetMean(1); fdc_cath_ps[4] = fdc_cath_ps_400->GetMean(1); fdc_cath_ps[5] = fdc_cath_ps_500->GetMean(1); // ------------------------------------------------ fcal_st[0] = fcal_st_50->GetMean(1); fcal_st[1] = fcal_st_100->GetMean(1); fcal_st[2] = fcal_st_200->GetMean(1); fcal_st[3] = fcal_st_300->GetMean(1); fcal_st[4] = fcal_st_400->GetMean(1); fcal_st[5] = fcal_st_500->GetMean(1); fcal_st_ps[0] = fcal_st_ps_50->GetMean(1); fcal_st_ps[1] = fcal_st_ps_100->GetMean(1); fcal_st_ps[2] = fcal_st_ps_200->GetMean(1); fcal_st_ps[3] = fcal_st_ps_300->GetMean(1); fcal_st_ps[4] = fcal_st_ps_400->GetMean(1); fcal_st_ps[5] = fcal_st_ps_500->GetMean(1); bcal_st[0] = bcal_st_50->GetMean(1); bcal_st[1] = bcal_st_100->GetMean(1); bcal_st[2] = bcal_st_200->GetMean(1); bcal_st[3] = bcal_st_300->GetMean(1); bcal_st[4] = bcal_st_400->GetMean(1); bcal_st[5] = bcal_st_500->GetMean(1); bcal_st_ps[0] = bcal_st_ps_50->GetMean(1); bcal_st_ps[1] = bcal_st_ps_100->GetMean(1); bcal_st_ps[2] = bcal_st_ps_200->GetMean(1); bcal_st_ps[3] = bcal_st_ps_300->GetMean(1); bcal_st_ps[4] = bcal_st_ps_400->GetMean(1); bcal_st_ps[5] = bcal_st_ps_500->GetMean(1); cdc_st[0] = cdc_st_50->GetMean(1); cdc_st[1] = cdc_st_100->GetMean(1); cdc_st[2] = cdc_st_200->GetMean(1); cdc_st[3] = cdc_st_300->GetMean(1); cdc_st[4] = cdc_st_400->GetMean(1); cdc_st[5] = cdc_st_500->GetMean(1); cdc_st_ps[0] = cdc_st_ps_50->GetMean(1); cdc_st_ps[1] = cdc_st_ps_100->GetMean(1); cdc_st_ps[2] = cdc_st_ps_200->GetMean(1); cdc_st_ps[3] = cdc_st_ps_300->GetMean(1); cdc_st_ps[4] = cdc_st_ps_400->GetMean(1); cdc_st_ps[5] = cdc_st_ps_500->GetMean(1); fdc_st_wire[0] = fdc_st_wire_50->GetMean(1); fdc_st_wire[1] = fdc_st_wire_100->GetMean(1); fdc_st_wire[2] = fdc_st_wire_200->GetMean(1); fdc_st_wire[3] = fdc_st_wire_300->GetMean(1); fdc_st_wire[4] = fdc_st_wire_400->GetMean(1); fdc_st_wire[5] = fdc_st_wire_500->GetMean(1); fdc_st_wire_ps[0] = fdc_st_wire_ps_50->GetMean(1); fdc_st_wire_ps[1] = fdc_st_wire_ps_100->GetMean(1); fdc_st_wire_ps[2] = fdc_st_wire_ps_200->GetMean(1); fdc_st_wire_ps[3] = fdc_st_wire_ps_300->GetMean(1); fdc_st_wire_ps[4] = fdc_st_wire_ps_400->GetMean(1); fdc_st_wire_ps[5] = fdc_st_wire_ps_500->GetMean(1); fdc_st_cath[0] = fdc_st_cath_50->GetMean(1); fdc_st_cath[1] = fdc_st_cath_100->GetMean(1); fdc_st_cath[2] = fdc_st_cath_200->GetMean(1); fdc_st_cath[3] = fdc_st_cath_300->GetMean(1); fdc_st_cath[4] = fdc_st_cath_400->GetMean(1); fdc_st_cath[5] = fdc_st_cath_500->GetMean(1); fdc_st_cath_ps[0] = fdc_st_cath_ps_50->GetMean(1); fdc_st_cath_ps[1] = fdc_st_cath_ps_100->GetMean(1); fdc_st_cath_ps[2] = fdc_st_cath_ps_200->GetMean(1); fdc_st_cath_ps[3] = fdc_st_cath_ps_300->GetMean(1); fdc_st_cath_ps[4] = fdc_st_cath_ps_400->GetMean(1); fdc_st_cath_ps[5] = fdc_st_cath_ps_500->GetMean(1); cout << cdc_ps_500->GetMean(1) << " " << cdc_ps_500->GetRMS(1) << endl; Double_t fcal_fr[6], bcal_fr[6]; Double_t fcal_sig[6], bcal_sig[6]; Double_t fcal_st_fr[6], bcal_st_fr[6]; Double_t fcal_st_sig[6], bcal_st_sig[6]; Double_t cdc_fr[6], fdc_wire_fr[6], fdc_cath_fr[6]; Double_t cdc_sig[6], fdc_wire_sig[6], fdc_cath_sig[6]; Double_t cdc_st_fr[6], fdc_st_wire_fr[6], fdc_st_cath_fr[6]; Double_t cdc_st_sig[6], fdc_st_wire_sig[6], fdc_st_cath_sig[6]; for(int ss = 0; ss < 6; ss++){ // cdc_fr[ss] = (cdc[ss] - cdc_ps[ss])/cdc[ss]; // fdc_wire_fr[ss] = (fdc_wire[ss] - fdc_wire_ps[ss])/fdc_wire[ss]; // fdc_cath_fr[ss] = (fdc_cath[ss] - fdc_cath_ps[ss])/fdc_cath[ss]; fcal_fr[ss] = (fcal_ps[ss])/fcal[ss]; bcal_fr[ss] = (bcal_ps[ss])/bcal[ss]; fcal_sig[ss] = fcal[ss] - fcal_ps[ss]; bcal_sig[ss] = bcal[ss] - bcal_ps[ss]; fcal_st_fr[ss] = (fcal_st_ps[ss])/fcal_st[ss]; bcal_st_fr[ss] = (bcal_st_ps[ss])/bcal_st[ss]; fcal_st_sig[ss] = fcal_st[ss] - fcal_st_ps[ss]; bcal_st_sig[ss] = bcal_st[ss] - bcal_st_ps[ss]; cdc_fr[ss] = (cdc_ps[ss])/cdc[ss]; fdc_wire_fr[ss] = (fdc_wire_ps[ss])/fdc_wire[ss]; fdc_cath_fr[ss] = (fdc_cath_ps[ss])/fdc_cath[ss]; cdc_sig[ss] = cdc[ss] - cdc_ps[ss]; fdc_wire_sig[ss] = fdc_wire[ss] - fdc_wire_ps[ss]; fdc_cath_sig[ss] = fdc_cath[ss] - fdc_cath_ps[ss]; // cout << cdc_st[ss] << endl; cdc_st_fr[ss] = (cdc_st_ps[ss])/cdc_st[ss]; fdc_st_wire_fr[ss] = (fdc_st_wire_ps[ss])/fdc_st_wire[ss]; fdc_st_cath_fr[ss] = (fdc_st_cath_ps[ss])/fdc_st_cath[ss]; cdc_st_sig[ss] = cdc_st[ss] - cdc_st_ps[ss]; fdc_st_wire_sig[ss] = fdc_st_wire[ss] - fdc_st_wire_ps[ss]; fdc_st_cath_sig[ss] = fdc_st_cath[ss] - fdc_st_cath_ps[ss]; } TCanvas *c1 = new TCanvas("c1","Cosmic",200,10, 800, 500); c1->Divide(2,1,0,0); c1->cd(1); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.15); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); TGraph *gr_cdc_sig = new TGraph(6, x, cdc_sig); gr_cdc_sig->SetMarkerStyle(20); gr_cdc_sig->SetMarkerSize(1.2); gr_cdc_sig->SetMarkerColor(2); gr_cdc_sig->GetXaxis()->SetRangeUser(0.,550); gr_cdc_sig->GetYaxis()->SetRangeUser(0.,600); gr_cdc_sig->Draw("APL"); TGraph *gr_cdc_st_sig = new TGraph(6, x, cdc_st_sig); gr_cdc_st_sig->SetMarkerStyle(24); gr_cdc_st_sig->SetMarkerSize(1.2); gr_cdc_st_sig->SetMarkerColor(2); gr_cdc_st_sig->Draw("PLsame"); TGraph *gr_fdc_wire_sig = new TGraph(6, x, fdc_wire_sig); gr_fdc_wire_sig->SetMarkerStyle(21); gr_fdc_wire_sig->SetMarkerSize(1.2); gr_fdc_wire_sig->SetMarkerColor(4); gr_fdc_wire_sig->Draw("PLsame"); TGraph *gr_fdc_st_wire_sig = new TGraph(6, x, fdc_st_wire_sig); gr_fdc_st_wire_sig->SetMarkerStyle(25); gr_fdc_st_wire_sig->SetMarkerSize(1.2); gr_fdc_st_wire_sig->SetMarkerColor(4); gr_fdc_st_wire_sig->Draw("PLsame"); TGraph *gr_fdc_cath_sig = new TGraph(6, x, fdc_cath_sig); gr_fdc_cath_sig->SetMarkerStyle(22); gr_fdc_cath_sig->SetMarkerSize(1.2); gr_fdc_cath_sig->SetMarkerColor(6); gr_fdc_cath_sig->Draw("PLsame"); TGraph *gr_fdc_st_cath_sig = new TGraph(6, x, fdc_st_cath_sig); gr_fdc_st_cath_sig->SetMarkerStyle(26); gr_fdc_st_cath_sig->SetMarkerSize(1.2); gr_fdc_st_cath_sig->SetMarkerColor(6); gr_fdc_st_cath_sig->Draw("PLsame"); // gr_cdc_sig->SetTitle("CDC / FDC"); gr_cdc_sig->SetTitle(" "); gr_cdc_sig->GetXaxis()->SetTitle("Current (nA)"); gr_cdc_sig->GetYaxis()->SetTitle("Number of hits"); leg = new TLegend(0.2,0.65,0.6,0.85); leg->SetFillColor(0); leg->SetTextSize(0.04); leg->AddEntry(gr_fdc_st_cath_sig, "FDC Cathode (ST) ","p"); leg->AddEntry(gr_fdc_cath_sig, "FDC Cathode ","p"); leg->AddEntry(gr_fdc_st_wire_sig, "FDC Wire (ST) ","p"); leg->AddEntry(gr_fdc_wire_sig, "FDC Wire ","p"); leg->AddEntry(gr_cdc_st_sig, "CDC (ST) ","p"); leg->AddEntry(gr_cdc_sig, "CDC ","p"); leg->Draw(); c1->cd(2); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.15); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); TGraph *gr_fcal_sig = new TGraph(6, x, fcal_sig); gr_fcal_sig->SetMarkerStyle(20); gr_fcal_sig->SetMarkerSize(1.2); gr_fcal_sig->SetMarkerColor(2); gr_fcal_sig->GetXaxis()->SetRangeUser(0.,550); gr_fcal_sig->GetYaxis()->SetRangeUser(0.,90); gr_fcal_sig->Draw("APL"); TGraph *gr_fcal_st_sig = new TGraph(6, x, fcal_st_sig); gr_fcal_st_sig->SetMarkerStyle(24); gr_fcal_st_sig->SetMarkerSize(1.2); gr_fcal_st_sig->SetMarkerColor(2); gr_fcal_st_sig->Draw("PLsame"); TGraph *gr_bcal_sig = new TGraph(6, x, bcal_sig); gr_bcal_sig->SetMarkerStyle(21); gr_bcal_sig->SetMarkerSize(1.2); gr_bcal_sig->SetMarkerColor(4); gr_bcal_sig->Draw("PLsame"); gr_fcal_sig->SetTitle(""); gr_fcal_sig->GetXaxis()->SetTitle("Current (nA)"); // gr_fcal_sig->GetYaxis()->SetTitle("Number of hits"); TGraph *gr_bcal_st_sig = new TGraph(6, x, bcal_st_sig); gr_bcal_st_sig->SetMarkerStyle(25); gr_bcal_st_sig->SetMarkerSize(1.2); gr_bcal_st_sig->SetMarkerColor(4); gr_bcal_st_sig->Draw("PLsame"); leg1 = new TLegend(0.2,0.65,0.6,0.85); leg1->SetFillColor(0); leg1->SetTextSize(0.04); leg1->AddEntry(gr_bcal_st_sig, "BCAL FADC250 (ST) ","p"); leg1->AddEntry(gr_bcal_sig, "BCAL FADC250 ","p"); leg1->AddEntry(gr_fcal_st_sig, "FCAL (ST) ","p"); leg1->AddEntry(gr_fcal_sig, "FCAL ","p"); leg1->Draw(); }