4 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/rootlogon.C");
5 gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C");
9 TFile*
f =
new TFile(
"hit_emc.root");
10 TTree *
t=(TTree *) f->Get(
"pndsim") ;
12 TClonesArray*
hit_array=
new TClonesArray(
"PndEmcHit");
14 t->SetBranchAddress(
"EmcHit",&hit_array);
18 TH1F *
h1=
new TH1F(
"h1",
"Theta",100,-0.1,0.1);
20 for (Int_t j=0; j< t->GetEntriesFast(); j++)
23 for (Int_t
i=0;
i<hit_array->GetEntriesFast();
i++)
26 TVector3
hit_pos(hit->GetX(),hit->GetY(),hit->GetZ());
30 if (pointList.size()!=0)
32 TVector3 point_pos(pointList[0]->GetX(),pointList[0]->GetY(),pointList[0]->GetZ());
33 point_theta=point_pos.Theta();
34 h1->Fill(hit_theta-point_theta);
39 TCanvas*
c1 =
new TCanvas(
"c1",
"", 100, 100, 800, 800);
std::vector< PndEmcPoint * > pointList
TVector3 hit_pos(hit->GetX(), hit->GetY(), hit->GetZ())
std::vector< PndEmcPoint * > & GetPointList()
represents the deposited energy of one emc crystal from simulation