void atten_sums(void) { gROOT->Reset(); //TTree *Bfield = (TTree *) gROOT->FindObject("Bfield"); gStyle->SetPalette(1,0); gStyle->SetOptStat(kFALSE); gStyle->SetOptFit(kTRUE); gStyle->SetOptFit(1111); gStyle->SetPadRightMargin(0.15); gStyle->SetPadLeftMargin(0.15); gStyle->SetPadBottomMargin(0.15); gStyle->SetFillColor(0); // char string[256]; Int_t j,jj; // histogram parameters Int_t nbins=1000; Double_t mu=0.0787; // unis of 1/x Double_t sigma=0.865; // units of x Double_t gain=350; Double_t t0=39.5; Double_t pedestal=2; // fill histogram with pulse information Double_t Rup = 0.10; // up reflection coefficient Double_t Rdn = Rup; // dn reflection coefficient Double_t L = 390; // length of BCAL module Double_t veff = 17; // effective velocity in module Double_t xposmin = -L/2; // position of interaction Double_t xposmax = L/2; // position of interaction Double_t lambda = 436; // GlueX-doc-2049 // Double_t lambda = 500; // define histogram to hold pulses Double_t xmin=-100; Double_t xmax=300; TH1F *hupSum_wave= new TH1F("hupSum_wave","Up Sum waveform", nbins,xmin,xmax); TH1F *hdnSum_wave= new TH1F("hdnSum_wave","Down Sum waveform", nbins,xmin,xmax); Int_t pbins=100; TProfile *hup_integ = new TProfile("hup_integ","Up integral", pbins,xposmin,xposmax); TProfile *hdn_integ = new TProfile("hdn_integ","Down integral", pbins,xposmin,xposmax); TProfile *hup_peak = new TProfile("hup_peak","Up peak", pbins,xposmin,xposmax); TProfile *hdn_peak = new TProfile("hdn_peak","Down peak", pbins,xposmin,xposmax); TProfile *hup_ratio = new TProfile("hup_ratio","Up peak/integral", pbins,xposmin,xposmax); TProfile *hdn_ratio = new TProfile("hdn_ratio","Down peak/integral", pbins,xposmin,xposmax); Double_t xpmin=0; Double_t xpmax=100; TF1 *pulse = new TF1("pulse_func",pulse_func,xpmin,xpmax,5); pulse->SetParameters(mu,sigma,gain,t0,pedestal); pulse->SetParNames("mu","sigma","gain","t0","pedestal"); Double_t xpos; // TRandom1 *r = new TRandom1(); // use to randomize position within // loop over positions along the length of the module Int_t npos=pbins; for (j=0;jEval(up_x) - pedestal); Double_t upR_time = -(-xpos+L)/veff + time0 ; Double_t upR_atten = exp(-(L/2-xpos+L)/lambda); Double_t upR_x = upR_time/4 + t0; Double_t upR_y = upR_atten*Rup*(pulse->Eval(upR_x) - pedestal); Double_t dn_time = xpos/veff + time0; Double_t dn_atten = exp(-(L/2-xpos)/lambda); Double_t dn_x = dn_time/4 + t0; Double_t dn_y = dn_atten*(pulse->Eval(dn_x) - pedestal); Double_t dnR_time = -(xpos+L)/veff + time0; Double_t dnR_atten = exp(-(L/2+xpos+L)/lambda); Double_t dnR_x = dnR_time/4 + t0; Double_t dnR_y = dnR_atten*Rdn*(pulse->Eval(dnR_x) - pedestal); hupSum_wave->Fill(time0,up_y); hupSum_wave->Fill(time0,upR_y); hdnSum_wave->Fill(time0,dn_y); hdnSum_wave->Fill(time0,dnR_y); // printf (" jj=%d time0=%f up_time=%f up_x=%f up_y=%f dn_time=%f dn_x=%f dn_y=%f\n",jj,time0,up_time,up_x,up_y,dn_time,dn_x,dn_y); // printf (" jj=%d time0=%f upR_time=%f upR_x=%f upR_y=%f dnR_time=%f dnR_x=%f dnR_y=%f\n",jj,time0,upR_time,upR_x,upR_y,dnR_time,dnR_x,dnR_y); } // extract information from histograms and fill Double_t up_integral = hupSum_wave->GetSum()/10; // compensate for finer binning in wave histogram Double_t up_peak = hupSum_wave->GetMaximum(); Double_t dn_integral = hdnSum_wave->GetSum()/10; // compensate for finer binning in wave histogram Double_t dn_peak = hdnSum_wave->GetMaximum(); hup_integ->Fill(xpos,up_integral); hup_peak->Fill(xpos,up_peak); hdn_integ->Fill(xpos,dn_integral); hdn_peak->Fill(xpos,dn_peak); hup_ratio->Fill(xpos,1000*up_peak/up_integral); hdn_ratio->Fill(xpos,1000*dn_peak/dn_integral); // printf (" xpos=%f up integral=%f, up peak=%f, dn integral=%f, dn peak=%f\n",xpos,up_integral,up_peak,dn_integral,dn_peak); // reset histograms hupSum_wave->Reset(); hdnSum_wave->Reset(); // end loop over positions } TCanvas *c2 = new TCanvas("c2", "c2",200,10,700,700); c2->SetBorderMode(0); c2->SetFillColor(0); c2->SetGridx(); c2->SetGridy(); c2->Divide(2,2); c2->cd(1); c2_1->SetBorderMode(0); c2_1->SetFillColor(0); hup_integ->SetTitle(""); hup_integ->GetXaxis()->SetLabelSize(0.05); hup_integ->GetXaxis()->SetTitleSize(0.05); hup_integ->GetYaxis()->SetLabelSize(0.05); hup_integ->GetYaxis()->SetTitleSize(0.05); hup_integ->GetYaxis()->SetTitleOffset(1.5); hup_integ->GetYaxis()->SetTitle("UP integral"); hup_integ->GetXaxis()->SetTitle("position (cm)"); hup_integ->GetXaxis()->SetNdivisions(505); hup_integ->SetLineColor(2); hup_integ->Fit("expo"); hup_integ->Draw(); // get fit information TF1 *fit = hup_integ->GetFunction("expo"); Float_t p0 = fit->GetParameter(0); Float_t slope = fit->GetParameter(1); Float_t p0err = fit->GetParError(0); Float_t slopeerr = fit->GetParError(1); Float_t chi2= fit->GetChisquare(); Int_t ndf= fit->GetNDF(); Double_t fit_lambda = 1/slope; Double_t fit_lambda_err = fit_lambda*(slopeerr/slope); sprintf (string,"Fit #lambda=%.1f #pm %.1fcm\n",fit_lambda,fit_lambda_err); printf("string=%s",string); t1 = new TLatex(0.2,0.3,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); sprintf (string,"Input #lambda=%.1f cm, R=%.2f\n",lambda,Rup); printf("string=%s",string); t1 = new TLatex(0.2,0.92,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); c2->cd(2); c2_2->SetBorderMode(0); c2_2->SetFillColor(0); hdn_integ->SetTitle(""); hdn_integ->GetXaxis()->SetLabelSize(0.05); hdn_integ->GetXaxis()->SetTitleSize(0.05); hdn_integ->GetYaxis()->SetLabelSize(0.05); hdn_integ->GetYaxis()->SetTitleSize(0.05); hdn_integ->GetYaxis()->SetTitleOffset(1.5); hdn_integ->GetYaxis()->SetTitle("DOWN integral"); hdn_integ->GetXaxis()->SetTitle("position (cm)"); hdn_integ->GetXaxis()->SetNdivisions(505); hdn_integ->SetLineColor(4); hdn_integ->Fit("expo"); hdn_integ->Draw(); // get fit information TF1 *fit = hdn_integ->GetFunction("expo"); Float_t p0 = fit->GetParameter(0); Float_t slope = fit->GetParameter(1); Float_t p0err = fit->GetParError(0); Float_t slopeerr = fit->GetParError(1); Float_t chi2= fit->GetChisquare(); Int_t ndf= fit->GetNDF(); Double_t fit_lambda = 1/slope; Double_t fit_lambda_err = fit_lambda*(slopeerr/slope); sprintf (string,"Fit #lambda=%.1f #pm %.1fcm\n",fit_lambda,fit_lambda_err); printf("string=%s",string); t1 = new TLatex(0.2,0.3,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); c2->cd(3); c2_3->SetBorderMode(0); c2_3->SetFillColor(0); hup_peak->SetTitle(""); hup_peak->GetXaxis()->SetLabelSize(0.05); hup_peak->GetXaxis()->SetTitleSize(0.05); hup_peak->GetYaxis()->SetLabelSize(0.05); hup_peak->GetYaxis()->SetTitleSize(0.05); hup_peak->GetYaxis()->SetTitleOffset(1.5); hup_peak->GetYaxis()->SetTitle("UP peak"); hup_peak->GetXaxis()->SetTitle("position (cm)"); hup_peak->GetXaxis()->SetNdivisions(505); hup_peak->SetLineColor(2); hup_peak->Fit("expo"); hup_peak->Draw(); // get fit information TF1 *fit = hup_peak->GetFunction("expo"); Float_t p0 = fit->GetParameter(0); Float_t slope = fit->GetParameter(1); Float_t p0err = fit->GetParError(0); Float_t slopeerr = fit->GetParError(1); Float_t chi2= fit->GetChisquare(); Int_t ndf= fit->GetNDF(); Double_t fit_lambda = 1/slope; Double_t fit_lambda_err = fit_lambda*(slopeerr/slope); sprintf (string,"Fit #lambda=%.1f #pm %.1fcm\n",fit_lambda,fit_lambda_err); printf("string=%s",string); t1 = new TLatex(0.2,0.3,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); c2->cd(4); c2_4->SetBorderMode(0); c2_4->SetFillColor(0); hdn_peak->SetTitle(""); hdn_peak->GetXaxis()->SetLabelSize(0.05); hdn_peak->GetXaxis()->SetTitleSize(0.05); hdn_peak->GetYaxis()->SetLabelSize(0.05); hdn_peak->GetYaxis()->SetTitleSize(0.05); hdn_peak->GetYaxis()->SetTitleOffset(1.5); hdn_peak->GetYaxis()->SetTitle("DOWN peak"); hdn_peak->GetXaxis()->SetTitle("position (cm)"); hdn_peak->GetXaxis()->SetNdivisions(505); hdn_peak->SetLineColor(4); hdn_peak->Fit("expo"); hdn_peak->Draw(); // get fit information TF1 *fit = hdn_peak->GetFunction("expo"); Float_t p0 = fit->GetParameter(0); Float_t slope = fit->GetParameter(1); Float_t p0err = fit->GetParError(0); Float_t slopeerr = fit->GetParError(1); Float_t chi2= fit->GetChisquare(); Int_t ndf= fit->GetNDF(); Double_t fit_lambda = 1/slope; Double_t fit_lambda_err = fit_lambda*(slopeerr/slope); sprintf (string,"Fit #lambda=%.1f #pm %.1fcm\n",fit_lambda,fit_lambda_err); printf("string=%s",string); t1 = new TLatex(0.2,0.3,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); TCanvas *c3 = new TCanvas("c3", "c3",200,10,700,700); c3->SetBorderMode(0); c3->SetFillColor(0); c3->SetGridx(); c3->SetGridy(); c3->Divide(1,2); c3->cd(1); c3_1->SetBorderMode(0); c3_1->SetFillColor(0); ymin=60; // ymin=0.04; ymax=70; hup_ratio->SetTitle(""); // hup_ratio->GetXaxis()->SetRangeUser(xmin,xmax); hup_ratio->GetYaxis()->SetRangeUser(ymin,ymax); hup_ratio->GetXaxis()->SetLabelSize(0.05); hup_ratio->GetXaxis()->SetTitleSize(0.05); hup_ratio->GetYaxis()->SetLabelSize(0.05); hup_ratio->GetYaxis()->SetTitleSize(0.05); hup_ratio->GetYaxis()->SetTitleOffset(1.5); hup_ratio->GetYaxis()->SetTitle("UP Peak/Integral (10^{-3})"); hup_ratio->GetXaxis()->SetTitle("position (cm)"); hup_ratio->GetXaxis()->SetNdivisions(505); hup_ratio->SetLineColor(2); TProfile *PeakoverIntUSvsPosAll_1513 = new TProfile("PeakoverIntUSvsPosAll_1513","BCAL Upstream",100,-200,200,""); PeakoverIntUSvsPosAll_1513->SetBinEntries(0,15337); PeakoverIntUSvsPosAll_1513->SetBinEntries(1,21745); PeakoverIntUSvsPosAll_1513->SetBinEntries(2,25167); PeakoverIntUSvsPosAll_1513->SetBinEntries(3,26655); PeakoverIntUSvsPosAll_1513->SetBinEntries(4,20295); PeakoverIntUSvsPosAll_1513->SetBinEntries(5,20898); PeakoverIntUSvsPosAll_1513->SetBinEntries(6,17394); PeakoverIntUSvsPosAll_1513->SetBinEntries(7,19362); PeakoverIntUSvsPosAll_1513->SetBinEntries(8,16734); PeakoverIntUSvsPosAll_1513->SetBinEntries(9,19231); PeakoverIntUSvsPosAll_1513->SetBinEntries(10,16793); PeakoverIntUSvsPosAll_1513->SetBinEntries(11,19657); PeakoverIntUSvsPosAll_1513->SetBinEntries(12,17343); PeakoverIntUSvsPosAll_1513->SetBinEntries(13,20498); PeakoverIntUSvsPosAll_1513->SetBinEntries(14,18601); PeakoverIntUSvsPosAll_1513->SetBinEntries(15,21791); PeakoverIntUSvsPosAll_1513->SetBinEntries(16,19064); PeakoverIntUSvsPosAll_1513->SetBinEntries(17,23866); PeakoverIntUSvsPosAll_1513->SetBinEntries(18,24125); PeakoverIntUSvsPosAll_1513->SetBinEntries(19,22264); PeakoverIntUSvsPosAll_1513->SetBinEntries(20,25690); PeakoverIntUSvsPosAll_1513->SetBinEntries(21,23372); PeakoverIntUSvsPosAll_1513->SetBinEntries(22,27695); PeakoverIntUSvsPosAll_1513->SetBinEntries(23,24766); PeakoverIntUSvsPosAll_1513->SetBinEntries(24,29208); PeakoverIntUSvsPosAll_1513->SetBinEntries(25,26360); PeakoverIntUSvsPosAll_1513->SetBinEntries(26,30640); PeakoverIntUSvsPosAll_1513->SetBinEntries(27,27209); PeakoverIntUSvsPosAll_1513->SetBinEntries(28,32127); PeakoverIntUSvsPosAll_1513->SetBinEntries(29,28256); PeakoverIntUSvsPosAll_1513->SetBinEntries(30,32976); PeakoverIntUSvsPosAll_1513->SetBinEntries(31,29677); PeakoverIntUSvsPosAll_1513->SetBinEntries(32,34720); PeakoverIntUSvsPosAll_1513->SetBinEntries(33,30214); PeakoverIntUSvsPosAll_1513->SetBinEntries(34,36420); PeakoverIntUSvsPosAll_1513->SetBinEntries(35,36266); PeakoverIntUSvsPosAll_1513->SetBinEntries(36,32515); PeakoverIntUSvsPosAll_1513->SetBinEntries(37,36408); PeakoverIntUSvsPosAll_1513->SetBinEntries(38,32468); PeakoverIntUSvsPosAll_1513->SetBinEntries(39,37095); PeakoverIntUSvsPosAll_1513->SetBinEntries(40,32687); PeakoverIntUSvsPosAll_1513->SetBinEntries(41,38063); PeakoverIntUSvsPosAll_1513->SetBinEntries(42,33325); PeakoverIntUSvsPosAll_1513->SetBinEntries(43,38545); PeakoverIntUSvsPosAll_1513->SetBinEntries(44,33456); PeakoverIntUSvsPosAll_1513->SetBinEntries(45,38078); PeakoverIntUSvsPosAll_1513->SetBinEntries(46,33436); PeakoverIntUSvsPosAll_1513->SetBinEntries(47,37800); PeakoverIntUSvsPosAll_1513->SetBinEntries(48,33049); PeakoverIntUSvsPosAll_1513->SetBinEntries(49,37916); PeakoverIntUSvsPosAll_1513->SetBinEntries(50,32231); PeakoverIntUSvsPosAll_1513->SetBinEntries(51,38739); PeakoverIntUSvsPosAll_1513->SetBinEntries(52,37495); PeakoverIntUSvsPosAll_1513->SetBinEntries(53,32638); PeakoverIntUSvsPosAll_1513->SetBinEntries(54,37055); PeakoverIntUSvsPosAll_1513->SetBinEntries(55,32328); PeakoverIntUSvsPosAll_1513->SetBinEntries(56,37585); PeakoverIntUSvsPosAll_1513->SetBinEntries(57,33200); PeakoverIntUSvsPosAll_1513->SetBinEntries(58,38162); PeakoverIntUSvsPosAll_1513->SetBinEntries(59,33090); PeakoverIntUSvsPosAll_1513->SetBinEntries(60,38341); PeakoverIntUSvsPosAll_1513->SetBinEntries(61,33108); PeakoverIntUSvsPosAll_1513->SetBinEntries(62,37772); PeakoverIntUSvsPosAll_1513->SetBinEntries(63,32667); PeakoverIntUSvsPosAll_1513->SetBinEntries(64,37050); PeakoverIntUSvsPosAll_1513->SetBinEntries(65,33233); PeakoverIntUSvsPosAll_1513->SetBinEntries(66,37149); PeakoverIntUSvsPosAll_1513->SetBinEntries(67,31980); PeakoverIntUSvsPosAll_1513->SetBinEntries(68,37736); PeakoverIntUSvsPosAll_1513->SetBinEntries(69,37014); PeakoverIntUSvsPosAll_1513->SetBinEntries(70,32194); PeakoverIntUSvsPosAll_1513->SetBinEntries(71,35937); PeakoverIntUSvsPosAll_1513->SetBinEntries(72,31315); PeakoverIntUSvsPosAll_1513->SetBinEntries(73,35974); PeakoverIntUSvsPosAll_1513->SetBinEntries(74,31521); PeakoverIntUSvsPosAll_1513->SetBinEntries(75,36394); PeakoverIntUSvsPosAll_1513->SetBinEntries(76,31740); PeakoverIntUSvsPosAll_1513->SetBinEntries(77,36300); PeakoverIntUSvsPosAll_1513->SetBinEntries(78,31315); PeakoverIntUSvsPosAll_1513->SetBinEntries(79,35917); PeakoverIntUSvsPosAll_1513->SetBinEntries(80,31213); PeakoverIntUSvsPosAll_1513->SetBinEntries(81,35532); PeakoverIntUSvsPosAll_1513->SetBinEntries(82,31724); PeakoverIntUSvsPosAll_1513->SetBinEntries(83,35966); PeakoverIntUSvsPosAll_1513->SetBinEntries(84,31283); PeakoverIntUSvsPosAll_1513->SetBinEntries(85,37403); PeakoverIntUSvsPosAll_1513->SetBinEntries(86,37848); PeakoverIntUSvsPosAll_1513->SetBinEntries(87,33447); PeakoverIntUSvsPosAll_1513->SetBinEntries(88,38080); PeakoverIntUSvsPosAll_1513->SetBinEntries(89,34088); PeakoverIntUSvsPosAll_1513->SetBinEntries(90,39240); PeakoverIntUSvsPosAll_1513->SetBinEntries(91,35418); PeakoverIntUSvsPosAll_1513->SetBinEntries(92,41355); PeakoverIntUSvsPosAll_1513->SetBinEntries(93,36917); PeakoverIntUSvsPosAll_1513->SetBinEntries(94,42430); PeakoverIntUSvsPosAll_1513->SetBinEntries(95,37392); PeakoverIntUSvsPosAll_1513->SetBinEntries(96,42766); PeakoverIntUSvsPosAll_1513->SetBinEntries(97,36927); PeakoverIntUSvsPosAll_1513->SetBinEntries(98,39766); PeakoverIntUSvsPosAll_1513->SetBinEntries(99,27612); PeakoverIntUSvsPosAll_1513->SetBinEntries(100,18797); PeakoverIntUSvsPosAll_1513->SetBinEntries(101,12581); PeakoverIntUSvsPosAll_1513->SetBinContent(0,987457.7); PeakoverIntUSvsPosAll_1513->SetBinContent(1,1425025); PeakoverIntUSvsPosAll_1513->SetBinContent(2,1649886); PeakoverIntUSvsPosAll_1513->SetBinContent(3,1745378); PeakoverIntUSvsPosAll_1513->SetBinContent(4,1325031); PeakoverIntUSvsPosAll_1513->SetBinContent(5,1361937); PeakoverIntUSvsPosAll_1513->SetBinContent(6,1132221); PeakoverIntUSvsPosAll_1513->SetBinContent(7,1260898); PeakoverIntUSvsPosAll_1513->SetBinContent(8,1088193); PeakoverIntUSvsPosAll_1513->SetBinContent(9,1248599); PeakoverIntUSvsPosAll_1513->SetBinContent(10,1089966); PeakoverIntUSvsPosAll_1513->SetBinContent(11,1273748); PeakoverIntUSvsPosAll_1513->SetBinContent(12,1122822); PeakoverIntUSvsPosAll_1513->SetBinContent(13,1327584); PeakoverIntUSvsPosAll_1513->SetBinContent(14,1202648); PeakoverIntUSvsPosAll_1513->SetBinContent(15,1407913); PeakoverIntUSvsPosAll_1513->SetBinContent(16,1230958); PeakoverIntUSvsPosAll_1513->SetBinContent(17,1537028); PeakoverIntUSvsPosAll_1513->SetBinContent(18,1556479); PeakoverIntUSvsPosAll_1513->SetBinContent(19,1435566); PeakoverIntUSvsPosAll_1513->SetBinContent(20,1653786); PeakoverIntUSvsPosAll_1513->SetBinContent(21,1503294); PeakoverIntUSvsPosAll_1513->SetBinContent(22,1782921); PeakoverIntUSvsPosAll_1513->SetBinContent(23,1591840); PeakoverIntUSvsPosAll_1513->SetBinContent(24,1875825); PeakoverIntUSvsPosAll_1513->SetBinContent(25,1694398); PeakoverIntUSvsPosAll_1513->SetBinContent(26,1966339); PeakoverIntUSvsPosAll_1513->SetBinContent(27,1744351); PeakoverIntUSvsPosAll_1513->SetBinContent(28,2060657); PeakoverIntUSvsPosAll_1513->SetBinContent(29,1810266); PeakoverIntUSvsPosAll_1513->SetBinContent(30,2111185); PeakoverIntUSvsPosAll_1513->SetBinContent(31,1898965); PeakoverIntUSvsPosAll_1513->SetBinContent(32,2218931); PeakoverIntUSvsPosAll_1513->SetBinContent(33,1932253); PeakoverIntUSvsPosAll_1513->SetBinContent(34,2329677); PeakoverIntUSvsPosAll_1513->SetBinContent(35,2316774); PeakoverIntUSvsPosAll_1513->SetBinContent(36,2074523); PeakoverIntUSvsPosAll_1513->SetBinContent(37,2325830); PeakoverIntUSvsPosAll_1513->SetBinContent(38,2070003); PeakoverIntUSvsPosAll_1513->SetBinContent(39,2365780); PeakoverIntUSvsPosAll_1513->SetBinContent(40,2082268); PeakoverIntUSvsPosAll_1513->SetBinContent(41,2426864); PeakoverIntUSvsPosAll_1513->SetBinContent(42,2121663); PeakoverIntUSvsPosAll_1513->SetBinContent(43,2454942); PeakoverIntUSvsPosAll_1513->SetBinContent(44,2128171); PeakoverIntUSvsPosAll_1513->SetBinContent(45,2422724); PeakoverIntUSvsPosAll_1513->SetBinContent(46,2124723); PeakoverIntUSvsPosAll_1513->SetBinContent(47,2400682); PeakoverIntUSvsPosAll_1513->SetBinContent(48,2100257); PeakoverIntUSvsPosAll_1513->SetBinContent(49,2408357); PeakoverIntUSvsPosAll_1513->SetBinContent(50,2045329); PeakoverIntUSvsPosAll_1513->SetBinContent(51,2456894); PeakoverIntUSvsPosAll_1513->SetBinContent(52,2379688); PeakoverIntUSvsPosAll_1513->SetBinContent(53,2069794); PeakoverIntUSvsPosAll_1513->SetBinContent(54,2346000); PeakoverIntUSvsPosAll_1513->SetBinContent(55,2045378); PeakoverIntUSvsPosAll_1513->SetBinContent(56,2378843); PeakoverIntUSvsPosAll_1513->SetBinContent(57,2100129); PeakoverIntUSvsPosAll_1513->SetBinContent(58,2409444); PeakoverIntUSvsPosAll_1513->SetBinContent(59,2088138); PeakoverIntUSvsPosAll_1513->SetBinContent(60,2424286); PeakoverIntUSvsPosAll_1513->SetBinContent(61,2092910); PeakoverIntUSvsPosAll_1513->SetBinContent(62,2384715); PeakoverIntUSvsPosAll_1513->SetBinContent(63,2063310); PeakoverIntUSvsPosAll_1513->SetBinContent(64,2342170); PeakoverIntUSvsPosAll_1513->SetBinContent(65,2099266); PeakoverIntUSvsPosAll_1513->SetBinContent(66,2346008); PeakoverIntUSvsPosAll_1513->SetBinContent(67,2019527); PeakoverIntUSvsPosAll_1513->SetBinContent(68,2392581); PeakoverIntUSvsPosAll_1513->SetBinContent(69,2346199); PeakoverIntUSvsPosAll_1513->SetBinContent(70,2047198); PeakoverIntUSvsPosAll_1513->SetBinContent(71,2287403); PeakoverIntUSvsPosAll_1513->SetBinContent(72,1999994); PeakoverIntUSvsPosAll_1513->SetBinContent(73,2305149); PeakoverIntUSvsPosAll_1513->SetBinContent(74,2023950); PeakoverIntUSvsPosAll_1513->SetBinContent(75,2343175); PeakoverIntUSvsPosAll_1513->SetBinContent(76,2050225); PeakoverIntUSvsPosAll_1513->SetBinContent(77,2350029); PeakoverIntUSvsPosAll_1513->SetBinContent(78,2034960); PeakoverIntUSvsPosAll_1513->SetBinContent(79,2344151); PeakoverIntUSvsPosAll_1513->SetBinContent(80,2042248); PeakoverIntUSvsPosAll_1513->SetBinContent(81,2330824); PeakoverIntUSvsPosAll_1513->SetBinContent(82,2086084); PeakoverIntUSvsPosAll_1513->SetBinContent(83,2372972); PeakoverIntUSvsPosAll_1513->SetBinContent(84,2070727); PeakoverIntUSvsPosAll_1513->SetBinContent(85,2479116); PeakoverIntUSvsPosAll_1513->SetBinContent(86,2513944); PeakoverIntUSvsPosAll_1513->SetBinContent(87,2229275); PeakoverIntUSvsPosAll_1513->SetBinContent(88,2543650); PeakoverIntUSvsPosAll_1513->SetBinContent(89,2282994); PeakoverIntUSvsPosAll_1513->SetBinContent(90,2633181); PeakoverIntUSvsPosAll_1513->SetBinContent(91,2379437); PeakoverIntUSvsPosAll_1513->SetBinContent(92,2782005); PeakoverIntUSvsPosAll_1513->SetBinContent(93,2490261); PeakoverIntUSvsPosAll_1513->SetBinContent(94,2867698); PeakoverIntUSvsPosAll_1513->SetBinContent(95,2530804); PeakoverIntUSvsPosAll_1513->SetBinContent(96,2898880); PeakoverIntUSvsPosAll_1513->SetBinContent(97,2504199); PeakoverIntUSvsPosAll_1513->SetBinContent(98,2705535); PeakoverIntUSvsPosAll_1513->SetBinContent(99,1891822); PeakoverIntUSvsPosAll_1513->SetBinContent(100,1297604); PeakoverIntUSvsPosAll_1513->SetBinContent(101,890061.8); PeakoverIntUSvsPosAll_1513->SetBinError(0,8056.739); PeakoverIntUSvsPosAll_1513->SetBinError(1,9705.99); PeakoverIntUSvsPosAll_1513->SetBinError(2,10441.37); PeakoverIntUSvsPosAll_1513->SetBinError(3,10732.62); PeakoverIntUSvsPosAll_1513->SetBinError(4,9339.68); PeakoverIntUSvsPosAll_1513->SetBinError(5,9463.016); PeakoverIntUSvsPosAll_1513->SetBinError(6,8621.327); PeakoverIntUSvsPosAll_1513->SetBinError(7,9099.791); PeakoverIntUSvsPosAll_1513->SetBinError(8,8448.563); PeakoverIntUSvsPosAll_1513->SetBinError(9,9048.949); PeakoverIntUSvsPosAll_1513->SetBinError(10,8451.6); PeakoverIntUSvsPosAll_1513->SetBinError(11,9132.045); PeakoverIntUSvsPosAll_1513->SetBinError(12,8572.1); PeakoverIntUSvsPosAll_1513->SetBinError(13,9319.193); PeakoverIntUSvsPosAll_1513->SetBinError(14,8865.241); PeakoverIntUSvsPosAll_1513->SetBinError(15,9589.374); PeakoverIntUSvsPosAll_1513->SetBinError(16,8960.056); PeakoverIntUSvsPosAll_1513->SetBinError(17,10008.84); PeakoverIntUSvsPosAll_1513->SetBinError(18,10074.95); PeakoverIntUSvsPosAll_1513->SetBinError(19,9678.365); PeakoverIntUSvsPosAll_1513->SetBinError(20,10374.66); PeakoverIntUSvsPosAll_1513->SetBinError(21,9892.829); PeakoverIntUSvsPosAll_1513->SetBinError(22,10777.54); PeakoverIntUSvsPosAll_1513->SetBinError(23,10175.36); PeakoverIntUSvsPosAll_1513->SetBinError(24,11041.14); PeakoverIntUSvsPosAll_1513->SetBinError(25,10493.65); PeakoverIntUSvsPosAll_1513->SetBinError(26,11299.71); PeakoverIntUSvsPosAll_1513->SetBinError(27,10641.57); PeakoverIntUSvsPosAll_1513->SetBinError(28,11567.97); PeakoverIntUSvsPosAll_1513->SetBinError(29,10837.16); PeakoverIntUSvsPosAll_1513->SetBinError(30,11698.25); PeakoverIntUSvsPosAll_1513->SetBinError(31,11094.21); PeakoverIntUSvsPosAll_1513->SetBinError(32,11986.21); PeakoverIntUSvsPosAll_1513->SetBinError(33,11181.73); PeakoverIntUSvsPosAll_1513->SetBinError(34,12283.78); PeakoverIntUSvsPosAll_1513->SetBinError(35,12244.6); PeakoverIntUSvsPosAll_1513->SetBinError(36,11577.3); PeakoverIntUSvsPosAll_1513->SetBinError(37,12268.23); PeakoverIntUSvsPosAll_1513->SetBinError(38,11562.87); PeakoverIntUSvsPosAll_1513->SetBinError(39,12363.45); PeakoverIntUSvsPosAll_1513->SetBinError(40,11611.48); PeakoverIntUSvsPosAll_1513->SetBinError(41,12542.24); PeakoverIntUSvsPosAll_1513->SetBinError(42,11700.53); PeakoverIntUSvsPosAll_1513->SetBinError(43,12596.35); PeakoverIntUSvsPosAll_1513->SetBinError(44,11712.51); PeakoverIntUSvsPosAll_1513->SetBinError(45,12502.47); PeakoverIntUSvsPosAll_1513->SetBinError(46,11709.3); PeakoverIntUSvsPosAll_1513->SetBinError(47,12439.74); PeakoverIntUSvsPosAll_1513->SetBinError(48,11637.93); PeakoverIntUSvsPosAll_1513->SetBinError(49,12453.53); PeakoverIntUSvsPosAll_1513->SetBinError(50,11471.11); PeakoverIntUSvsPosAll_1513->SetBinError(51,12565.28); PeakoverIntUSvsPosAll_1513->SetBinError(52,12371.83); PeakoverIntUSvsPosAll_1513->SetBinError(53,11545.52); PeakoverIntUSvsPosAll_1513->SetBinError(54,12263.6); PeakoverIntUSvsPosAll_1513->SetBinError(55,11447.41); PeakoverIntUSvsPosAll_1513->SetBinError(56,12351.96); PeakoverIntUSvsPosAll_1513->SetBinError(57,11607.73); PeakoverIntUSvsPosAll_1513->SetBinError(58,12417); PeakoverIntUSvsPosAll_1513->SetBinError(59,12172.47); PeakoverIntUSvsPosAll_1513->SetBinError(60,12465.8); PeakoverIntUSvsPosAll_1513->SetBinError(61,11577.08); PeakoverIntUSvsPosAll_1513->SetBinError(62,12356.95); PeakoverIntUSvsPosAll_1513->SetBinError(63,11491.23); PeakoverIntUSvsPosAll_1513->SetBinError(64,12266.28); PeakoverIntUSvsPosAll_1513->SetBinError(65,11589.66); PeakoverIntUSvsPosAll_1513->SetBinError(66,12267.6); PeakoverIntUSvsPosAll_1513->SetBinError(67,11360.04); PeakoverIntUSvsPosAll_1513->SetBinError(68,12418.53); PeakoverIntUSvsPosAll_1513->SetBinError(69,12270.19); PeakoverIntUSvsPosAll_1513->SetBinError(70,11514.67); PeakoverIntUSvsPosAll_1513->SetBinError(71,12143.29); PeakoverIntUSvsPosAll_1513->SetBinError(72,11504.23); PeakoverIntUSvsPosAll_1513->SetBinError(73,12286.23); PeakoverIntUSvsPosAll_1513->SetBinError(74,11471.61); PeakoverIntUSvsPosAll_1513->SetBinError(75,12378.42); PeakoverIntUSvsPosAll_1513->SetBinError(76,11577.9); PeakoverIntUSvsPosAll_1513->SetBinError(77,12427.97); PeakoverIntUSvsPosAll_1513->SetBinError(78,11568.69); PeakoverIntUSvsPosAll_1513->SetBinError(79,12450.05); PeakoverIntUSvsPosAll_1513->SetBinError(80,11631.34); PeakoverIntUSvsPosAll_1513->SetBinError(81,12452.45); PeakoverIntUSvsPosAll_1513->SetBinError(82,11802.15); PeakoverIntUSvsPosAll_1513->SetBinError(83,12587.63); PeakoverIntUSvsPosAll_1513->SetBinError(84,11890.85); PeakoverIntUSvsPosAll_1513->SetBinError(85,12902.4); PeakoverIntUSvsPosAll_1513->SetBinError(86,13001.8); PeakoverIntUSvsPosAll_1513->SetBinError(87,12263.27); PeakoverIntUSvsPosAll_1513->SetBinError(88,13135.32); PeakoverIntUSvsPosAll_1513->SetBinError(89,12451.17); PeakoverIntUSvsPosAll_1513->SetBinError(90,13381.66); PeakoverIntUSvsPosAll_1513->SetBinError(91,12723.24); PeakoverIntUSvsPosAll_1513->SetBinError(92,13785.98); PeakoverIntUSvsPosAll_1513->SetBinError(93,13053.83); PeakoverIntUSvsPosAll_1513->SetBinError(94,14039.36); PeakoverIntUSvsPosAll_1513->SetBinError(95,13226.54); PeakoverIntUSvsPosAll_1513->SetBinError(96,14113.56); PeakoverIntUSvsPosAll_1513->SetBinError(97,13312.33); PeakoverIntUSvsPosAll_1513->SetBinError(98,13653.58); PeakoverIntUSvsPosAll_1513->SetBinError(99,11463.83); PeakoverIntUSvsPosAll_1513->SetBinError(100,9543.855); PeakoverIntUSvsPosAll_1513->SetBinError(101,8114.927); PeakoverIntUSvsPosAll_1513->SetEntries(3182222); hup_ratio->Draw(); PeakoverIntUSvsPosAll_1513->SetLineColor(1); PeakoverIntUSvsPosAll_1513->Draw("same"); TLegend *leg = new TLegend(0.4,0.7,0.75,0.9); leg->AddEntry(hup_ratio,"Simulation","l"); leg->AddEntry(PeakoverIntUSvsPosAll_1513,"Data Run 1513","l"); leg->Draw(); sprintf (string,"Input #lambda=%.1f cm, R=%.2f\n",lambda,Rup); printf("string=%s",string); t1 = new TLatex(0.2,0.92,string); t1->SetNDC(); t1->SetTextSize(0.05); t1->Draw(); c3->cd(2); c3_2->SetBorderMode(0); c3_2->SetFillColor(0); hdn_ratio->SetTitle(""); // hdn_ratio->GetXaxis()->SetRangeUser(xmin,xmax); hdn_ratio->GetYaxis()->SetRangeUser(ymin,ymax); hdn_ratio->GetXaxis()->SetLabelSize(0.05); hdn_ratio->GetXaxis()->SetTitleSize(0.05); hdn_ratio->GetYaxis()->SetLabelSize(0.05); hdn_ratio->GetYaxis()->SetTitleSize(0.05); hdn_ratio->GetYaxis()->SetTitleOffset(1.5); hdn_ratio->GetYaxis()->SetTitle("DOWN Peak/Integral (10^{-3})"); hdn_ratio->GetXaxis()->SetTitle("position (cm)"); hdn_ratio->GetXaxis()->SetNdivisions(505); hdn_ratio->SetLineColor(2); TProfile *PeakoverIntDSvsPosAll_1513 = new TProfile("PeakoverIntDSvsPosAll_1513","BCAL downstream",100,-200,200,""); PeakoverIntDSvsPosAll_1513->SetBinEntries(0,15337); PeakoverIntDSvsPosAll_1513->SetBinEntries(1,21745); PeakoverIntDSvsPosAll_1513->SetBinEntries(2,25167); PeakoverIntDSvsPosAll_1513->SetBinEntries(3,26655); PeakoverIntDSvsPosAll_1513->SetBinEntries(4,20295); PeakoverIntDSvsPosAll_1513->SetBinEntries(5,20898); PeakoverIntDSvsPosAll_1513->SetBinEntries(6,17394); PeakoverIntDSvsPosAll_1513->SetBinEntries(7,19362); PeakoverIntDSvsPosAll_1513->SetBinEntries(8,16734); PeakoverIntDSvsPosAll_1513->SetBinEntries(9,19231); PeakoverIntDSvsPosAll_1513->SetBinEntries(10,16793); PeakoverIntDSvsPosAll_1513->SetBinEntries(11,19657); PeakoverIntDSvsPosAll_1513->SetBinEntries(12,17343); PeakoverIntDSvsPosAll_1513->SetBinEntries(13,20498); PeakoverIntDSvsPosAll_1513->SetBinEntries(14,18601); PeakoverIntDSvsPosAll_1513->SetBinEntries(15,21791); PeakoverIntDSvsPosAll_1513->SetBinEntries(16,19064); PeakoverIntDSvsPosAll_1513->SetBinEntries(17,23866); PeakoverIntDSvsPosAll_1513->SetBinEntries(18,24125); PeakoverIntDSvsPosAll_1513->SetBinEntries(19,22264); PeakoverIntDSvsPosAll_1513->SetBinEntries(20,25690); PeakoverIntDSvsPosAll_1513->SetBinEntries(21,23372); PeakoverIntDSvsPosAll_1513->SetBinEntries(22,27695); PeakoverIntDSvsPosAll_1513->SetBinEntries(23,24766); PeakoverIntDSvsPosAll_1513->SetBinEntries(24,29208); PeakoverIntDSvsPosAll_1513->SetBinEntries(25,26360); PeakoverIntDSvsPosAll_1513->SetBinEntries(26,30640); PeakoverIntDSvsPosAll_1513->SetBinEntries(27,27209); PeakoverIntDSvsPosAll_1513->SetBinEntries(28,32127); PeakoverIntDSvsPosAll_1513->SetBinEntries(29,28256); PeakoverIntDSvsPosAll_1513->SetBinEntries(30,32976); PeakoverIntDSvsPosAll_1513->SetBinEntries(31,29677); PeakoverIntDSvsPosAll_1513->SetBinEntries(32,34720); PeakoverIntDSvsPosAll_1513->SetBinEntries(33,30214); PeakoverIntDSvsPosAll_1513->SetBinEntries(34,36420); PeakoverIntDSvsPosAll_1513->SetBinEntries(35,36266); PeakoverIntDSvsPosAll_1513->SetBinEntries(36,32515); PeakoverIntDSvsPosAll_1513->SetBinEntries(37,36408); PeakoverIntDSvsPosAll_1513->SetBinEntries(38,32468); PeakoverIntDSvsPosAll_1513->SetBinEntries(39,37095); PeakoverIntDSvsPosAll_1513->SetBinEntries(40,32687); PeakoverIntDSvsPosAll_1513->SetBinEntries(41,38063); PeakoverIntDSvsPosAll_1513->SetBinEntries(42,33325); PeakoverIntDSvsPosAll_1513->SetBinEntries(43,38545); PeakoverIntDSvsPosAll_1513->SetBinEntries(44,33456); PeakoverIntDSvsPosAll_1513->SetBinEntries(45,38078); PeakoverIntDSvsPosAll_1513->SetBinEntries(46,33436); PeakoverIntDSvsPosAll_1513->SetBinEntries(47,37800); PeakoverIntDSvsPosAll_1513->SetBinEntries(48,33049); PeakoverIntDSvsPosAll_1513->SetBinEntries(49,37916); PeakoverIntDSvsPosAll_1513->SetBinEntries(50,32231); PeakoverIntDSvsPosAll_1513->SetBinEntries(51,38739); PeakoverIntDSvsPosAll_1513->SetBinEntries(52,37495); PeakoverIntDSvsPosAll_1513->SetBinEntries(53,32638); PeakoverIntDSvsPosAll_1513->SetBinEntries(54,37055); PeakoverIntDSvsPosAll_1513->SetBinEntries(55,32328); PeakoverIntDSvsPosAll_1513->SetBinEntries(56,37585); PeakoverIntDSvsPosAll_1513->SetBinEntries(57,33200); PeakoverIntDSvsPosAll_1513->SetBinEntries(58,38162); PeakoverIntDSvsPosAll_1513->SetBinEntries(59,33090); PeakoverIntDSvsPosAll_1513->SetBinEntries(60,38341); PeakoverIntDSvsPosAll_1513->SetBinEntries(61,33108); PeakoverIntDSvsPosAll_1513->SetBinEntries(62,37772); PeakoverIntDSvsPosAll_1513->SetBinEntries(63,32667); PeakoverIntDSvsPosAll_1513->SetBinEntries(64,37050); PeakoverIntDSvsPosAll_1513->SetBinEntries(65,33233); PeakoverIntDSvsPosAll_1513->SetBinEntries(66,37149); PeakoverIntDSvsPosAll_1513->SetBinEntries(67,31980); PeakoverIntDSvsPosAll_1513->SetBinEntries(68,37736); PeakoverIntDSvsPosAll_1513->SetBinEntries(69,37014); PeakoverIntDSvsPosAll_1513->SetBinEntries(70,32194); PeakoverIntDSvsPosAll_1513->SetBinEntries(71,35937); PeakoverIntDSvsPosAll_1513->SetBinEntries(72,31315); PeakoverIntDSvsPosAll_1513->SetBinEntries(73,35974); PeakoverIntDSvsPosAll_1513->SetBinEntries(74,31521); PeakoverIntDSvsPosAll_1513->SetBinEntries(75,36394); PeakoverIntDSvsPosAll_1513->SetBinEntries(76,31740); PeakoverIntDSvsPosAll_1513->SetBinEntries(77,36300); PeakoverIntDSvsPosAll_1513->SetBinEntries(78,31315); PeakoverIntDSvsPosAll_1513->SetBinEntries(79,35917); PeakoverIntDSvsPosAll_1513->SetBinEntries(80,31213); PeakoverIntDSvsPosAll_1513->SetBinEntries(81,35532); PeakoverIntDSvsPosAll_1513->SetBinEntries(82,31724); PeakoverIntDSvsPosAll_1513->SetBinEntries(83,35966); PeakoverIntDSvsPosAll_1513->SetBinEntries(84,31283); PeakoverIntDSvsPosAll_1513->SetBinEntries(85,37403); PeakoverIntDSvsPosAll_1513->SetBinEntries(86,37848); PeakoverIntDSvsPosAll_1513->SetBinEntries(87,33447); PeakoverIntDSvsPosAll_1513->SetBinEntries(88,38080); PeakoverIntDSvsPosAll_1513->SetBinEntries(89,34088); PeakoverIntDSvsPosAll_1513->SetBinEntries(90,39240); PeakoverIntDSvsPosAll_1513->SetBinEntries(91,35418); PeakoverIntDSvsPosAll_1513->SetBinEntries(92,41355); PeakoverIntDSvsPosAll_1513->SetBinEntries(93,36917); PeakoverIntDSvsPosAll_1513->SetBinEntries(94,42430); PeakoverIntDSvsPosAll_1513->SetBinEntries(95,37392); PeakoverIntDSvsPosAll_1513->SetBinEntries(96,42766); PeakoverIntDSvsPosAll_1513->SetBinEntries(97,36927); PeakoverIntDSvsPosAll_1513->SetBinEntries(98,39766); PeakoverIntDSvsPosAll_1513->SetBinEntries(99,27612); PeakoverIntDSvsPosAll_1513->SetBinEntries(100,18797); PeakoverIntDSvsPosAll_1513->SetBinEntries(101,12581); PeakoverIntDSvsPosAll_1513->SetBinContent(0,1071915); PeakoverIntDSvsPosAll_1513->SetBinContent(1,1484018); PeakoverIntDSvsPosAll_1513->SetBinContent(2,1708289); PeakoverIntDSvsPosAll_1513->SetBinContent(3,1803154); PeakoverIntDSvsPosAll_1513->SetBinContent(4,1369540); PeakoverIntDSvsPosAll_1513->SetBinContent(5,1409297); PeakoverIntDSvsPosAll_1513->SetBinContent(6,1172106); PeakoverIntDSvsPosAll_1513->SetBinContent(7,1304563); PeakoverIntDSvsPosAll_1513->SetBinContent(8,1126951); PeakoverIntDSvsPosAll_1513->SetBinContent(9,1293121); PeakoverIntDSvsPosAll_1513->SetBinContent(10,1127472); PeakoverIntDSvsPosAll_1513->SetBinContent(11,1317100); PeakoverIntDSvsPosAll_1513->SetBinContent(12,1157491); PeakoverIntDSvsPosAll_1513->SetBinContent(13,1367398); PeakoverIntDSvsPosAll_1513->SetBinContent(14,1236837); PeakoverIntDSvsPosAll_1513->SetBinContent(15,1447667); PeakoverIntDSvsPosAll_1513->SetBinContent(16,1262999); PeakoverIntDSvsPosAll_1513->SetBinContent(17,1575538); PeakoverIntDSvsPosAll_1513->SetBinContent(18,1589905); PeakoverIntDSvsPosAll_1513->SetBinContent(19,1463076); PeakoverIntDSvsPosAll_1513->SetBinContent(20,1684432); PeakoverIntDSvsPosAll_1513->SetBinContent(21,1525296); PeakoverIntDSvsPosAll_1513->SetBinContent(22,1803458); PeakoverIntDSvsPosAll_1513->SetBinContent(23,1606874); PeakoverIntDSvsPosAll_1513->SetBinContent(24,1889165); PeakoverIntDSvsPosAll_1513->SetBinContent(25,1701057); PeakoverIntDSvsPosAll_1513->SetBinContent(26,1980195); PeakoverIntDSvsPosAll_1513->SetBinContent(27,1747182); PeakoverIntDSvsPosAll_1513->SetBinContent(28,2057659); PeakoverIntDSvsPosAll_1513->SetBinContent(29,1804303); PeakoverIntDSvsPosAll_1513->SetBinContent(30,2104982); PeakoverIntDSvsPosAll_1513->SetBinContent(31,1889228); PeakoverIntDSvsPosAll_1513->SetBinContent(32,2205550); PeakoverIntDSvsPosAll_1513->SetBinContent(33,1920073); PeakoverIntDSvsPosAll_1513->SetBinContent(34,2311674); PeakoverIntDSvsPosAll_1513->SetBinContent(35,2301654); PeakoverIntDSvsPosAll_1513->SetBinContent(36,2063203); PeakoverIntDSvsPosAll_1513->SetBinContent(37,2310464); PeakoverIntDSvsPosAll_1513->SetBinContent(38,2063458); PeakoverIntDSvsPosAll_1513->SetBinContent(39,2355636); PeakoverIntDSvsPosAll_1513->SetBinContent(40,2076370); PeakoverIntDSvsPosAll_1513->SetBinContent(41,2430675); PeakoverIntDSvsPosAll_1513->SetBinContent(42,2117743); PeakoverIntDSvsPosAll_1513->SetBinContent(43,2450647); PeakoverIntDSvsPosAll_1513->SetBinContent(44,2129106); PeakoverIntDSvsPosAll_1513->SetBinContent(45,2422363); PeakoverIntDSvsPosAll_1513->SetBinContent(46,2128403); PeakoverIntDSvsPosAll_1513->SetBinContent(47,2406665); PeakoverIntDSvsPosAll_1513->SetBinContent(48,2107021); PeakoverIntDSvsPosAll_1513->SetBinContent(49,2418533); PeakoverIntDSvsPosAll_1513->SetBinContent(50,2055853); PeakoverIntDSvsPosAll_1513->SetBinContent(51,2475886); PeakoverIntDSvsPosAll_1513->SetBinContent(52,2396814); PeakoverIntDSvsPosAll_1513->SetBinContent(53,2086869); PeakoverIntDSvsPosAll_1513->SetBinContent(54,2370055); PeakoverIntDSvsPosAll_1513->SetBinContent(55,2071877); PeakoverIntDSvsPosAll_1513->SetBinContent(56,2409059); PeakoverIntDSvsPosAll_1513->SetBinContent(57,2128659); PeakoverIntDSvsPosAll_1513->SetBinContent(58,2448518); PeakoverIntDSvsPosAll_1513->SetBinContent(59,2125424); PeakoverIntDSvsPosAll_1513->SetBinContent(60,2464748); PeakoverIntDSvsPosAll_1513->SetBinContent(61,2131286); PeakoverIntDSvsPosAll_1513->SetBinContent(62,2429199); PeakoverIntDSvsPosAll_1513->SetBinContent(63,2102852); PeakoverIntDSvsPosAll_1513->SetBinContent(64,2388594); PeakoverIntDSvsPosAll_1513->SetBinContent(65,2143898); PeakoverIntDSvsPosAll_1513->SetBinContent(66,2396832); PeakoverIntDSvsPosAll_1513->SetBinContent(67,2062769); PeakoverIntDSvsPosAll_1513->SetBinContent(68,2438900); PeakoverIntDSvsPosAll_1513->SetBinContent(69,2394008); PeakoverIntDSvsPosAll_1513->SetBinContent(70,2081941); PeakoverIntDSvsPosAll_1513->SetBinContent(71,2326823); PeakoverIntDSvsPosAll_1513->SetBinContent(72,2026374); PeakoverIntDSvsPosAll_1513->SetBinContent(73,2330192); PeakoverIntDSvsPosAll_1513->SetBinContent(74,2040114); PeakoverIntDSvsPosAll_1513->SetBinContent(75,2360443); PeakoverIntDSvsPosAll_1513->SetBinContent(76,2061963); PeakoverIntDSvsPosAll_1513->SetBinContent(77,2357927); PeakoverIntDSvsPosAll_1513->SetBinContent(78,2035183); PeakoverIntDSvsPosAll_1513->SetBinContent(79,2335096); PeakoverIntDSvsPosAll_1513->SetBinContent(80,2030670); PeakoverIntDSvsPosAll_1513->SetBinContent(81,2313127); PeakoverIntDSvsPosAll_1513->SetBinContent(82,2067107); PeakoverIntDSvsPosAll_1513->SetBinContent(83,2345365); PeakoverIntDSvsPosAll_1513->SetBinContent(84,2041140); PeakoverIntDSvsPosAll_1513->SetBinContent(85,2438442); PeakoverIntDSvsPosAll_1513->SetBinContent(86,2470530); PeakoverIntDSvsPosAll_1513->SetBinContent(87,2186613); PeakoverIntDSvsPosAll_1513->SetBinContent(88,2490692); PeakoverIntDSvsPosAll_1513->SetBinContent(89,2229927); PeakoverIntDSvsPosAll_1513->SetBinContent(90,2569228); PeakoverIntDSvsPosAll_1513->SetBinContent(91,2320480); PeakoverIntDSvsPosAll_1513->SetBinContent(92,2713048); PeakoverIntDSvsPosAll_1513->SetBinContent(93,2422607); PeakoverIntDSvsPosAll_1513->SetBinContent(94,2787639); PeakoverIntDSvsPosAll_1513->SetBinContent(95,2459423); PeakoverIntDSvsPosAll_1513->SetBinContent(96,2817946); PeakoverIntDSvsPosAll_1513->SetBinContent(97,2435783); PeakoverIntDSvsPosAll_1513->SetBinContent(98,2629499); PeakoverIntDSvsPosAll_1513->SetBinContent(99,1827385); PeakoverIntDSvsPosAll_1513->SetBinContent(100,1246281); PeakoverIntDSvsPosAll_1513->SetBinContent(101,823067.8); PeakoverIntDSvsPosAll_1513->SetBinError(0,8876.139); PeakoverIntDSvsPosAll_1513->SetBinError(1,10203.89); PeakoverIntDSvsPosAll_1513->SetBinError(2,10928.98); PeakoverIntDSvsPosAll_1513->SetBinError(3,11170.62); PeakoverIntDSvsPosAll_1513->SetBinError(4,9708.135); PeakoverIntDSvsPosAll_1513->SetBinError(5,9855.731); PeakoverIntDSvsPosAll_1513->SetBinError(6,8983.382); PeakoverIntDSvsPosAll_1513->SetBinError(7,9470.452); PeakoverIntDSvsPosAll_1513->SetBinError(8,8802.285); PeakoverIntDSvsPosAll_1513->SetBinError(9,9430.187); PeakoverIntDSvsPosAll_1513->SetBinError(10,8780.617); PeakoverIntDSvsPosAll_1513->SetBinError(11,9522.092); PeakoverIntDSvsPosAll_1513->SetBinError(12,8875.244); PeakoverIntDSvsPosAll_1513->SetBinError(13,9646.428); PeakoverIntDSvsPosAll_1513->SetBinError(14,9163.303); PeakoverIntDSvsPosAll_1513->SetBinError(15,9897.084); PeakoverIntDSvsPosAll_1513->SetBinError(16,9238.019); PeakoverIntDSvsPosAll_1513->SetBinError(17,10301.58); PeakoverIntDSvsPosAll_1513->SetBinError(18,10339.47); PeakoverIntDSvsPosAll_1513->SetBinError(19,9901.195); PeakoverIntDSvsPosAll_1513->SetBinError(20,10608.54); PeakoverIntDSvsPosAll_1513->SetBinError(21,10070.39); PeakoverIntDSvsPosAll_1513->SetBinError(22,10936.68); PeakoverIntDSvsPosAll_1513->SetBinError(23,10297.25); PeakoverIntDSvsPosAll_1513->SetBinError(24,11140.44); PeakoverIntDSvsPosAll_1513->SetBinError(25,10552.92); PeakoverIntDSvsPosAll_1513->SetBinError(26,13611.8); PeakoverIntDSvsPosAll_1513->SetBinError(27,10697.53); PeakoverIntDSvsPosAll_1513->SetBinError(28,11584.84); PeakoverIntDSvsPosAll_1513->SetBinError(29,10829.69); PeakoverIntDSvsPosAll_1513->SetBinError(30,11705.2); PeakoverIntDSvsPosAll_1513->SetBinError(31,11054.69); PeakoverIntDSvsPosAll_1513->SetBinError(32,11933.62); PeakoverIntDSvsPosAll_1513->SetBinError(33,11121.35); PeakoverIntDSvsPosAll_1513->SetBinError(34,12198.9); PeakoverIntDSvsPosAll_1513->SetBinError(35,12198.36); PeakoverIntDSvsPosAll_1513->SetBinError(36,11528.36); PeakoverIntDSvsPosAll_1513->SetBinError(37,12288.92); PeakoverIntDSvsPosAll_1513->SetBinError(38,12267.92); PeakoverIntDSvsPosAll_1513->SetBinError(39,12321.4); PeakoverIntDSvsPosAll_1513->SetBinError(40,11557.7); PeakoverIntDSvsPosAll_1513->SetBinError(41,18019.19); PeakoverIntDSvsPosAll_1513->SetBinError(42,11708.54); PeakoverIntDSvsPosAll_1513->SetBinError(43,12569.92); PeakoverIntDSvsPosAll_1513->SetBinError(44,11727.02); PeakoverIntDSvsPosAll_1513->SetBinError(45,12500.45); PeakoverIntDSvsPosAll_1513->SetBinError(46,11736.95); PeakoverIntDSvsPosAll_1513->SetBinError(47,12468.91); PeakoverIntDSvsPosAll_1513->SetBinError(48,11668.37); PeakoverIntDSvsPosAll_1513->SetBinError(49,12497.83); PeakoverIntDSvsPosAll_1513->SetBinError(50,11517.85); PeakoverIntDSvsPosAll_1513->SetBinError(51,12692.54); PeakoverIntDSvsPosAll_1513->SetBinError(52,12458.66); PeakoverIntDSvsPosAll_1513->SetBinError(53,11634.36); PeakoverIntDSvsPosAll_1513->SetBinError(54,12380.15); PeakoverIntDSvsPosAll_1513->SetBinError(55,11590.08); PeakoverIntDSvsPosAll_1513->SetBinError(56,12492.08); PeakoverIntDSvsPosAll_1513->SetBinError(57,11745.44); PeakoverIntDSvsPosAll_1513->SetBinError(58,12619.59); PeakoverIntDSvsPosAll_1513->SetBinError(59,11748.54); PeakoverIntDSvsPosAll_1513->SetBinError(60,12651.34); PeakoverIntDSvsPosAll_1513->SetBinError(61,11771.74); PeakoverIntDSvsPosAll_1513->SetBinError(62,12564.67); PeakoverIntDSvsPosAll_1513->SetBinError(63,11695.45); PeakoverIntDSvsPosAll_1513->SetBinError(64,12474.76); PeakoverIntDSvsPosAll_1513->SetBinError(65,11853.69); PeakoverIntDSvsPosAll_1513->SetBinError(66,12498.04); PeakoverIntDSvsPosAll_1513->SetBinError(67,11590.69); PeakoverIntDSvsPosAll_1513->SetBinError(68,12618.36); PeakoverIntDSvsPosAll_1513->SetBinError(69,12495.92); PeakoverIntDSvsPosAll_1513->SetBinError(70,11655.41); PeakoverIntDSvsPosAll_1513->SetBinError(71,12328.96); PeakoverIntDSvsPosAll_1513->SetBinError(72,11499.47); PeakoverIntDSvsPosAll_1513->SetBinError(73,12338.48); PeakoverIntDSvsPosAll_1513->SetBinError(74,11600.76); PeakoverIntDSvsPosAll_1513->SetBinError(75,12422.72); PeakoverIntDSvsPosAll_1513->SetBinError(76,11616.01); PeakoverIntDSvsPosAll_1513->SetBinError(77,12423.17); PeakoverIntDSvsPosAll_1513->SetBinError(78,11543.54); PeakoverIntDSvsPosAll_1513->SetBinError(79,12362.89); PeakoverIntDSvsPosAll_1513->SetBinError(80,11536.27); PeakoverIntDSvsPosAll_1513->SetBinError(81,12314.77); PeakoverIntDSvsPosAll_1513->SetBinError(82,11647.25); PeakoverIntDSvsPosAll_1513->SetBinError(83,12407.03); PeakoverIntDSvsPosAll_1513->SetBinError(84,11578.17); PeakoverIntDSvsPosAll_1513->SetBinError(85,12650.73); PeakoverIntDSvsPosAll_1513->SetBinError(86,12739.16); PeakoverIntDSvsPosAll_1513->SetBinError(87,11999.33); PeakoverIntDSvsPosAll_1513->SetBinError(88,12803.94); PeakoverIntDSvsPosAll_1513->SetBinError(89,12117.76); PeakoverIntDSvsPosAll_1513->SetBinError(90,13012.91); PeakoverIntDSvsPosAll_1513->SetBinError(91,12366.61); PeakoverIntDSvsPosAll_1513->SetBinError(92,13380.84); PeakoverIntDSvsPosAll_1513->SetBinError(93,12646.07); PeakoverIntDSvsPosAll_1513->SetBinError(94,13574.35); PeakoverIntDSvsPosAll_1513->SetBinError(95,12754.15); PeakoverIntDSvsPosAll_1513->SetBinError(96,13664.01); PeakoverIntDSvsPosAll_1513->SetBinError(97,12708.1); PeakoverIntDSvsPosAll_1513->SetBinError(98,13215.28); PeakoverIntDSvsPosAll_1513->SetBinError(99,11021.99); PeakoverIntDSvsPosAll_1513->SetBinError(100,9110.421); PeakoverIntDSvsPosAll_1513->SetBinError(101,7392.14); PeakoverIntDSvsPosAll_1513->SetEntries(3182222); hdn_ratio->Draw(); PeakoverIntDSvsPosAll_1513->SetLineColor(1); PeakoverIntDSvsPosAll_1513->Draw("same"); TLegend *leg = new TLegend(0.4,0.7,0.75,0.9); leg->AddEntry(hup_ratio,"Simulation","l"); leg->AddEntry(PeakoverIntDSvsPosAll_1513,"Data Run 1513","l"); leg->Draw(); sprintf (string,"atten_sums_%.0f_%d.pdf(",lambda,Rup*100); printf("string = %s\n",string); c2->SaveAs(string); sprintf (string,"atten_sums_%.0f_%d.pdf)",lambda,Rup*100); c3->SaveAs(string); } Double_t pulse_func (Double_t *x, Double_t *par) { Double_t mu=par[0]; Double_t sigma=par[1]; Double_t gain=par[2]; Double_t t0=par[3]; Double_t pedestal=par[4]; Double_t x1=x[0]-t0; char string[256]; Double_t func; Double_t amplitude; if (x1 < -20) { func = pedestal; } else if { Double_t arg = (mu*sigma*sigma-x1)/(sqrt(2)*sigma); Double_t arg2 = -mu*x1 +(mu*sigma)*(mu*sigma)/2; amplitude = (mu/2)* exp(arg2) * TMath::Erfc(arg); func = gain * amplitude + pedestal; } /*sprintf (string,"x1=%f amplitude=%f mu=%f sigma=%f t0=%f pedestal=%f, func=%f\n",x1,amplitude,mu,sigma,pedestal,func); printf ("string=%s",string);*/ return func; }