{ // now create some pads to plot in gROOT->Reset(); TCanvas *c; c = new TCanvas("c","Basic 4",200,10,700,900); c->SetFillColor(18); c->Divide(2,3); /* TPad *pad1,pad2,pad3,pad4; p1 = new TPad("pad1","The pad for particle #1",0.05,0.55,0.45,0.95,21); p2 = new TPad("pad2","The pad for particle #3",0.55,0.55,0.95,0.95,21); p3 = new TPad("pad3","The pad for particle #2",0.05,0.05,0.45,0.45,21); p4 = new TPad("pad4","The pad for particle #4",0.55,0.05,0.95,0.45,21); */ c_1->Draw(); c_2->Draw(); c_3->Draw(); c_4->Draw(); c_5->Draw(); c_6->Draw(); gStyle->SetOptFit(11); gStyle->SetOptStat(11); TFile f("o0.root"); c_1->cd(); h1=new TH1F("h1","All Gammas",100,0.08,0.18); ntp.Project("h1","2g.0"); h1->SetXTitle("Mass[`2g#] "); h1->SetYTitle("Events/1MeV"); h1->Fit("gaus"); //gStyle.SetOptFit(11); h1->Draw(); c_2->cd(); h2=new TH1F("h2"," 1 BCAL and 1 LGD Gamma ",100,0.08,0.18); ntp.Project("h2","2g.0","Nlgd==1&&Nbcal==1"); h2->SetXTitle("Mass[`2g#] "); h2->SetYTitle("Events/1MeV"); h2->Fit("gaus"); h2->Draw(); c_3->cd(); h3=new TH1F("h3"," LGD Gammas ",100,0.08,0.18); ntp.Project("h3","2g.0","Nbcal==0"); h3->SetXTitle("Mass[`2g#] "); h3->SetYTitle("Events/1MeV"); h3->Fit("gaus"); h3->Draw(); c_4->cd(); h4=new TH1F("h4"," BCAL Gammas ",100,0.08,0.18); ntp.Project("h4","2g.0","Nlgd==0"); h4->SetXTitle("Mass[`2g#] "); h4->SetYTitle("Events/1MeV"); h4->Fit("gaus"); h4->Draw(); c_5->cd(); h5=new TH1F("h5","LGD",20,-1,3); ntp.Project("h5","Nlgd"); h5->SetXTitle("Nhits/event "); h5->Draw(); c_6->cd(); h6=new TH1F("h6","BCAL",20,-1,3); ntp.Project("h6","Nbcal"); h6->SetXTitle("Nhits/event "); h6->Draw(); }