16 gStyle->SetPalette(1);
17 gROOT->SetStyle(
"Plain");
18 gStyle->SetOptStat(00000);
24 TCanvas *
c1 =
new TCanvas (
"c1",
"",60,60,800,800);
31 ntuple = (TNtuple*)f.Get(
"t");
34 TBranch* eventBranch = ntuple->FindBranch(
"row_wise_branch");
35 if ( ! eventBranch ) rowWise =
false;
42 ntuple->SetBranchAddress(
"radius1",&radius1);
43 ntuple->SetBranchAddress(
"noRadius",&noRadius);
44 ntuple->SetBranchAddress(
"nbHits",&nofHits);
45 ntuple->SetBranchAddress(
"nbScoredHits",&nbEdep);
46 ntuple->SetBranchAddress(
"edep",&edep);
47 ntuple->SetBranchAddress(
"radius2",&radius2);
48 ntuple->SetBranchAddress(
"Einc",&Einc);
68 for (
Int_t i=0; i<1000; i++)
80 t[noRadius] = t[noRadius] +
edep;
81 population[noRadius]=population[noRadius]+1;
82 myRad[noRadius] = radius1;
87 for (
Int_t j=1; j<nbRadius; j++)
89 t[j] = t[j]/population[j];
90 t[j] = t[j]/(myRad[j+1]-myRad[j]);
99 TGraph*
gr1 =
new TGraph(nbRadius,myRad,t);
100 gr1->SetMarkerColor(2);
101 gr1->SetMarkerStyle(20);
102 gr1->SetMarkerSize(1);
103 gr1->SetLineColor(2);
105 gr1->GetXaxis()->SetLimits(0.1,100);
106 gr1->GetYaxis()->SetLimits(0.,22);
107 gr1->GetXaxis()->SetLabelSize(0.025);
108 gr1->GetYaxis()->SetLabelSize(0.025);
109 gr1->GetXaxis()->SetTitleSize(0.035);
110 gr1->GetYaxis()->SetTitleSize(0.035);
111 gr1->GetXaxis()->SetTitleOffset(1.4);
112 gr1->GetYaxis()->SetTitleOffset(1.4);
113 gr1->GetXaxis()->SetTitle(
"r (nm)");
114 gr1->GetYaxis()->SetTitle(
"t (eV/nm)");
121 TLeaf* leaf = ntuple->FindLeaf(name);
123 std::cerr <<
"Error in <SetLeafAddress>: unknown leaf --> " << name << std::endl;
126 leaf->SetAddress(address);