3 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
4 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
11 gStyle->SetHistFillColor(9);
12 gStyle->SetCanvasColor(0);
13 gStyle->SetLabelSize(0.025,
"X");
14 gStyle->SetLabelSize(0.025,
"Y");
15 gStyle->SetTitleSize(0.03,
"Y");
16 gStyle->SetBarOffset(10);
17 gStyle->SetTitleOffset(1,
"X");
18 gStyle->SetTitleOffset(1.55,
"Y");
19 gStyle->SetTitleSize(0.03,
"X");
20 gStyle->SetPalette(1,0);
21 gStyle->SetOptFit(1111);
24 TFile*
inFile =
new TFile(
"../data/MvdMC_Pid_10k.root",
"READ");
25 TTree*
tree = (TTree *)inFile->Get(
"pndsim");
26 TClonesArray*
pointlist=
new TClonesArray(
"PndSdsMCPoint");
27 tree->SetBranchAddress(
"MVDPoint",&pointlist);
30 TH2D *
hist10 =
new TH2D(
"specEnergyLossVsP",
"dE/dx(p)",200,0.0,1,200,0,0.0005);
31 hist10->SetYTitle(
"(dE/dx)/(GeV/cm)");
32 hist10->SetXTitle(
"p/(GeV/c)");
40 for(
int j=0;j<nEvents && j<tree->GetEntriesFast();j++)
43 for(
int i=0;
i<pointlist->GetEntriesFast();
i++)
47 vecFront.SetXYZ(point->GetX(),point->GetY(),point->GetZ());
52 dE=point->GetEnergyLoss();
63 TCanvas*
can1 =
new TCanvas(
"test",
"Energy in MVD",20,20,800,600);
65 hist10->DrawCopy(
"col");
71 cout <<
"Macro finished succesfully." << endl;
72 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
Double_t GetPyOut() const
Double_t GetPxOut() const
Double_t GetPzOut() const