#include using namespace std; #include "StandardLabels.C" void FCAL_Etruth_signal(void) { TColor::CreateColorWheel(); TFile *f1 = new TFile("../fcal_z35.root"); TTree *DFCALTruthShower = (TTree*)gROOT->FindObject("DFCALTruthShower"); TH1D *Efcal = new TH1D("Efcal", "", 400, 0.0, 8000); DFCALTruthShower->Project("Efcal","E"); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGridy(); c1->SetLogy(); double max = Efcal->GetMaximum()*1.1; TH2D *axes = new TH2D("axes", "E_{FCAL}", 100, 0.0, 8000, 100, 1.0, max); axes->SetStats(0); axes->SetXTitle("E_{FCAL} (MeV)"); axes->Draw(); Efcal->SetLineColor(kBlue); Efcal->SetLineWidth(2); Efcal->Draw("same"); StandardLabels(axes, "#pi^{+}#pi^{-} events" , "E_{#gamma} =5.5GeV" , "DFCALTruthShower" , ""); c1->SaveAs("FCAL_Etruth_signal.png"); c1->SaveAs("FCAL_Etruth_signal.pdf"); }