4 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
5 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C");
9 TFile*
f =
new TFile(
"full_emc.root");
10 TTree *
t=(TTree *) f->Get(
"pndsim") ;
12 t->SetBranchAddress(
"EmcBump",&bump_array);
14 TFile*
fsim =
new TFile(
"sim_emc.root");
15 TTree *
tsim=(TTree *) fsim->Get(
"pndsim") ;
19 tsim->SetBranchAddress(
"MCTrack",&mctrack_array);
24 TH1F *
h1=
new TH1F(
"h1",
"Cluster energy",100,0.0,1.10);
25 TH1F *
h2=
new TH1F(
"h2",
"Cluster energy corrected",100,0.0,1.10);
29 for (Int_t j=0; j< t->GetEntriesFast(); j++)
32 for (Int_t
i=0;
i<bump_array->GetEntriesFast();
i++)
35 bump_energy=bump->
energy();
39 h1->Fill(bump_energy);
40 h2->Fill(bump_energy_corrected);
45 TCanvas*
c1 =
new TCanvas(
"c1",
"Cluster Energy", 100, 100, 800, 800);
48 h1->SetTitle(
"Cluster energy of 1 GeV photon");
49 h1->GetXaxis()->SetTitle(
"Energy, GeV");
52 h2->SetTitle(
"Cluster energy of 1 GeV photon (corrected)");
53 h2->GetXaxis()->SetTitle(
"Energy, GeV");
static void Init(Int_t MapVersion)
Double_t GetEnergyCorrected() const
double bump_energy_corrected
virtual Double_t energy() const
TClonesArray * bump_array
TClonesArray * mctrack_array
represents a reconstructed (splitted) emc cluster