void genr8_read_eta(void) { // // Input root tree generated by genr8_tree.C and histogram variables. // #include #include gROOT->Reset(); gStyle->SetPalette(1,0); // gStyle->SetOptStat(kFALSE);; gStyle->SetOptStat(kTRUE); gStyle->SetOptStat(1111111); 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[132]; char name[10]; char cut[132]; Int_t j,jj; Double_t pi=3.14159; #define npts 55; Int_t nevents=10000; #define ntop2 8; Float_t content[8]; // define structure struct Events_t { // generated values Float_t Kg1_px; Float_t Kg1_py; Float_t Kg1_pz; Float_t Kg1_E; Float_t Kg2_px; Float_t Kg2_py; Float_t Kg2_pz; Float_t Kg2_E; Float_t prot_px; Float_t prot_py; Float_t prot_pz; Float_t prot_E; Float_t Eb; Float_t pb; Float_t mb; Float_t mt; Float_t mg1g22; Float_t t; Float_t xtgt; Float_t ytgt; Float_t ztgt; // reconstructed values Float_t insertk1; Float_t insertk2; Float_t insertk3; Float_t insertq1; Float_t insertq2; Float_t insertq3; Float_t RKg1_px; Float_t RKg1_py; Float_t RKg1_pz; Float_t RKg1_E; Float_t RKg2_px; Float_t RKg2_py; Float_t RKg2_pz; Float_t RKg2_E; Float_t Rprot_px; Float_t Rprot_py; Float_t Rprot_pz; Float_t Rprot_E; Float_t REb; Float_t Rpb; Float_t Rmb; Float_t Rmt; Float_t Rmg1g22; Float_t Rt; Float_t Rxtgt; Float_t Rytgt; Float_t Rztgt; }; Events_t Events; // open output files Int_t runno, eventno, nparticles; Int_t partid, q; Float_t mass,px,py,pz,E; Double_t prot_the; Double_t eta_the, eta_px,eta_py,eta_pz,eta_E; Double_t meta=0.5479; Double_t Reta_the, Reta_px,Reta_py,Reta_pz,Reta_pz2,Reta_E,Reta_E2; Double_t Rg1_the,Rg2_the; Double_t mp=0.93827; // angle limits for photon detection Float_t the0 = 0.7; Float_t the1 = 3.2; Float_t the2a = 10; Float_t the2b = 11; Float_t the3 = 110; // define histograms Double_t xmin=2; Double_t xmax=3; Double_t ymin=0.8; Double_t ymax=1.8; Int_t nbinsx = 100; Int_t nbinsy = 100; Int_t Eb=11; Float_t Ebeam=11; Float_t tcut=0; sprintf (cut,"[-t_{K}<%.2f GeV^{2}] ",tcut); // printf ("cut=%s\n",cut); // printf ("Add title=%s\n",strcat(cut,"title ")); TH1F *H1Eb = new TH1F("H1Eb","Beam Energy (GeV)",nbinsx,6,12); // TH1F *H1Eb_tcut = new TH1F("H1Eb_tcut",strcat(cut,"Beam Energy (GeV)"),nbinsx,1.5,2.5); TH1F *H1t = new TH1F("H1t","-t (GeV^{2})",nbinsx,0,0.05); TH1F *H1mg1g2= new TH1F("H1mg1g2","mg1g2 (GeV)",nbinsx,0,1); TH1F *H1mg1g22= new TH1F("H1mg1g22","mg1g2^{2} (GeV^{2})",nbinsx,0,1); Double_t delta=0.2; TH1F *H1eta_the= new TH1F("H1eta_the","#theta_{#eta} (degrees)",nbinsx,0,3); TH1F *H1eta_inelast= new TH1F("H1eta_inelast","E_{#eta} - E_{b}",nbinsx,-delta,delta); TH1F *H1eta_pinelast= new TH1F("H1eta_pinelast","pz_{#eta} - E_{b}",nbinsx,-delta,delta); TH1F *H1eta_inelast1= new TH1F("H1eta_inelast1","Ratio(p1/eta1) - E_{b}",nbinsx,-delta,delta); TH2F *H2eta_pinelast_the = new TH2F("H1eta_inelast_the","pz_{#eta} - E_{b} vs #theta_{#eta}",nbinsx,0,3,nbinsy,-delta,delta); // reconstructed quantities TH1F *H1REb = new TH1F("H1REb","REC Beam Energy (GeV)",10*nbinsx,6,12); // TH1F *H1REb_tcut = new TH1F("H1REb_tcut",strcat(cut,"Beam Energy (GeV)"),nbinsx,1.5,2.5); TH1F *H1Rt = new TH1F("H1Rt","REC -t (GeV^{2})",nbinsx,0,0.05); TH1F *H1Rmg1g2= new TH1F("H1Rmg1g2","REC mg1g2 (GeV)",nbinsx,0,1); TH1F *H1Rmg1g22= new TH1F("H1Rmg1g22","REC mg1g2^{2} (GeV^{2})",nbinsx,0,1); Double_t delta=2; TH1F *H1Reta_the= new TH1F("H1Reta_the","REC #theta_{#eta} (degrees)",nbinsx,0,3); TH1F *H1Reta_inelast= new TH1F("H1Reta_inelast","REC E_{#eta} - E_{b}",nbinsx,-delta,delta); TH1F *H1Reta_pinelast= new TH1F("H1Reta_pinelast","REC pz_{#eta} - E_{b}",nbinsx,-delta,delta); TH1F *H1Reta_inelast1= new TH1F("H1Reta_inelast1","REC Ratio(p1/eta1) - E_{b} (E1,E2)",nbinsx,-delta,delta); TH1F *H1Reta_inelast2 = new TH1F("H1Reta_inelast2","REC Ratio(p2/eta2) - E_{b} (E1,#theta) ",nbinsx,-delta,delta); // TH1F *H1Reta_inelast1= new TH1F("H1Reta_inelast1","REC E_{#eta}(E1,E2) - E_{b} ",nbinsx,-delta,delta); // TH1F *H1Reta_inelast2 = new TH1F("H1Reta_inelast2","REC E_{#eta} (E1,#theta) - E_{b} ",nbinsx,-delta,delta); TH2F *H2Reta_pinelast_the = new TH2F("H1Reta_inelast_the","pz_{#eta} - E_{b} vs #theta_{#eta}",nbinsx,0,3,nbinsy,-delta,delta); Double_t delta=1; TH1F *H1Deta_the = new TH1F("H1Deta_the","GEN-REC #theta_{#eta} (degrees)",nbinsx,-delta,delta); TH1F *H1Deta_the2 = new TH1F("H1Deta_the2","GEN-REC #theta_{#eta} EQ11 (degrees)",nbinsx,-delta,delta); TH1F *H1Deta_E= new TH1F("H1Deta_E","GEN-REC #DeltaE_{#eta} (E1,E2)",nbinsx,-2*delta,2*delta); TH1F *H1Deta_E2 = new TH1F("H1Deta_E2","GEN-REC #DeltaE_{#eta} (E,#theta)",nbinsx,-2*delta,2*delta); TH1F *H1Dg1_E= new TH1F("H1Dg1_the","GEN-REC #DeltaE_{#gamma1}/E",nbinsx,-delta,delta); TH1F *H1Dg2_E= new TH1F("H1Dg2_the","GEN-REC #DeltaE_{#gamma2}/E",nbinsx,-delta,delta); TH2F *H2Deta_thevsthe = new TH2F("H2Deta_thevsthe","GEN-REC #theta_{#eta} vs #theta_{#eta} (degrees)",nbinsx,0,1,nbinsx,-delta,delta); Double_t emaxbin=12; TH1F *H1REg1 = new TH1F("H1REg1","REC E_{#gamma1} (GeV)",nbinsx,0,emaxbin); TH1F *H1REg2 = new TH1F("H1REg2","REC E_{#gamma2} (GeV)",nbinsx,0,emaxbin); TH2F *H2REg1vsEg2 = new TH2F("H2REg1vsEg2","REC E_{#gamma2} vs E_{#gamma2}GeV",nbinsx,0,emaxbin,nbinsx,0,emaxbin); TH2F *H2RetaEvsetaE2 = new TH2F("H2RetaEvsetaE2","REC E_{#eta} (E1,E2) vs E_{#eta} (E1,#theta) GeV",nbinsx,9,emaxbin,nbinsx,9,emaxbin); TH1F *H1RPp = new TH1F("H1RPp","REC P_{p} (GeV)",nbinsx,0,0.5); emaxbin=20; TH1F *H1Rtheg1 = new TH1F("H1Rtheg1","REC #theta_{#gamma1} (deg)",nbinsx,0,emaxbin); TH1F *H1Dtheg1 = new TH1F("H1Dtheg1","GEN-REC #theta_{#gamma1} (deg)",nbinsx,-2.5,2.5); TH1F *H1Rtheg2 = new TH1F("H1Rtheg2","REC #theta_{#gamma2} (deg)",nbinsx,0,emaxbin); TH1F *H1Dtheg2 = new TH1F("H1Dtheg2","GEN-REC #theta_{#gamma2} (deg)",nbinsx,-2.5,2.5); TH2F *H2Rtheg1vstheg2 = new TH2F("H2Rtheg1vstheg2","REC #theta_{#gamma2} vs #theta_{#gamma2} (deg)",nbinsx,0,emaxbin,nbinsx,0,emaxbin); TH1F *H1theg1g2 = new TH1F("H1theg2g1","#theta_{#gamma1#gamma2} (deg)",nbinsx,0,emaxbin); TH1F *H1Rtheg1g2 = new TH1F("H1Rtheg2g1","REC #theta_{#gamma1#gamma2} (deg)",nbinsx,0,emaxbin); TH1F *H1Dtheg1g2 = new TH1F("H1Dtheg2g1","GEN-REC #theta_{#gamma1#gamma2} (deg)",nbinsx,-2.5,2.5); TH2F *H2Rtheg1g2_theg1g2 = new TH2F("H2Rtheg1g2_theg1g2","REC #theta_{#gamma1#gamma2} vs #theta_{#gamma1#gamma2} (deg)",nbinsx,0,emaxbin,nbinsx,0,emaxbin); Int_t ntop = ntop2-2; TH2F *H2g1g2 = new TH2F("H2g1g2","Photon topologies",ntop,0,ntop,ntop,0,ntop); TH2F *H2REg1vsRtheg1 = new TH2F("H2REg1vsRtheg1","REC E_{#gamma1} vs #theta_{#gamma1} (deg)",nbinsx,0,emaxbin,nbinsx,0,12); // read root tree sprintf(filename,"eta_%dgev.root",Ebeam); printf ("filename = %s\n",filename); TFile *tfile = new TFile(filename); TTree *geneta = (TTree *) gROOT->FindObject("geneta"); geneta->SetBranchAddress("Events",&Events.Kg1_px); Int_t nentries = geneta->GetEntries(); for (Int_t j=0; jGetEntry(j); // printf ("nentries=%d, j=%d, Eb=%f, mg1g22=%f, mKg12=%f t=%f\n",nentries,j,Events.Eb,Events.mg1g22,Events.t); H1Eb->Fill(Events.Eb); H1t->Fill(-Events.t); H1mg1g2->Fill(sqrt(Events.mg1g22)); H1mg1g22->Fill(Events.mg1g22); // compute derived quantities of interest eta_px = Events.Kg1_px + Events.Kg2_px; eta_py = Events.Kg1_py + Events.Kg2_py; eta_pz = Events.Kg1_pz + Events.Kg2_pz; eta_E = Events.Kg1_E + Events.Kg2_E; eta_the = (180/pi)*atan2(sqrt(eta_px*eta_px+eta_py*eta_py),eta_pz); prot_the = (180/pi)*atan2(sqrt(Events.prot_px*Events.prot_px+Events.prot_py*Events.prot_py),Events.prot_pz); // printf ("\n px=%f py=%f pz=%f, E=%f, p=%f the=%f\n", eta_px,eta_py,eta_pz,eta_E,sqrt(eta_px*eta_px+eta_py*eta_py+eta_pz*eta_pz),eta_the); H1eta_the->Fill(eta_the); H1eta_inelast->Fill(eta_E-Events.Eb); H1eta_pinelast->Fill(eta_pz-Events.Eb); Double_t t1p =eta_E - eta_pz - mp; Double_t t1eta = (-eta_E*mp + 0.5*meta*meta); // printf ("Events.prot_E=%f mp=%f,t1p=%f t1eta=%f eta_E=%f t1eta/t1p=%f diff=%f\n\n",Events.prot_E,mp,t1p,t1eta,eta_E,t1eta/t1p,eta_E-t1eta/t1p); H1eta_inelast1->Fill(t1eta/t1p-Events.Eb); H2eta_pinelast_the->Fill(eta_the,eta_pz-Events.Eb); // Reconstructed quantities H1REb->Fill(Events.REb); H1Rt->Fill(-Events.Rt); if (Reta_the < 0.5 && fabs(sqrt(Events.Rmg1g22) - 0.548) < 2*0.020) { // special cuts for mixed events H1Rmg1g2->Fill(sqrt(Events.Rmg1g22)); H1Rmg1g22->Fill(Events.Rmg1g22); } // compute derived quantities of interest Reta_px = Events.RKg1_px + Events.RKg2_px; Reta_py = Events.RKg1_py + Events.RKg2_py; Reta_pz = Events.RKg1_pz + Events.RKg2_pz; Reta_E = Events.RKg1_E + Events.RKg2_E; Double_t Reta_cost ; if (Events.RKg1_E *Events.RKg2_E > 0 ) { Reta_the = (180/pi)*atan2(sqrt(Reta_px*Reta_px+Reta_py*Reta_py),Reta_pz); Reta_cost = cos(Reta_the*pi/180); } else { Reta_the = -2; Reta_cost = -1; } // resolutions for each photon Double_t g1_the = (180/pi)*atan2(sqrt(Events.Kg1_px*Events.Kg1_px+Events.Kg1_py*Events.Kg1_py),Events.Kg1_pz); Double_t g2_the = (180/pi)*atan2(sqrt(Events.Kg2_px*Events.Kg2_px+Events.Kg2_py*Events.Kg2_py),Events.Kg2_pz); if (Events.RKg1_pz > 0) { Rg1_the = (180/pi)*atan2(sqrt(Events.RKg1_px*Events.RKg1_px+Events.RKg1_py*Events.RKg1_py),Events.RKg1_pz); } else { Rg1_the = -1; } if (Events.RKg2_pz > 0) { Rg2_the = (180/pi)*atan2(sqrt(Events.RKg2_px*Events.RKg2_px+Events.RKg2_py*Events.RKg2_py),Events.RKg2_pz); } else { Rg2_the = -1; } // photon topologies Float_t g1_stat=-1; Float_t g2_stat=-1; /*if (g1_the >= 0 && g1_the < the0) g1_stat=0; if (g1_the >= the0 && g1_the < the1) g1_stat=1; if (g1_the >= the1 && g1_the < the2a) g1_stat=2; if (g1_the >= the2a && g1_the < the2b) g1_stat=3; if (g1_the >= the2b && g1_the < the3) g1_stat=4; if (g1_the >= the3) g1_stat=5; if (g2_the > 0 && g2_the < the0) g2_stat=0; if (g2_the > the0 && g2_the < the1) g2_stat=1; if (g2_the > the1 && g2_the < the2a) g2_stat=2; if (g2_the > the2a && g2_the < the2b) g2_stat=3; if (g2_the > the2b && g2_the < the3) g2_stat=4; if (g2_the > the3) g2_stat=5;*/ H2g1g2->Fill(g1_stat,g2_stat); // compute angle between photons Double_t g1g2_costhe; Double_t g1g2_the; g1g2_costhe = (Events.Kg1_px*Events.Kg2_px+Events.Kg1_py*Events.Kg2_py+Events.Kg1_pz*Events.Kg2_pz)/(Events.Kg1_E*Events.Kg2_E); if (g1g2_costhe > 1) g1g2_costhe = 1; if (g1g2_costhe < -1) g1g2_costhe = -1; g1g2_the = acos(g1g2_costhe)*180/pi; Double_t Rg1g2_costhe; Double_t Rg1g2_the; if (Events.RKg1_E*Events.RKg2_E > 0) { Rg1g2_costhe = (Events.RKg1_px*Events.RKg2_px+Events.RKg1_py*Events.RKg2_py+Events.RKg1_pz*Events.RKg2_pz)/(Events.RKg1_E*Events.RKg2_E); if (Rg1g2_costhe > 1) Rg1g2_costhe =1; if (Rg1g2_costhe < -1) Rg1g2_costhe =-1; Rg1g2_the = acos(Rg1g2_costhe)*180/pi; } else { Rg1g2_the = 0; } H1theg1g2->Fill(g1g2_the); H1Rtheg1g2->Fill(Rg1g2_the); H1Dtheg1g2->Fill(g1g2_the-Rg1g2_the); H2Rtheg1g2_theg1g2->Fill(g1g2_the,Rg1g2_the); // use largest of two photon energies and angle to compute Reta_E2 if (Events.RKg1_E > Events.RKg2_E && Events.RKg1_E> 0 && 1-Rg1g2_costhe > 0) { Reta_E2 = Events.RKg1_E + meta*meta/(2*Events.RKg1_E*(1-Rg1g2_costhe)); } else if (Events.RKg2_E > Events.RKg1_E && Events.RKg2_E> 0) { Reta_E2 = Events.RKg2_E + meta*meta/(2*Events.RKg2_E*(1-Rg1g2_costhe)); } else { Reta_E2 = 0; } Double_t Rprot_the = (180/pi)*atan2(sqrt(Events.Rprot_px*Events.Rprot_px+Events.Rprot_py*Events.Rprot_py),Events.Rprot_pz); // printf (" px=%f py=%f pz=%f, E=%f, p=%f the=%f\n", Reta_px,Reta_py,Reta_pz,Reta_E,sqrt(Reta_px*Reta_px+Reta_py*Reta_py+Reta_pz*Reta_pz),Reta_the); H1Reta_the->Fill(Reta_the); H1Reta_inelast->Fill(Reta_E-Events.REb); H1Reta_pinelast->Fill(Reta_pz-Events.REb); if (Reta_E > 0 ) { Double_t Rt1p =Reta_E - Reta_pz - mp; Double_t Rt1eta = (-Reta_E*mp + 0.5*meta*meta); if (Reta_the < 0.5 && fabs(sqrt(Events.Rmg1g22) - 0.548) < 2*0.020) { // cut for mixed events H1Reta_inelast1->Fill(Rt1eta/Rt1p-Events.REb); } } Double_t Rt2p; Double_t Rt2eta; if (Reta_E2 > 0 ) { Reta_pz2 = sqrt(Reta_E2*Reta_E2-meta*meta)*Reta_cost; Rt2p = Reta_E2 - Reta_pz2 - mp; Rt2eta = (-Reta_E2*mp + 0.5*meta*meta); if (Reta_the < 0.5 && fabs(sqrt(Events.Rmg1g22) - 0.548) < 2*0.020) { // cuts for mixed events H1Reta_inelast2->Fill(Rt2eta/Rt2p-Events.REb); } // printf("\nReta_E2=%f Reta_E=%f, Rt2eta/Rt2p=%f Reta_cost=%f\n",Reta_E2,Reta_E,Rt2eta/Rt2p,Reta_cost); // printf("Reta_E2=%f Reta_E=%f, Rt2eta/Rt2p=%f Reta_cost=%f\n",Reta_E2-Events.REb,Reta_E-Events.REb,Rt2eta/Rt2p-Events.REb,Reta_cost); } H2RetaEvsetaE2->Fill(Reta_E2,Reta_E); H2Reta_pinelast_the->Fill(Reta_the,Reta_pz-Events.REb); /// testing H2Reta_pinelast_the->Fill(Reta_the,Rt2eta/Rt2p-Events.REb); // use Eq. 11 from PRIMEX proposal Double_t Reta_the2; if (Events.RKg1_E*Events.RKg2_E > 0) { if (Rg1g2_costhe < -1) Rg1g2_costhe=-1; if (Rg1g2_costhe > 1) Rg1g2_costhe= 1; Double_t Reta_cos2 = (Events.RKg1_E*cos(Rg1_the*pi/180) + Events.RKg2_E*cos(Rg2_the*pi/180))/sqrt(Events.RKg1_E*Events.RKg1_E+Events.RKg2_E*Events.RKg2_E+2*Events.RKg1_E*Events.RKg2_E*Rg1g2_costhe); if (Reta_cos2 < -1) Reta_cos2 = -1; if (Reta_cos2 > 1) Reta_cos2 = 1; Reta_the2 = acos(Reta_cos2)*180/pi; } else { Reta_the2 =-2; } H1Deta_the->Fill(eta_the-Reta_the); H1Deta_the2->Fill(eta_the-Reta_the2); H2Deta_thevsthe->Fill(eta_the,eta_the-Reta_the); H1Deta_E->Fill(eta_E-Reta_E); H1Deta_E2->Fill(eta_E-Reta_E2); H1Dg1_E->Fill((Events.RKg1_E-Events.Kg1_E)/Events.Kg1_E); H1Dg2_E->Fill((Events.RKg2_E-Events.Kg2_E)/Events.Kg2_E); H1REg1->Fill(Events.RKg1_E); H1REg2->Fill(Events.RKg2_E); H2REg1vsEg2 ->Fill(Events.RKg1_E,Events.RKg2_E); H1RPp->Fill(sqrt(Events.Rprot_px*Events.Rprot_px+Events.Rprot_py*Events.Rprot_py+Events.Rprot_pz*Events.Rprot_pz)); H1Rtheg1->Fill(Rg1_the); H1Dtheg1->Fill(g1_the-Rg1_the); H1Rtheg2->Fill(Rg2_the); H2Rtheg1vstheg2 ->Fill(Rg1_the,Rg2_the); H2REg1vsRtheg1->Fill(Rg1_the,Events.RKg1_E); } geneta->Print(); // TCanvas *c1 = new TCanvas("c1","c1 Genr8_Read_Eta Canvas",200,10,700,700); c1->SetBorderMode(0); c1->SetFillColor(0); c1->Divide(2,2); c1->cd(1); c1_1->SetGridx(); c1_1->SetGridy(); c1_1->SetBorderMode(0); c1_1->SetFillColor(0); sprintf(string,"Eb=%.2f GeV\n",Eb); t1 = new TLatex(0.5,0.8,string); t1->SetTextColor(1); t1->SetNDC(); // t1->Draw(); H1Eb->SetTitle(string); // H1Eb->GetXaxis()->SetRangeUser(xmin,xmax); // H1Eb->GetYaxis()->SetRangeUser(ymin,ymax); H1Eb->GetXaxis()->SetTitleSize(0.05); H1Eb->GetYaxis()->SetTitleSize(0.05); H1Eb->GetYaxis()->SetTitleOffset(1.5); H1Eb->GetXaxis()->SetTitle("Beam Energy (GeV)"); // H1Eb->GetYaxis()->SetTitle("m_{g1g2}^{2}"); H1Eb->GetXaxis()->SetNdivisions(5); H1Eb->SetMarkerColor(1); H1Eb->SetMarkerStyle(21); H1Eb->Draw(); c1->cd(2); c1_2->SetGridx(); c1_2->SetGridy(); c1_2->SetBorderMode(0); c1_2->SetFillColor(0); // c1_2->SetLogx(); H1t->GetXaxis()->SetNdivisions(5); H1t->Draw(); c1->cd(3); c1_3->SetGridx(); c1_3->SetGridy(); c1_3->SetBorderMode(0); c1_3->SetFillColor(0); H1mg1g2->GetXaxis()->SetNdivisions(5); H1mg1g2->Draw(); c1->cd(4); c1_4->SetGridx(); c1_4->SetGridy(); c1_4->SetBorderMode(0); c1_4->SetFillColor(0); H1mg1g22->GetXaxis()->SetNdivisions(5); H1mg1g22->Draw(); TCanvas *c2 = new TCanvas("c2","c2 Genr8_Read_Eta Canvas",200,10,700,700); c2->SetBorderMode(0); c2->SetFillColor(0); c2->Divide(2,2); c2->cd(1); c2_1->SetGridx(); c2_1->SetGridy(); c2_1->SetBorderMode(0); c2_1->SetFillColor(0); H1eta_the->GetXaxis()->SetNdivisions(5); H1eta_the->Draw(); c2->cd(2); c2_2->SetGridx(); c2_2->SetGridy(); c2_2->SetBorderMode(0); c2_2->SetFillColor(0); // H1eta_inelast->GetXaxis()->SetNdivisions(5); // H1eta_inelast->Draw(); // H1eta_pinelast->GetXaxis()->SetNdivisions(5); // H1eta_pinelast->Draw(); H2Deta_thevsthe->Draw("colz"); c2->cd(3); c2_3->SetGridx(); c2_3->SetGridy(); c2_3->SetBorderMode(0); c2_3->SetFillColor(0); H2eta_pinelast_the->Draw("colz"); c2->cd(4); c2_4->SetGridx(); c2_4->SetGridy(); c2_4->SetBorderMode(0); c2_4->SetFillColor(0); H1eta_inelast1->GetXaxis()->SetNdivisions(5); H1eta_inelast1->Draw(); TCanvas *c3 = new TCanvas("c3","c3 Genr8_Read_Eta Canvas",200,10,700,700); c3->SetBorderMode(0); c3->SetFillColor(0); c3->Divide(2,2); c3->cd(1); c3_1->SetGridx(); c3_1->SetGridy(); c3_1->SetBorderMode(0); c3_1->SetFillColor(0); sprintf(string,"REC Eb=%.2f GeV\n",Eb); t1 = new TLatex(0.5,0.8,string); t1->SetTextColor(1); t1->SetNDC(); // t1->Draw(); H1REb->SetTitle(string); // H1REb->GetXaxis()->SetRangeUser(xmin,xmax); // H1REb->GetYaxis()->SetRangeUser(ymin,ymax); H1REb->GetXaxis()->SetTitleSize(0.05); H1REb->GetYaxis()->SetTitleSize(0.05); H1REb->GetYaxis()->SetTitleOffset(1.5); H1REb->GetXaxis()->SetTitle("Beam Energy (GeV)"); // H1REb->GetYaxis()->SetTitle("m_{g1g2}^{2}"); H1REb->GetXaxis()->SetNdivisions(5); H1REb->SetMarkerColor(1); H1REb->SetMarkerStyle(21); H1REb->Draw(); c3->cd(2); c3_2->SetGridx(); c3_2->SetGridy(); c3_2->SetBorderMode(0); c3_2->SetFillColor(0); H1Rt->GetXaxis()->SetNdivisions(5); H1Rt->Draw(); c3->cd(3); c3_3->SetGridx(); c3_3->SetGridy(); c3_3->SetBorderMode(0); c3_3->SetFillColor(0); H1Rmg1g2->GetXaxis()->SetNdivisions(5); //H1Rmg1g2->Fit("gaus","","",0.4,0.8); H1Rmg1g2->Draw(); c3->cd(4); c3_4->SetGridx(); c3_4->SetGridy(); c3_4->SetBorderMode(0); c3_4->SetFillColor(0); H1Rmg1g22->GetXaxis()->SetNdivisions(5); //H1Rmg1g22->Fit("gaus","","",0.1,0.5); H1Rmg1g22->Draw(); TCanvas *c4 = new TCanvas("c4","c4 Genr8_Read_Eta Canvas",200,10,700,700); c4->SetBorderMode(0); c4->SetFillColor(0); c4->Divide(2,2); c4->cd(1); c4_1->SetGridx(); c4_1->SetGridy(); c4_1->SetBorderMode(0); c4_1->SetFillColor(0); H1Reta_the->GetXaxis()->SetNdivisions(5); H1Reta_the->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c4->cd(2); c4_2->SetGridx(); c4_2->SetGridy(); c4_2->SetBorderMode(0); c4_2->SetFillColor(0); // H1Reta_inelast->GetXaxis()->SetNdivisions(5); // H1Reta_inelast->Draw(); H1Reta_pinelast->GetXaxis()->SetNdivisions(5); H1Reta_pinelast->Fit("gaus"); H1Reta_pinelast->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c4->cd(3); c4_3->SetGridx(); c4_3->SetGridy(); c4_3->SetBorderMode(0); c4_3->SetFillColor(0); H2Reta_pinelast_the->Draw("colz"); c4->cd(4); c4_4->SetGridx(); c4_4->SetGridy(); c4_4->SetBorderMode(0); c4_4->SetFillColor(0); H2RetaEvsetaE2->Draw("colz"); TCanvas *c5 = new TCanvas("c5","c5 Genr8_Read_Eta Canvas",200,10,700,700); c5->SetBorderMode(0); c5->SetFillColor(0); c5->Divide(2,2); c5->cd(1); c5_1->SetGridx(); c5_1->SetGridy(); c5_1->SetBorderMode(0); c5_1->SetFillColor(0); H1Dg1_E->GetXaxis()->SetNdivisions(5); H1Dg1_E->Fit("gaus","","",-0.5,0.5); H1Dg1_E->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c5->cd(2); c5_2->SetGridx(); c5_2->SetGridy(); c5_2->SetBorderMode(0); c5_2->SetFillColor(0); H1Dg2_E->GetXaxis()->SetNdivisions(5); H1Dg2_E->Fit("gaus","","",-0.5,0.5); H1Dg2_E->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c5->cd(3); c5_3->SetGridx(); c5_3->SetGridy(); c5_3->SetBorderMode(0); c5_3->SetFillColor(0); H1Deta_E->GetXaxis()->SetNdivisions(5); H1Deta_E->Fit("gaus"); H1Deta_E->Draw(); c5->cd(4); c5_4->SetGridx(); c5_4->SetGridy(); c5_4->SetBorderMode(0); c5_4->SetFillColor(0); H1Deta_E2->GetXaxis()->SetNdivisions(5); H1Deta_E2->Fit("gaus"); H1Deta_E2->Draw(); TCanvas *c6 = new TCanvas("c6","c6 Genr8_Read_Eta Canvas",200,10,700,700); c6->SetBorderMode(0); c6->SetFillColor(0); c6->Divide(2,2); c6->cd(1); c6_1->SetGridx(); c6_1->SetGridy(); c6_1->SetBorderMode(0); c6_1->SetFillColor(0); H1REg1->GetXaxis()->SetNdivisions(5); // H1REg1->Fit("gaus"); H1REg1->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c6->cd(2); c6_2->SetGridx(); c6_2->SetGridy(); c6_2->SetBorderMode(0); c6_2->SetFillColor(0); H1REg2->GetXaxis()->SetNdivisions(5); // H1REg2->Fit("gaus"); H1REg2->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c6->cd(3); c6_3->SetGridx(); c6_3->SetGridy(); c6_3->SetBorderMode(0); c6_3->SetFillColor(0); H2REg1vsEg2->GetXaxis()->SetNdivisions(5); H2REg1vsEg2->Draw("colz"); c6->cd(4); c6_4->SetGridx(); c6_4->SetGridy(); c6_4->SetBorderMode(0); c6_4->SetFillColor(0); H1RPp->GetXaxis()->SetNdivisions(5); // H1RPp->Fit("gaus"); H1RPp->Draw(); TCanvas *c7 = new TCanvas("c7","c7 Genr8_Read_Eta Canvas",200,10,700,700); c7->SetBorderMode(0); c7->SetFillColor(0); c7->Divide(2,2); c7->cd(1); c7_1->SetGridx(); c7_1->SetGridy(); c7_1->SetBorderMode(0); c7_1->SetFillColor(0); H1Rtheg1->GetXaxis()->SetNdivisions(5); // H1Rtheg1->Fit("gaus"); H1Rtheg1->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c7->cd(2); c7_2->SetGridx(); c7_2->SetGridy(); c7_2->SetBorderMode(0); c7_2->SetFillColor(0); H1Rtheg2->GetXaxis()->SetNdivisions(5); // H1Rtheg2->Fit("gaus"); H1Rtheg2->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c7->cd(3); c7_3->SetGridx(); c7_3->SetGridy(); c7_3->SetBorderMode(0); c7_3->SetFillColor(0); H2Rtheg1vstheg2->GetXaxis()->SetNdivisions(5); H2Rtheg1vstheg2->Draw("colz"); c7->cd(4); c7_4->SetGridx(); c7_4->SetGridy(); c7_4->SetBorderMode(0); c7_4->SetFillColor(0); H1Dtheg1->GetXaxis()->SetNdivisions(5); H1Dtheg1->Fit("gaus"); H1Dtheg1->Draw(); TCanvas *c8 = new TCanvas("c8","c8 Genr8_Read_Eta Canvas",200,10,700,700); c8->SetBorderMode(0); c8->SetFillColor(0); c8->Divide(2,2); c8->cd(1); c8_1->SetGridx(); c8_1->SetGridy(); c8_1->SetBorderMode(0); c8_1->SetFillColor(0); H1theg1g2->GetXaxis()->SetNdivisions(5); H1theg1g2->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c8->cd(2); c8_2->SetGridx(); c8_2->SetGridy(); c8_2->SetBorderMode(0); c8_2->SetFillColor(0); H1Rtheg1g2->GetXaxis()->SetNdivisions(5); H1Rtheg1g2->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c8->cd(3); c8_3->SetGridx(); c8_3->SetGridy(); c8_3->SetBorderMode(0); c8_3->SetFillColor(0); // H2Rtheg1g2_theg1g2->GetXaxis()->SetNdivisions(5); H2Rtheg1g2_theg1g2->Draw("colz"); c8->cd(4); c8_4->SetGridx(); c8_4->SetGridy(); c8_4->SetBorderMode(0); c8_4->SetFillColor(0); H1Dtheg1g2->GetXaxis()->SetNdivisions(5); H1Dtheg1g2->Fit("gaus"); H1Dtheg1g2->Draw(); TCanvas *c9 = new TCanvas("c9","c9 Genr8_Read_Eta Canvas",200,10,700,700); c9->SetBorderMode(0); c9->SetFillColor(0); c9->Divide(2,2); c9->cd(1); c9_1->SetGridx(); c9_1->SetGridy(); c9_1->SetBorderMode(0); c9_1->SetFillColor(0); H1Deta_the->GetXaxis()->SetNdivisions(5); H1Deta_the->Fit("gaus"); H1Deta_the->Draw(); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c9->cd(2); c9_2->SetGridx(); c9_2->SetGridy(); c9_2->SetBorderMode(0); c9_2->SetFillColor(0); H1Deta_the2->GetXaxis()->SetNdivisions(5); H1Deta_the2->Fit("gaus"); H1Deta_the2->Draw(); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); c9->cd(3); c9_3->SetGridx(); c9_3->SetGridy(); c9_3->SetBorderMode(0); c9_3->SetFillColor(0); H1Reta_inelast1->GetXaxis()->SetNdivisions(5); //H1Reta_inelast1->Fit("gaus"); H1Reta_inelast1->Draw(); c9->cd(4); c9_4->SetGridx(); c9_4->SetGridy(); c9_4->SetBorderMode(0); c9_4->SetFillColor(0); H1Reta_inelast2->GetXaxis()->SetNdivisions(5); //H1Reta_inelast2->Fit("gaus"); H1Reta_inelast2->Draw(); TCanvas *c10 = new TCanvas("c10","c10 Genr8_Read_Eta Canvas",200,10,700,700); c10->SetBorderMode(0); c10->SetFillColor(0); c10->Divide(2,2); c10->cd(1); c10_1->SetGridx(); c10_1->SetGridy(); c10_1->SetBorderMode(0); c10_1->SetFillColor(0); // H2g1g2->GetXaxis()->SetNdivisions(5); H2g1g2->GetXaxis()->SetTitleSize(0.05); H2g1g2->GetYaxis()->SetTitleSize(0.05); H2g1g2->GetYaxis()->SetTitleOffset(1.5); H2g1g2->GetXaxis()->SetTitle("Region hit #gamma_{1}"); H2g1g2->GetYaxis()->SetTitle("Region hit #gamma_{2}"); H2g1g2->Draw("colz"); sprintf (string,"k1=%.3f k2=%.3f k3=%.3f\n",Events.insertk1,Events.insertk2,Events.insertk3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); //t1->Draw(); c10->cd(2); c10_2->SetGridx(); c10_2->SetGridy(); c10_2->SetBorderMode(0); c10_2->SetFillColor(0); // get data in topology histogram Float_t sum=0; for (j=ntop2-2;j>0;j--) { for (jj=0;jjGetBinContent(jj,j); sum = sum + content[jj]; } sprintf (string,"%5.0f %5.0f %5.0f %5.0f %5.0f %5.0f \n",content[1],content[2],content[3],content[4],content[5],content[6]); printf ("%s",string); t1 = new TLatex(0.15,0.2+j*0.1,string); t1->SetTextColor(1); t1->SetNDC(); t1->Draw(); } printf ("check sum=%f\n",sum); sprintf (string,"q1=%.3f q2=%.3f q3=%.3f\n",Events.insertq1,Events.insertq2,Events.insertq3); printf ("%s",string); t1 = new TLatex(0.15,0.05,string); t1->SetTextColor(1); t1->SetNDC(); //t1->Draw(); c10->cd(3); c10_3->SetGridx(); c10_3->SetGridy(); c10_3->SetBorderMode(0); c10_3->SetFillColor(0); H2REg1vsRtheg1->Draw("colz"); c10->cd(4); c10_4->SetGridx(); c10_4->SetGridy(); c10_4->SetBorderMode(0); c10_4->SetFillColor(0); TCanvas *c11 = new TCanvas("c11","c11 Genr8_Read_Eta Canvas",200,10,700,700); c11->SetBorderMode(0); c11->SetFillColor(0); c11->Divide(2,2); c11->cd(1); c11_1->SetGridx(); c11_1->SetGridy(); c11_1->SetBorderMode(0); c11_1->SetFillColor(0); H1Rmg1g2->GetXaxis()->SetNdivisions(5); H1Rmg1g2->Fit("gaus","","",0.4,0.8); // comment out for mixed events H1Rmg1g2->Draw(); // TLine *l1 = new TLine(0.548-2*0.020,0,0.548-2*0.020,3000); TLine *l1 = new TLine(0.548-2*0.020,0,0.548-2*0.020,550); l1->SetLineColor(2); l1->SetLineWidth(2); // l1->Draw(); // mixed events line // TLine *l2 = new TLine(0.548+2*0.020,0,0.548+2*0.020,3000); TLine *l2 = new TLine(0.548+2*0.020,0,0.548+2*0.020,550); l2->SetLineColor(2); l2->SetLineWidth(2); // l2->Draw(); // mixed events line c11->cd(2); c11_2->SetGridx(); c11_2->SetGridy(); c11_2->SetBorderMode(0); c11_2->SetFillColor(0); H1Rmg1g22->GetXaxis()->SetNdivisions(5); H1Rmg1g22->Fit("gaus","","",0.1,0.50); // comment out for mixed events H1Rmg1g22->Draw(); c11->cd(3); c11_3->SetGridx(); c11_3->SetGridy(); c11_3->SetBorderMode(0); c11_3->SetFillColor(0); H1Reta_inelast1->GetXaxis()->SetNdivisions(5); H1Reta_inelast1->Fit("gaus"); // comment out for mixed events H1Reta_inelast1->GetXaxis()->SetRangeUser(xmin,xmax); // H1Reta_inelast1->GetYaxis()->SetRangeUser(0,500); // set range for mixed events // H1Reta_inelast1->GetYaxis()->SetRangeUser(0,100); // set range for mixed events H1Reta_inelast1->Draw(); c11->cd(4); c11_4->SetGridx(); c11_4->SetGridy(); c11_4->SetBorderMode(0); c11_4->SetFillColor(0); H1Reta_inelast2->GetXaxis()->SetNdivisions(5); H1Reta_inelast2->Fit("gaus"); // comment out for mixed events H1Reta_inelast2->GetXaxis()->SetRangeUser(xmin,xmax); // H1Reta_inelast2->GetYaxis()->SetRangeUser(0,500); // set range for mixed events // H1Reta_inelast2->GetYaxis()->SetRangeUser(0,100); // set range for mixed events H1Reta_inelast2->Draw(); sprintf(filename,"genr8_read_eta_c1_%d.eps",Ebeam); c1->SaveAs(filename); sprintf(filename,"genr8_read_eta_c1_%d.png",Ebeam); c1->SaveAs(filename); sprintf(filename,"genr8_read_eta_c2_%d.eps",Ebeam); c2->SaveAs(filename); sprintf(filename,"genr8_read_eta_c2_%d.png",Ebeam); c2->SaveAs(filename); sprintf(filename,"genr8_read_eta_c3_%d.eps",Ebeam); c3->SaveAs(filename); sprintf(filename,"genr8_read_eta_c3_%d.png",Ebeam); c3->SaveAs(filename); sprintf(filename,"genr8_read_eta_c4_%d.eps",Ebeam); c4->SaveAs(filename); sprintf(filename,"genr8_read_eta_c4_%d.png",Ebeam); c4->SaveAs(filename); sprintf(filename,"genr8_read_eta_c5_%d.eps",Ebeam); c5->SaveAs(filename); sprintf(filename,"genr8_read_eta_c5_%d.png",Ebeam); c5->SaveAs(filename); sprintf(filename,"genr8_read_eta_c6_%d.eps",Ebeam); c6->SaveAs(filename); sprintf(filename,"genr8_read_eta_c6_%d.png",Ebeam); c6->SaveAs(filename); sprintf(filename,"genr8_read_eta_c7_%d.eps",Ebeam); c7->SaveAs(filename); sprintf(filename,"genr8_read_eta_c7_%d.png",Ebeam); c7->SaveAs(filename); sprintf(filename,"genr8_read_eta_c8_%d.eps",Ebeam); c8->SaveAs(filename); sprintf(filename,"genr8_read_eta_c8_%d.png",Ebeam); c8->SaveAs(filename); sprintf(filename,"genr8_read_eta_c9_%d.eps",Ebeam); c9->SaveAs(filename); sprintf(filename,"genr8_read_eta_c9_%d.png",Ebeam); c9->SaveAs(filename); sprintf(filename,"genr8_read_eta_c10_%d.eps",Ebeam); c10->SaveAs(filename); sprintf(filename,"genr8_read_eta_c10_%d.png",Ebeam); c10->SaveAs(filename); sprintf(filename,"genr8_read_eta_c11_%d.eps",Ebeam); c11->SaveAs(filename); sprintf(filename,"genr8_read_eta_c11_%d.png",Ebeam); c11->SaveAs(filename); }