Double_t angdist_func (Double_t *x, Double_t *par){ // return function for angular distribution of photon beam // units are theta = x1 * (me/E0); // me is electron mass = 0.000511 GeV // E0 is the electron beam energy = 10.1 GeV; Double_t me = par[0]; Double_t E0 = par[1]; Double_t norm = par[2]; Double_t x1 = x[0] ; Double_t f = norm*2*x1/ ((1+x1*x1)*(1+x1*x1)); return f; } Double_t intdist_func (Double_t *x, Double_t *par){ // return integrall function for angular distribution of photon beam // units are theta = x1 * (me/E0); // me is electron mass = 0.000511 GeV // E0 is the electron beam energy = 10.1 GeV; Double_t me = par[0]; Double_t E0 = par[1]; Double_t x1 = x[0] ; Double_t f = x1*x1/ (1+x1*x1); return f; } Double_t Egamma_func (Double_t *x, Double_t *par){ // return Egamma spectrum given an given electron energy // Use formulas from PDG July 2012, Eq. 30.28 (brem), 30.30 (pair) Double_t me = par[0]; Double_t E0 = par[1]; Double_t x1 = x[0] ; Double_t f; if (x1 > me && x1 < E0) { Double_t y = x1/E0; f = (4/3 - (4/3)*y +y*y)/x1; // f = 1/x1; } else { f = 0; } return f; } Double_t Epair_func (Double_t *x, Double_t *par){ // distribution of fractional energy of electron in pair production // Use formulas from PDG July 2012, Eq. 30.28 (brem), 30.30 (pair) // note that calling function must check that x1>me/Eg Double_t x1 = x[0]; Double_t f; if (x1 > 0 && x1<1) { f = 1 - (4/3)*x1*(1-x1); } else { f = 0; } return f; } Double_t angdist2_func (Double_t *x, Double_t *par){ // return function for angular distribution of photon beam // GEANT parameterization, taken from Eugene // units are theta = x1 * (me/E0); // me is electron mass = 0.000511 GeV // E0 is the electron beam energy = 10.1 GeV; Double_t me = par[0]; Double_t E0 = par[1]; Double_t norm = par[2]; Double_t Eg = par[3]; // Double_t Eg = E0/2; // Double_t a = par[3]; // Double_t Z= par[4]; Double_t a = 0.625; Double_t Z= 13; // Al Double_t x1 = x[0] ; // Double_t Eg = x[1]; // ignore photon energy dependence for now // Double_t int2 = 7.08857; Double_t d = 0.13*(0.8+1.3/Z)*(100+1/E0)*(1+Eg/E0); Double_t int2 = (1+d/9)/(a*a); Double_t f = norm*x1* (exp(-a*x1) + d*exp(-3*a*x1))/int2; return f; } Double_t intxexpx (Double_t x1, Double_t x2, Double_t a){ // return the integral of xexp(x) from x1 to x2 Double_t f = (x1*exp(-a*x1) - x2*exp(-a*x2))/a + (exp(-a*x1) - exp(-a*x2))/(a*a); return f; } Double_t intdist2_func (Double_t *x, Double_t *par){ // return integrall function for angular distribution of photon beam using GEANT parameterization // units are theta = x1 * (me/E0); // me is electron mass = 0.000511 GeV // E0 is the electron beam energy = 10.1 GeV; Double_t me = par[0]; Double_t E0 = par[1]; Double_t Eg = par[2]; // Double_t Eg = E0/2; // Double_t a = par[3]; // Double_t Z= par[4]; Double_t a = 0.625; Double_t Z= 13; // Al Double_t x1 = x[0] ; Double_t d = 0.13*(0.8+1.3/Z)*(100+1/E0)*(1+Eg/E0); Double_t f = intxexpx(0,x1,a) + d*intxexpx(0,x1,3*a); Double_t int2 = (1+d/9)/(a*a); f = f / int2; // normalize to 1 // cout << " a=" << a << " d=" << d << " x1=" << x1 << " f=" << f << endl; return f; } Double_t photonflux_func (Double_t *x, Double_t *par){ // return photon flux between photon energies k1 to k2, for incident electron energy of Emax Double_t Ie = par[0]; // electron current A Double_t e = par[1]; // electron charge Double_t me = par[2]; // electron mass in GeV Double_t xrad = par[3]; // radiator thickness in radiation lengths Double_t Emax = par[4]; Double_t x2 = x[0]; Double_t k1 = me; Double_t k2 = x2 > k1 & x2 < Emax? x2 : Emax; Double_t f1 = (4./3.)*log(k2/k1) - 4*(k2-k1)/(3.*Emax) + (k2*k2-k1*k1)/(2*Emax*Emax); Double_t f = (Ie/e)*xrad*(f1); // printf (" photon flux - x2=%f, f1=%f, f=%f\n",x2,f1,f); return f; } void plot_photon_rates(void) { // // test random generation of variable distributed as 1/R^2 // // #include #include gROOT->Reset(); gStyle->SetPalette(1,0); //TTree *Bfield = (TTree *) gROOT->FindObject("Bfield"); gStyle->SetPalette(1,0); gStyle->SetOptStat(kTRUE); gStyle->SetOptFit(kTRUE); // gStyle->SetOptFit(1111); gStyle->SetPadRightMargin(0.15); gStyle->SetPadLeftMargin(0.15); gStyle->SetPadBottomMargin(0.15); // gStyle->SetFillColor(0); // char string[256]; char filename[80]; Int_t j,jj; #define npts 1000; // define histograms Int_t nbins=100; // Int_t nevnts=295000; // number of events per second from [me,E0] // Int_t nevnts=57500; // number of events per second from [1,E0] // *** Warning: Note that some normalizations need to entered by Hand on lines 736-738, using centries outputs to terminal from a first iteration. Int_t npar=3; Double_t me=0.000511; // electron mass in GeV // Double_t E0=10.1; // electron energy in GeV Double_t E0=12; // electron energy in GeV Double_t Eg=E0/2; // Pick typical photon energy; Double_t norm=1; // function normalization Double_t Ie = 50e-9; // electron current Double_t e = 1.6e-19; // electric charge Double_t xrad = 1e-4; // radiator thickness in rad lengths. Double_t converter = (7./9.)*1e-3; // PS converter thickness in radiation lengths // get normalization // Double_t Egen_min=me; Double_t Egen_min=1; Double_t Egen_max=E0; TF1 *photon_flux = new TF1("photon_flux",photonflux_func,Egen_min,Egen_max,5); photon_flux->SetParameters(Ie,e,me,xrad,E0); photon_flux->SetParNames("Ie","e","me","xrad","Emax"); Double_t xnorm = photon_flux->Eval(Egen_max) - photon_flux->Eval(Egen_min); Int_t nevnts = converter*xnorm; printf ("Flux normalization: xnorm=%f, nevents=%d between %f and %f GeV\n",xnorm,nevnts,Egen_min,Egen_max); Double_t xhole=0; // aperture center x in mm Double_t yhole=0; // aperture center y in mm // Double_t rhole=5.0/2.; // aperture radius in mm Double_t rhole=3.4/2.; // aperture radius in mm Double_t xmin = 0; Double_t xmax = 5; Double_t xmax_save=xmax; npar = 3; TF1 *angdist= new TF1 ("angdist",angdist_func,xmin,xmax,npar); angdist->SetParameters(me,E0,norm); angdist->SetParNames("me","E0","norm"); npar = 4; TF1 *angdist2 = new TF1 ("angdist2",angdist2_func,xmin,xmax,npar); angdist2->SetParameters(me,E0,norm,Eg); angdist2->SetParNames("me","E0","norm","Eg"); Double_t int2 = angdist2->Integral(xmin,xmax); cout << " angdist2 integral=" << int2 << endl; // renormalize number of events to integral within limits nevnts = nevnts * int2; npar = 2; TF1 *intdist= new TF1 ("intdist",intdist_func,xmin,xmax,npar); intdist->SetParameters(me,E0); intdist->SetParNames("me","E0"); npar = 3; TF1 *intdist2= new TF1 ("intdist2",intdist2_func,xmin,xmax,npar); intdist2->SetParameters(me,E0,Eg); intdist2->SetParNames("me","E0","Eg"); TH1F *dndx3 = new TH1F("dndx3","Angular Distribution in units of me/E0 inside aperture cut 1",nbins,xmin,xmax); TH1F *dndx4 = new TH1F("dndx4","Angular Distribution in units of me/E0 inside aperture cut 2",nbins,xmin,xmax); TH1F *dndx5 = new TH1F("dndx5","Angular Distribution in units of me/E0 inside aperture cut 3",nbins,xmin,xmax); TH1F *dndx6 = new TH1F("dndx6","Angular Distribution in units of me/E0 inside aperture cut 4",nbins,xmin,xmax); Double_t centries[4]; Double_t cxerrors[4]; Double_t cyerrors[4]={4*0.01}; Double_t cpos[4]={0,2,4,6}; Double_t cxmin=-10; Double_t cxmax=10; Double_t cymin=-10; Double_t cymax=10; TH1F *cfacex = new TH1F("cfacex","Projection x",nbins,cxmin,cxmax); TH1F *cfacey= new TH1F("cfacey","Projection y",nbins,cymin,cymax); TH2F *cface = new TH2F("cface","Profile on collimator",nbins,cxmin,cxmax,nbins,cymin,cymax); // selection through the aperture TH1F *cfacex1 = new TH1F("cfacex1","Projection x1",nbins,cxmin,cxmax); TH1F *cfacex2 = new TH1F("cfacex2","Projection x2",nbins,cxmin,cxmax); TH1F *cfacex3 = new TH1F("cfacex2","Projection x3",nbins,cxmin,cxmax); TH1F *cfacex4 = new TH1F("cfacex3","Projection x4",nbins,cxmin,cxmax); TH1F *spread = new TH1F("spread","Gaussian spread (me/E0)",nbins,cxmin,cxmax); TH1F *spread1 = new TH1F("spread1","Gaussian spread (me/E0)",nbins,cxmin,cxmax); TH2F *spread2 = new TH2F("spread2","Gaussian spread (me/E0)",nbins,cxmin,cxmax,nbins,cxmin,cxmax); Double_t mgauss=0; // gaussian rms spread Double_t sgauss=0.5; // gaussian rms spread // histogram photon energy spectra TH1 *HEg = new TH1F("HEg","Photon energy spectrum",nbins,0,10); TH1 *HEgc = new TH1F("HEgc","Photon energy spectrum collimated",nbins,1,11); nbins = 20; Double_t Hemin=1; Double_t Hemax=9; TH1 *HEe = new TH1F("HEe","Electron Single energy spectrum",nbins,Hemin,Hemax); TH1 *HEec = new TH1F("HEec","Electron Coincidence energy spectrum",nbins,Hemin,Hemax); Double_t Eemin=3; // Minimum energy in PS Double_t Eemax=6.25; // Maximum energy in PS // photon energy distribution npar = 2; TF1 *Egamma = new TF1 ("Egamma",Egamma_func,Egen_min,Egen_max,npar); Egamma->SetParameters(me,E0); Egamma->SetParNames("me","E0"); // fractional energy distribution in pair production npar = 0; TF1 *Epair = new TF1 ("Epair",Epair_func,0,1,npar); // histogram correllations between Ee and Ep nbins = 100; TH1 *HEecF = new TH1F("HEecF","Electron Coincidence energy Fine",nbins,Hemin,Hemax); TH1 *HEpcF = new TH1F("HEpcF","Positron Coincidence energy Fine",nbins,Hemin,Hemax); TH2 *HEeVEp = new TH2F("HEeVEp","Electron vs Positron energy",nbins,Hemin,Hemax,nbins,Hemin,Hemax); TH1 *HEePEp = new TH1F("HEePEp","Electron+Positron energy",nbins,2*Hemin,2*Hemax); // TCanvas *c1 = new TCanvas("c1","c1 Photon Rates",200,10,700,700); c1->SetBorderMode(0); c1->SetFillColor(0); // c1->SetGridx(); // c1->SetGridy(); // c1->SetLogy(); // plot pulse function /*for (j=0;jFill(x,angdist(&x)); }*/ // fill historgram using random variable derived from distribution TRandom1 *r = new TRandom1(); Double_t theta,phi,cx,cy; Double_t PI=3.14159; Double_t cdist=75000; // distance radiator to collimator in mm for (j=0;jGetRandom(); Double_t Eg = Egamma->GetRandom(); // get electron and positron energies if (fractionFill(Eg); Double_t Ee = fraction*Eg; Double_t Ep = Eg - Ee; // Double_t ranx = angdist->GetRandom(); Double_t ranx = angdist2->GetRandom(); theta = ranx*(me/E0); phi = r->Uniform()*2*PI; cx = cdist*sin(theta)*sin(phi); cy = cdist*sin(theta)*cos(phi); // smear according to gaussian distribution Double_t gx = r->Gaus(mgauss,sgauss); Double_t gy = r->Gaus(mgauss,sgauss); spread->Fill(gx); spread1->Fill(gy); spread2->Fill(gx,gy); cx = cx + gx; cy = cy + gy; cfacex->Fill(cx); cfacey->Fill(cy); cface->Fill(cx,cy); // fill histograms depending on position of aperture Double_t xhole=cpos[0]; // aperture center x in mm Double_t yhole=0; // aperture center y in mm Double_t xdelta = cx-xhole; Double_t ydelta = cy-yhole; if (sqrt(xdelta*xdelta + ydelta*ydelta) < rhole) { // inside aperture dndx3->Fill(ranx); cfacex1->Fill(cx); HEgc->Fill(Eg); HEe->Fill(Ee); if ( (Ep > Eemin && Ep < Eemax) && (Ee > Eemin && Ee < Eemax) ) { HEec->Fill(Ee); // coincidence rate HEecF ->Fill(Ee); // coincidence rate HEpcF ->Fill(Ep); // coincidence rate HEeVEp ->Fill(Ep,Ee); // coincidence rate HEePEp ->Fill(Ee+Ep); // coincidence rate } } xhole=cpos[1]; // aperture center x in mm yhole=0; // aperture center y in mm xdelta = cx-xhole; ydelta = cy-yhole; if (sqrt(xdelta*xdelta + ydelta*ydelta) < rhole) { // inside aperture dndx4->Fill(ranx); cfacex2->Fill(cx); } xhole=cpos[2]; // aperture center x in mm yhole=0; // aperture center y in mm xdelta = cx-xhole; ydelta = cy-yhole; if (sqrt(xdelta*xdelta + ydelta*ydelta) < rhole) { // inside aperture dndx5->Fill(ranx); cfacex3->Fill(cx); } xhole=cpos[3]; // aperture center x in mm yhole=0; // aperture center y in mm xdelta = cx-xhole; ydelta = cy-yhole; if (sqrt(xdelta*xdelta + ydelta*ydelta) < rhole) { // inside aperture dndx6->Fill(ranx); cfacex4->Fill(cx); } } c1->Divide(2,2); c1->cd(1); Double_t ymin=0; Double_t ymax=1; intdist2->SetTitle("Bremsstrahlung Distribution"); // intdist2->GetXaxis()->SetRangeUser(xmin,xmax); intdist2->GetYaxis()->SetRangeUser(ymin,ymax); // intdist2->GetXaxis()->SetLabelSize(0.05); // intdist2->GetXaxis()->SetTitleSize(0.05); intdist2->GetYaxis()->SetLabelSize(0.05); intdist2->GetYaxis()->SetTitleSize(0.05); intdist2->GetYaxis()->SetTitleOffset(1.5); intdist2->GetYaxis()->SetTitle("Intensity"); intdist2->GetXaxis()->SetTitle("Theta (me/E0)"); intdist2->GetXaxis()->SetNdivisions(505); intdist2->SetLineColor(1); intdist->SetParameters(me,E0); intdist->SetLineColor(2); // intdist->Draw(); angdist->SetLineColor(2); angdist->SetParameters(me,E0,norm); // angdist->DrawCopy("same"); intdist2->SetLineColor(4); intdist2->SetParameters(me,E0,Eg); intdist2->Draw(); angdist2->SetLineColor(4); angdist2->SetParameters(me,E0,norm,Eg); angdist2->Draw("same"); Double_t dist=cdist; // distance from radiator to collimator in mm Double_t xradius = (rhole/dist)*(E0/me); TLine *line = new TLine(xradius,ymin,xradius,ymax); line->Draw(); c1->cd(2); ymin=0; ymax=1; cfacex->SetTitle(""); // cfacex->GetXaxis()->SetRangeUser(xmin,xmax); // cfacex->GetYaxis()->SetRangeUser(ymin,ymax); // cfacex->GetXaxis()->SetLabelSize(0.05); // cfacex->GetXaxis()->SetTitleSize(0.05); cfacex->GetYaxis()->SetLabelSize(0.05); cfacex->GetYaxis()->SetTitleSize(0.05); cfacex->GetYaxis()->SetTitleOffset(1.5); cfacex->GetYaxis()->SetTitle("Intensity"); cfacex->GetXaxis()->SetTitle("x (mm)"); cfacex->GetXaxis()->SetNdivisions(505); cfacex->SetLineColor(1); cfacex->Draw(); sprintf(string,"Radius r= %.1f mm, #sigma= %.1f mm\n",rhole,sgauss); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c1->cd(3); ymin=0; ymax=1; cfacey->SetTitle(""); // cfacey->GetXaxis()->SetRangeUser(xmin,xmax); // cfacey->GetYaxis()->SetRangeUser(ymin,ymax); // cfacey->GetXaxis()->SetLabelSize(0.05); // cfacey->GetXaxis()->SetTitleSize(0.05); cfacey->GetYaxis()->SetLabelSize(0.05); cfacey->GetYaxis()->SetTitleSize(0.05); cfacey->GetYaxis()->SetTitleOffset(1.5); cfacey->GetYaxis()->SetTitle("Intensity"); cfacey->GetXaxis()->SetTitle("y (mm)"); cfacey->GetXaxis()->SetNdivisions(505); cfacey->SetLineColor(1); cfacey->Draw(); c1->cd(4); ymin=0; ymax=1; cface->SetTitle(""); // cface->GetXaxis()->SetLabelSize(0.05); // cface->GetXaxis()->SetTitleSize(0.05); cface->GetYaxis()->SetLabelSize(0.05); cface->GetYaxis()->SetTitleSize(0.05); cface->GetYaxis()->SetTitleOffset(1.5); cface->GetYaxis()->SetTitle("x (mm)"); cface->GetXaxis()->SetTitle("y (mm)"); cface->GetXaxis()->SetNdivisions(505); cface->SetLineColor(1); cface->Draw("colz"); // draw aperture on face TEllipse *circle = new TEllipse(xhole,yhole,rhole); circle->SetLineWidth(2); circle->SetLineColor(1); circle->SetFillStyle(0); circle->Draw(); // TCanvas *c2 = new TCanvas("c2","c2 Photon Rates",200,10,700,700); c2->SetBorderMode(0); c2->SetFillColor(0); c2->Divide(2,2); // c2->SetGridx(); // c2->SetGridy(); // c2->SetLogy(); c2->cd(1); ymin=0; ymax=1; dndx3->SetTitle(""); // dndx3->GetXaxis()->SetRangeUser(xmin,xmax); // dndx3->GetYaxis()->SetRangeUser(ymin,ymax); // dndx3->GetXaxis()->SetLabelSize(0.05); // dndx3->GetXaxis()->SetTitleSize(0.05); dndx3->GetYaxis()->SetLabelSize(0.05); dndx3->GetYaxis()->SetTitleSize(0.05); dndx3->GetYaxis()->SetTitleOffset(1.5); dndx3->GetYaxis()->SetTitle("Intensity in Aperture"); dndx3->GetXaxis()->SetTitle("Theta (me/E0)"); dndx3->GetXaxis()->SetNdivisions(505); dndx3->SetLineColor(1); dndx3->Draw(); sprintf(string,"Radius r= %.1f mm, #sigma= %.1f mm\n",rhole,sgauss); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); xhole=0; // aperture center x in mm yhole=0; // aperture center y in mm sprintf(string,"Offset x= %.1f y= %.1f\n",xhole,yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c2->cd(2); dndx4->SetTitle(""); // dndx4->GetXaxis()->SetRangeUser(xmin,xmax); // dndx4->GetYaxis()->SetRangeUser(ymin,ymax); // dndx4->GetXaxis()->SetLabelSize(0.05); // dndx4->GetXaxis()->SetTitleSize(0.05); dndx4->GetYaxis()->SetLabelSize(0.05); dndx4->GetYaxis()->SetTitleSize(0.05); dndx4->GetYaxis()->SetTitleOffset(1.5); dndx4->GetYaxis()->SetTitle("Intensity in Aperture"); dndx4->GetXaxis()->SetTitle("Theta (me/E0)"); dndx4->GetXaxis()->SetNdivisions(505); dndx4->SetLineColor(1); dndx4->Draw(); xhole=2; // aperture center x in mm yhole=0; // aperture center y in mm sprintf(string,"Offset x= %.1f y= %.1f\n",xhole,yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c2->cd(3); dndx5->SetTitle(""); // dndx5->GetXaxis()->SetRangeUser(xmin,xmax); // dndx5->GetYaxis()->SetRangeUser(ymin,ymax); // dndx5->GetXaxis()->SetLabelSize(0.05); // dndx5->GetXaxis()->SetTitleSize(0.05); dndx5->GetYaxis()->SetLabelSize(0.05); dndx5->GetYaxis()->SetTitleSize(0.05); dndx5->GetYaxis()->SetTitleOffset(1.5); dndx5->GetYaxis()->SetTitle("Intensity in Aperture"); dndx5->GetXaxis()->SetTitle("Theta (me/E0)"); dndx5->GetXaxis()->SetNdivisions(505); dndx5->SetLineColor(1); dndx5->Draw(); xhole=4; // aperture center x in mm yhole=0; // aperture center y in mm sprintf(string,"Offset x= %.1f y= %.1f\n",xhole,yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c2->cd(4); dndx6->SetTitle(""); // dndx6->GetXaxis()->SetRangeUser(xmin,xmax); // dndx6->GetYaxis()->SetRangeUser(ymin,ymax); // dndx6->GetXaxis()->SetLabelSize(0.05); // dndx6->GetXaxis()->SetTitleSize(0.05); dndx6->GetYaxis()->SetLabelSize(0.05); dndx6->GetYaxis()->SetTitleSize(0.05); dndx6->GetYaxis()->SetTitleOffset(1.5); dndx6->GetYaxis()->SetTitle("Intensity in Aperture"); dndx6->GetXaxis()->SetTitle("Theta (me/E0)"); dndx6->GetXaxis()->SetNdivisions(505); dndx6->SetLineColor(1); dndx6->Draw(); xhole=6; // aperture center x in mm yhole=0; // aperture center y in mm sprintf(string,"Offset x= %.1f y= %.1f\n",xhole,yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); // TCanvas *c3 = new TCanvas("c3","c3 Photon Rates",200,10,700,700); c3->Divide(2,2); // c3->SetGridx(); // c3->SetGridy(); // c3->SetLogy(); c3->cd(1); spread->SetTitle(""); // spread->GetXaxis()->SetRangeUser(xmin,xmax); // spread->GetYaxis()->SetRangeUser(ymin,ymax); // spread->GetXaxis()->SetLabelSize(0.05); // spread->GetXaxis()->SetTitleSize(0.05); spread->GetYaxis()->SetLabelSize(0.05); spread->GetYaxis()->SetTitleSize(0.05); spread->GetYaxis()->SetTitleOffset(1.5); spread->GetYaxis()->SetTitle("Intensity in Aperture"); spread->GetXaxis()->SetTitle("Theta (me/E0)"); spread->GetXaxis()->SetNdivisions(505); spread->SetLineColor(1); spread->Draw(); c3->cd(1); spread->SetTitle("Gaussian spread"); // spread->GetXaxis()->SetRangeUser(xmin,xmax); // spread->GetYaxis()->SetRangeUser(ymin,ymax); // spread->GetXaxis()->SetLabelSize(0.05); // spread->GetXaxis()->SetTitleSize(0.05); spread->GetYaxis()->SetLabelSize(0.05); spread->GetYaxis()->SetTitleSize(0.05); spread->GetYaxis()->SetTitleOffset(1.5); spread->GetYaxis()->SetTitle("Intensity in Aperture"); spread->GetXaxis()->SetTitle("x (mm)"); spread->GetXaxis()->SetNdivisions(505); spread->SetLineColor(1); spread->Fit("gaus"); spread->Draw(); c3->cd(2); spread1->SetTitle("Gaussian spread"); // spread1->GetXaxis()->SetRangeUser(xmin,xmax); // spread1->GetYaxis()->SetRangeUser(ymin,ymax); // spread1->GetXaxis()->SetLabelSize(0.05); // spread1->GetXaxis()->SetTitleSize(0.05); spread1->GetYaxis()->SetLabelSize(0.05); spread1->GetYaxis()->SetTitleSize(0.05); spread1->GetYaxis()->SetTitleOffset(1.5); spread1->GetYaxis()->SetTitle("Intensity in Aperture"); spread1->GetXaxis()->SetTitle("y (mm)"); spread1->GetXaxis()->SetNdivisions(505); spread1->SetLineColor(1); spread1->Fit("gaus"); spread1->Draw(); c3->cd(3); // get entries and plot centries[0] = dndx3->GetEntries(); centries[1] = dndx4->GetEntries(); centries[2] = dndx5->GetEntries(); centries[3] = dndx6->GetEntries(); // get data from other apertures /*Double_t cAp1[4]={73243,56224,26765,10409}; // E0=10.1 GeV use 1/(1+u^2)^2 for angular distribution, angdist Double_t cAp2[4]={66663,52435,27086,10958}; Double_t cAp3[4]={49458,41736,26174,12735};*/ /*Double_t cAp1[4]={73864,57328,27576,12332}; // E0=10.1 GeV use GEANT for angular distribution, angdist2 Double_t cAp2[4]={67657,53560,28025,12883}; Double_t cAp3[4]={50246,42795,27381,14312};*/ // (me,E0) normalization /*Double_t cAp1[4]={13987,10999,5262,2368}; // E0=10.1 GeV use GEANT for angular distribution, angdist2 Double_t cAp2[4]={12868,10290,5385,2492}; Double_t cAp3[4]={9515,8294,5262,2746};*/ // (1,E0) normalization /*Double_t cAp1[4]={19038,14499,6197,2445}; // E0=12.0 GeV use GEANT for angular distribution, angdist2. aperture=5 mm Double_t cAp2[4]={17252,13409,6350,2575}; Double_t cAp3[4]={12473,10570,6368,3024};*/ // (1,E0) normalization Double_t cAp1[4]={11156,7190,2770,1085}; // E0=12.0 GeV use GEANT for angular distribution, angdist2. aperture=3.4 mm Double_t cAp2[4]={9581,6732,2875,1149}; Double_t cAp3[4]={6312,5245,2946,1405}; // (1,E0) normalization Double_t cAp1_err[4]; Double_t cAp2_err[4]; Double_t cAp3_err[4]; for (j=0;j<4;j++) { Double_t tnorm = nevnts/int2; // assume that events outside the generation interval would be lost in collimation cyerrors[j] = sqrt(centries[j])/tnorm; cAp1_err[j] = sqrt(cAp1[j])/tnorm; cAp2_err[j] = sqrt(cAp2[j])/tnorm; cAp3_err[j] = sqrt(cAp3[j])/tnorm; cAp1[j] = cAp1[j]/tnorm; cAp2[j] = cAp2[j]/tnorm; cAp3[j] = cAp3[j]/tnorm; } cout << "centries=" << centries[0] << "," << centries[1] << "," << centries[2] << "," << centries[3] << endl; TGraphErrors *offset_rates = new TGraphErrors(4,cpos,centries,cxerrors,cyerrors); TGraphErrors *offset_rates1 = new TGraphErrors(4,cpos,cAp1,cxerrors,cAp1_err); TGraphErrors *offset_rates2 = new TGraphErrors(4,cpos,cAp2,cxerrors,cAp2_err); TGraphErrors *offset_rates3 = new TGraphErrors(4,cpos,cAp3,cxerrors,cAp3_err); xmin=-1; xmax=7; ymin=0; ymax=100000; offset_rates->SetTitle(""); offset_rates->GetXaxis()->SetRangeUser(xmin,xmax); offset_rates->GetYaxis()->SetRangeUser(ymin,ymax); // offset_rates->GetXaxis()->SetLabelSize(0.05); // offset_rates->GetXaxis()->SetTitleSize(0.05); offset_rates->GetYaxis()->SetLabelSize(0.05); offset_rates->GetYaxis()->SetTitleSize(0.05); offset_rates->GetYaxis()->SetTitleOffset(1.5); offset_rates->GetYaxis()->SetTitle("Rate passing aperture"); offset_rates->GetXaxis()->SetTitle("Offset (mm)"); offset_rates->GetXaxis()->SetNdivisions(505); offset_rates->SetMarkerSize(0.7); offset_rates->SetMarkerStyle(20); offset_rates->SetLineColor(2); offset_rates->Draw("ap"); c3->cd(4); ymin=0; ymax=1; spread2->SetTitle(""); spread2->GetXaxis()->SetLabelSize(0.05); // spread2->GetXaxis()->SetTitleSize(0.05); spread2->GetYaxis()->SetLabelSize(0.05); spread2->GetYaxis()->SetTitleSize(0.05); spread2->GetYaxis()->SetTitleOffset(1.5); spread2->GetXaxis()->SetTitle("x (mm)"); spread2->GetYaxis()->SetTitle("y (mm)"); spread2->GetXaxis()->SetNdivisions(505); spread2->SetLineColor(1); spread2->Draw("colz"); TCanvas *c4 = new TCanvas("c4","c4 Photon Rates",200,10,700,700); c4->Divide(2,2); // c4->SetGridx(); // c4->SetGridy(); // c4->SetLogy(); xmin=-1; xmax=7; ymin=0; ymax=0.5; offset_rates1->SetTitle(""); offset_rates1->GetXaxis()->SetRangeUser(xmin,xmax); offset_rates1->GetYaxis()->SetRangeUser(ymin,ymax); // offset_rates1->GetXaxis()->SetLabelSize(0.05); // offset_rates1->GetXaxis()->SetTitleSize(0.05); offset_rates1->GetYaxis()->SetLabelSize(0.05); offset_rates1->GetYaxis()->SetTitleSize(0.05); offset_rates1->GetYaxis()->SetTitleOffset(1.5); offset_rates1->GetYaxis()->SetTitle("Fraction past aperture"); offset_rates1->GetXaxis()->SetTitle("Offset (mm)"); offset_rates1->GetXaxis()->SetNdivisions(505); offset_rates1->SetMarkerSize(0.7); offset_rates1->SetMarkerStyle(20); offset_rates1->SetMarkerColor(2); // offset_rates->Draw("ap"); TLegend *leg = new TLegend(0.5,0.75,0.85,0.9); offset_rates1->SetMarkerSize(1.2); offset_rates1->SetMarkerStyle(20); offset_rates1->SetMarkerColor(1); offset_rates1->Draw("ap"); leg->AddEntry(offset_rates1,"#sigma=0.5 mm","p"); offset_rates2->SetMarkerSize(1.2); offset_rates2->SetMarkerStyle(20); offset_rates2->SetMarkerColor(2); offset_rates2->Draw("psame"); leg->AddEntry(offset_rates2,"#sigma=1.0 mm","p"); offset_rates3->SetMarkerSize(1.2); offset_rates3->SetMarkerStyle(20); offset_rates3->SetMarkerColor(4); offset_rates3->Draw("psame"); leg->AddEntry(offset_rates3,"#sigma=2.0 mm","p"); leg->Draw(); // TCanvas *c5 = new TCanvas("c5","c5 Photon Rates",200,10,700,700); c5->Divide(2,2); // c5->SetGridx(); // c5->SetGridy(); // c5->SetLogy(); c5->cd(1); cfacex1->SetTitle(""); // cfacex1->GetXaxis()->SetRangeUser(xmin,xmax); // cfacex1->GetYaxis()->SetRangeUser(ymin,ymax); // cfacex1->GetXaxis()->SetLabelSize(0.05); // cfacex1->GetXaxis()->SetTitleSize(0.05); cfacex1->GetYaxis()->SetLabelSize(0.05); cfacex1->GetYaxis()->SetTitleSize(0.05); cfacex1->GetYaxis()->SetTitleOffset(1.5); cfacex1->GetYaxis()->SetTitle("Intensity in Aperture"); cfacex1->GetXaxis()->SetTitle("x (mm)"); cfacex1->GetXaxis()->SetNdivisions(505); cfacex1->SetLineColor(1); cfacex1->Draw(); sprintf(string,"Radius r= %.1f mm, #sigma= %.1f mm\n",rhole,sgauss); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); sprintf(string,"Offset x= %.1f y= %.1f\n",cpos[0],yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c5->cd(2); cfacex2->SetTitle(""); // cfacex2->GetXaxis()->SetRangeUser(xmin,xmax); // cfacex2->GetYaxis()->SetRangeUser(ymin,ymax); // cfacex2->GetXaxis()->SetLabelSize(0.05); // cfacex2->GetXaxis()->SetTitleSize(0.05); cfacex2->GetYaxis()->SetLabelSize(0.05); cfacex2->GetYaxis()->SetTitleSize(0.05); cfacex2->GetYaxis()->SetTitleOffset(1.5); cfacex2->GetYaxis()->SetTitle("Intensity in Aperture"); cfacex2->GetXaxis()->SetTitle("x (mm)"); cfacex2->GetXaxis()->SetNdivisions(505); cfacex2->SetLineColor(1); cfacex2->Draw(); sprintf(string,"Offset x= %.1f y= %.1f\n",cpos[1],yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c5->cd(3); cfacex3->SetTitle(""); // cfacex3->GetXaxis()->SetRangeUser(xmin,xmax); // cfacex3->GetYaxis()->SetRangeUser(ymin,ymax); // cfacex3->GetXaxis()->SetLabelSize(0.05); // cfacex3->GetXaxis()->SetTitleSize(0.05); cfacex3->GetYaxis()->SetLabelSize(0.05); cfacex3->GetYaxis()->SetTitleSize(0.05); cfacex3->GetYaxis()->SetTitleOffset(1.5); cfacex3->GetYaxis()->SetTitle("Intensity in Aperture"); cfacex3->GetXaxis()->SetTitle("x (mm)"); cfacex3->GetXaxis()->SetNdivisions(505); cfacex3->SetLineColor(1); cfacex3->Draw(); sprintf(string,"Offset x= %.1f y= %.1f\n",cpos[2],yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c5->cd(4); cfacex4->SetTitle(""); // cfacex4->GetXaxis()->SetRangeUser(xmin,xmax); // cfacex4->GetYaxis()->SetRangeUser(ymin,ymax); // cfacex4->GetXaxis()->SetLabelSize(0.05); // cfacex4->GetXaxis()->SetTitleSize(0.05); cfacex4->GetYaxis()->SetLabelSize(0.05); cfacex4->GetYaxis()->SetTitleSize(0.05); cfacex4->GetYaxis()->SetTitleOffset(1.5); cfacex4->GetYaxis()->SetTitle("Intensity in Aperture"); cfacex4->GetXaxis()->SetTitle("x (mm)"); cfacex4->GetXaxis()->SetNdivisions(505); cfacex4->SetLineColor(1); cfacex4->Draw(); sprintf(string,"Offset x= %.1f y= %.1f\n",cpos[3],yhole); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); TCanvas *c6 = new TCanvas("c6","c6 Photon Rates",200,10,700,700); c6->Divide(2,2); // c6->SetGridx(); // c6->SetGridy(); // c6->SetLogy(); c6->cd(1); gPad->SetLogy(); HEg->SetTitle(""); // HEg->GetXaxis()->SetRangeUser(xmin,xmax); // HEg->GetYaxis()->SetRangeUser(ymin,ymax); // HEg->GetXaxis()->SetLabelSize(0.05); // HEg->GetXaxis()->SetTitleSize(0.05); HEg->GetYaxis()->SetLabelSize(0.05); HEg->GetYaxis()->SetTitleSize(0.05); HEg->GetYaxis()->SetTitleOffset(1.5); HEg->GetYaxis()->SetTitle("Events/bin"); HEg->GetXaxis()->SetTitle("Uncollimated E_{#gamma} (GeV)"); HEg->GetXaxis()->SetNdivisions(505); HEg->SetLineColor(1); HEg->Draw(); sprintf(string,"Radius r= %.1f mm, #sigma= %.1f mm\n",rhole,sgauss); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c6->cd(2); HEgc->SetTitle(""); // HEgc->GetXaxis()->SetRangeUser(xmin,xmax); // HEgc->GetYaxis()->SetRangeUser(ymin,ymax); // HEgc->GetXaxis()->SetLabelSize(0.05); // HEgc->GetXaxis()->SetTitleSize(0.05); HEgc->GetYaxis()->SetLabelSize(0.05); HEgc->GetYaxis()->SetTitleSize(0.05); HEgc->GetYaxis()->SetTitleOffset(1.5); HEgc->GetYaxis()->SetTitle("Events/bin"); HEgc->GetXaxis()->SetTitle("Collimated E_{#gamma} (GeV)"); HEgc->GetXaxis()->SetNdivisions(505); HEgc->SetLineColor(1); HEgc->Draw(); c6->cd(3); Double_t xlobin = HEe->GetBinLowEdge(1); Double_t widthbin = HEe->GetBinWidth(1); Int_t nx1 = (Eemin+widthbin/2-xlobin)/widthbin +1; Int_t nx2 = (Eemax+widthbin/2-xlobin)/widthbin; printf("Eemin=%f, Eemax=%f, xlobin=%f, widthbin=%f, nx1=%d, nx2=%d\n",Eemin, Eemax, xlobin, widthbin, nx1,nx2); Double_t single_sum = HEe->Integral(nx1,nx2); sprintf(string,"Singles Rate=%.0f\n",single_sum); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); HEe->SetTitle(string); // HEe->GetXaxis()->SetRangeUser(xmin,xmax); // HEe->GetYaxis()->SetRangeUser(ymin,ymax); // HEe->GetXaxis()->SetLabelSize(0.05); // HEe->GetXaxis()->SetTitleSize(0.05); HEe->GetYaxis()->SetLabelSize(0.05); HEe->GetYaxis()->SetTitleSize(0.05); HEe->GetYaxis()->SetTitleOffset(1.5); HEe->GetYaxis()->SetTitle("Events/bin"); HEe->GetXaxis()->SetTitle("Collimated E_{e} (GeV)"); HEe->GetXaxis()->SetNdivisions(505); HEe->SetLineColor(1); HEe->Draw(); ymin = 0; ymax = HEe->GetMaximum(); line->DrawLine(Eemin,ymin,Eemin,ymax); line->SetLineColor(2); line->DrawLine(Eemax,ymin,Eemax,ymax); line->SetLineColor(2); c6->cd(4); HEec->SetTitle("Coincidences"); // HEec->GetXaxis()->SetRangeUser(xmin,xmax); // HEec->GetYaxis()->SetRangeUser(ymin,ymax); // HEec->GetXaxis()->SetLabelSize(0.05); // HEec->GetXaxis()->SetTitleSize(0.05); HEec->GetYaxis()->SetLabelSize(0.05); HEec->GetYaxis()->SetTitleSize(0.05); HEec->GetYaxis()->SetTitleOffset(1.5); HEec->GetYaxis()->SetTitle("Events/bin"); HEec->GetXaxis()->SetTitle("Collimated E_{e} (GeV)"); HEec->GetXaxis()->SetNdivisions(505); HEec->SetLineColor(1); HEec->Draw(); ymin = 0; ymax = HEec->GetMaximum(); line->DrawLine(Eemin,ymin,Eemin,ymax); line->SetLineColor(2); line->DrawLine(Eemax,ymin,Eemax,ymax); line->SetLineColor(2); TCanvas *c7 = new TCanvas("c7","c7 Photon Rates",200,10,700,700); // c7->SetGridx(); // c7->SetGridy(); // c7->SetLogy(); c7->Divide(2,2); c7->cd(1); ymin=0; ymax=1; intdist->SetTitle("Bremsstrahlung Distribution"); // intdist->GetXaxis()->SetRangeUser(xmin,xmax); intdist->GetYaxis()->SetRangeUser(ymin,ymax); // intdist->GetXaxis()->SetLabelSize(0.05); // intdist->GetXaxis()->SetTitleSize(0.05); intdist->GetYaxis()->SetLabelSize(0.05); intdist->GetYaxis()->SetTitleSize(0.05); intdist->GetYaxis()->SetTitleOffset(1.5); intdist->GetYaxis()->SetTitle("Intensity"); intdist->GetXaxis()->SetTitle("Theta (me/E0)"); intdist->GetXaxis()->SetNdivisions(505); intdist->SetLineColor(2); intdist->Draw(); angdist->SetLineColor(2); angdist->SetParameters(me,E0,norm); angdist->DrawCopy("same"); angdist2->SetLineColor(4); angdist2->SetParameters(me,E0,norm,E0/2); angdist2->DrawCopy("same"); intdist2->SetLineColor(4); intdist2->SetParameters(me,E0,E0/2); intdist2->DrawCopy("same"); dist=cdist; // distance from radiator to collimator in mm xradius = (rhole/dist)*(E0/me); line->DrawLine(xradius,ymin,xradius,ymax); c7->cd(2); ymin=0; ymax=1; angdist2->SetTitle("Angular Distribution"); // angdist2->GetXaxis()->SetRangeUser(xmin,xmax); // angdist2->GetYaxis()->SetRangeUser(ymin,ymax); // angdist2->GetXaxis()->SetLabelSize(0.05); // angdist2->GetXaxis()->SetTitleSize(0.05); angdist2->GetYaxis()->SetLabelSize(0.05); angdist2->GetYaxis()->SetTitleSize(0.05); angdist2->GetYaxis()->SetTitleOffset(1.5); angdist2->GetYaxis()->SetTitle("Intensity"); angdist2->GetXaxis()->SetTitle("Theta (me/E0)"); angdist2->GetXaxis()->SetNdivisions(505); Double_t intvar[3]; angdist2->SetLineColor(2); angdist2->SetParameters(me,E0,norm,E0); // intvar[0] = angdist2->Integral(0,xradius)/angdist2->Integral(0,xmax_save); intvar[0] = angdist2->Integral(0,xradius); // compare to full integral angdist2->DrawCopy(); Int_t nEg=2; for (j=1;jSetLineColor(4); angdist2->SetParameters(me,E0,norm,Eg); // intvar[j] = angdist2->Integral(0,xradius)/angdist2->Integral(0,xmax_save); intvar[j] = angdist2->Integral(0,xradius); angdist2->DrawCopy("same"); } angdist2->SetParameters(me,E0,norm,0); // intvar[2]= angdist2->Integral(0,xradius)/angdist2->Integral(0,xmax_save); intvar[2]= angdist2->Integral(0,xradius); angdist2->SetLineColor(2); angdist2->DrawCopy("same"); ymax = 0.55; line->DrawLine(xradius,ymin,xradius,ymax); sprintf(string,"Integral (E_{#gamma}=E_{0}) = %.2f\n",intvar[0]); t1 = new TLatex(0.3,0.8,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); sprintf(string,"Integral (E_{#gamma}=E_{0}/2) = %.2f\n",intvar[1]); t1 = new TLatex(0.3,0.75,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); sprintf(string,"Integral (E_{#gamma}=0) = %.2f\n",intvar[2]); t1 = new TLatex(0.3,0.7,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); c7->cd(3); gPad->SetGridy(); gPad->SetLogy(); xmin=0.1; xmax=E0; Egamma->SetTitle("Energy Distribution"); Egamma->GetXaxis()->SetRangeUser(xmin,xmax); // Egamma->GetYaxis()->SetRangeUser(ymin,ymax); // Egamma->GetXaxis()->SetLabelSize(0.05); // Egamma->GetXaxis()->SetTitleSize(0.05); Egamma->GetYaxis()->SetLabelSize(0.05); Egamma->GetYaxis()->SetTitleSize(0.05); Egamma->GetYaxis()->SetTitleOffset(1.5); Egamma->GetYaxis()->SetTitle("Intensity"); Egamma->GetXaxis()->SetTitle("E_{#gamma}"); Egamma->GetXaxis()->SetNdivisions(505); Egamma->Draw(); c7->cd(4); ymin=0; ymax=1; Epair->SetTitle("Energy Distribution"); // Epair->GetXaxis()->SetRangeUser(xmin,xmax); Epair->GetYaxis()->SetRangeUser(ymin,ymax); // Epair->GetXaxis()->SetLabelSize(0.05); // Epair->GetXaxis()->SetTitleSize(0.05); Epair->GetYaxis()->SetLabelSize(0.05); Epair->GetYaxis()->SetTitleSize(0.05); Epair->GetYaxis()->SetTitleOffset(1.5); Epair->GetYaxis()->SetTitle("Intensity"); Epair->GetXaxis()->SetTitle("E_{e}/E_{#gamma}"); Epair->GetXaxis()->SetNdivisions(505); Epair->Draw(); TCanvas *c8 = new TCanvas("c8","c8 Photon Rates",200,10,700,700); // c8->SetGridx(); // c8->SetGridy(); // c8->SetLogy(); c8->Divide(2,2); c8->cd(1); // c8_1->SetLogy(); HEeVEp->SetTitle(""); // HEeVEp->GetXaxis()->SetRangeUser(xmin,xmax); // HEeVEp->GetYaxis()->SetRangeUser(ymin,ymax); // HEeVEp->GetXaxis()->SetLabelSize(0.05); // HEeVEp->GetXaxis()->SetTitleSize(0.05); HEeVEp->GetYaxis()->SetLabelSize(0.05); HEeVEp->GetYaxis()->SetTitleSize(0.05); HEeVEp->GetYaxis()->SetTitleOffset(1.5); HEeVEp->GetYaxis()->SetTitle("Coincident E_{e} (GeV)"); HEeVEp->GetXaxis()->SetTitle("Coincident E_{p} (GeV)"); HEeVEp->GetXaxis()->SetNdivisions(505); HEeVEp->Draw("colz"); sprintf(string,"Radius r= %.1f mm, #sigma= %.1f mm\n",rhole,sgauss); t1 = new TLatex(0.15,0.92,string); t1->SetTextColor(1); t1->SetTextSize(0.05); t1->SetNDC(); t1->Draw(); line->DrawLine(Hemin,E0-Hemin,Hemax,E0-Hemax); line->SetLineColor(2); c8->cd(2); // c8_1->SetLogy(); HEpcF->SetTitle(""); // HEpcF->GetXaxis()->SetRangeUser(xmin,xmax); // HEpcF->GetYaxis()->SetRangeUser(ymin,ymax); // HEpcF->GetXaxis()->SetLabelSize(0.05); // HEpcF->GetXaxis()->SetTitleSize(0.05); HEpcF->GetYaxis()->SetLabelSize(0.05); HEpcF->GetYaxis()->SetTitleSize(0.05); HEpcF->GetYaxis()->SetTitleOffset(1.5); HEpcF->GetYaxis()->SetTitle("Events/bin"); HEpcF->GetXaxis()->SetTitle("Coincident E_{e} (GeV)"); HEpcF->GetXaxis()->SetNdivisions(505); HEpcF->SetLineColor(1); HEpcF->Draw(); c8->cd(3); // c8_1->SetLogy(); HEpcF->SetTitle(""); // HEpcF->GetXaxis()->SetRangeUser(xmin,xmax); // HEpcF->GetYaxis()->SetRangeUser(ymin,ymax); // HEpcF->GetXaxis()->SetLabelSize(0.05); // HEpcF->GetXaxis()->SetTitleSize(0.05); HEpcF->GetYaxis()->SetLabelSize(0.05); HEpcF->GetYaxis()->SetTitleSize(0.05); HEpcF->GetYaxis()->SetTitleOffset(1.5); HEpcF->GetYaxis()->SetTitle("Events/bin"); HEpcF->GetXaxis()->SetTitle("Coincident E_{p} (GeV)"); HEpcF->GetXaxis()->SetNdivisions(505); HEpcF->SetLineColor(1); HEpcF->Draw(); c8->cd(4); // c8_4->SetLogy(); HEePEp->SetTitle(""); // HEePEp->GetXaxis()->SetRangeUser(xmin,xmax); // HEePEp->GetYaxis()->SetRangeUser(ymin,ymax); // HEePEp->GetXaxis()->SetLabelSize(0.05); // HEePEp->GetXaxis()->SetTitleSize(0.05); HEePEp->GetYaxis()->SetLabelSize(0.05); HEePEp->GetYaxis()->SetTitleSize(0.05); HEePEp->GetYaxis()->SetTitleOffset(1.5); HEePEp->GetYaxis()->SetTitle("Events/bin"); HEePEp->GetXaxis()->SetTitle("Coincident E_{e} +E_{p} (GeV)"); HEePEp->GetXaxis()->SetNdivisions(505); HEePEp->SetLineColor(1); HEePEp->Draw(); sprintf(filename,"plot_photon_rates_%.1f_%.1f_c4.png",rhole,sgauss); c4->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f_c4.C",rhole,sgauss); c4->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf(",rhole,sgauss); c1->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c2->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c3->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c4->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c5->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c6->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf",rhole,sgauss); c7->SaveAs(filename); sprintf(filename,"plot_photon_rates_%.1f_%.1f.pdf)",rhole,sgauss); c8->SaveAs(filename); }