Geant4  10.02.p03
extended/medical/dna/microyz/plot.C File Reference

Go to the source code of this file.

Functions

gStyle SetPalette (1)
 
gROOT SetStyle ("Plain")
 
gStyle SetOptStat (00000)
 
 if (fp)
 
c1 cd (1)
 
ntuple Draw ("y>>hfy","","")
 
hfy Scale (1./(hfy->GetEntries() *hfy->GetBinWidth(1)))
 
hfy SetTitle ("f(y) (um/keV)")
 
hfy GetXaxis () -> SetTitle("y (keV/um)")
 
hfy SetFillColor (1)
 
hfy Draw ("")
 
 for (Int_t j=0;j< hfy->GetNbinsX();j++) norm =normLogfy+(log(10)/B)*hlogyfy->GetBinContent(j)
 
cout<< endl;cout<< "**** I - Results from lin-lin histograms ****"<< endl;cout<< endl;cout<< "---> sum of f (hdy->SetTitle("d() (um/keV)") y)
 
axis Set (bins, new_bins)
 
ntuple SetBranchAddress ("radius",&radius)
 
ntuple SetBranchAddress ("y",&y)
 
ntuple SetBranchAddress ("z",&z)
 
 for (Int_t i=0;i< nentries;i++)
 
hlogyfy Scale (1./(hlogyfy->GetEntries()))
 
hlogy2fy Scale (1./(hlogy2fy->GetEntries()))
 
hlogydy Scale (1./(hlogydy->GetEntries()))
 
hlogy3fy Scale (1./(hlogy3fy->GetEntries()))
 
gPad SetLogx ()
 
hlogyfy SetLineColor (2)
 
hlogyfy SetFillColor (2)
 
hlogyfy SetTitle ("y*f(y)")
 
cout<< "---> sum of Log f (y)
 

Variables

Int_t B =1000
 
Int_t min =-2
 
Int_t max =2
 
FILE * fp = fopen("yz.root","r")
 
 else
 
cout<< "*** it will be created from merged ROOT files ***"<< endl;system("rm -rf yz.root");system("hadd yz.root yz_*.root");}c1=new TCanvas("c1","", 60, 60, 800, 600);c1.Divide(3, 2);TFile f("yz.root");TNtuple *ntuple;ntuple=(TNtuple *) f-> Get ("yz")
 
Double_t norm =0
 
delete new_bins
 
Double_t radius
 
Double_t y
 
Double_t z
 
Int_t nentries = (Int_t)ntuple->GetEntries()
 
Double_t normLogfy =0
 
Double_t logyF =0
 

Function Documentation

◆ cd()

c1 cd ( )

◆ Draw() [1/2]

ntuple Draw ( "y>>hfy"  ,
""  ,
""   
)

◆ Draw() [2/2]

hlogyfy Draw ( ""  )

◆ f() [1/2]

cout<< endl;cout << "**** I - Results from lin-lin histograms ****" << endl;cout << endl;cout << "---> sum of f ( hdy->SetTitle("d() (um/keV)")  y)

Definition at line 91 of file extended/medical/dna/microyz/plot.C.

202 {
203  new_bins[i] = TMath::Power(10, from + i * width);
204 }
#define width

◆ f() [2/2]

cout<< "---> sum of Log f ( y  )

Definition at line 286 of file extended/medical/dna/microyz/plot.C.

292 {
293  hlogy2fy->SetBinContent(i,
294 //(log(10)/B)*
295 hlogy2fy->GetBinCenter(i)
296 *hlogy2fy->GetBinCenter(i)
297 *hlogy2fy->GetBinContent(i)
298 /(TMath::Power(10, from + (i+1) * width)-TMath::Power(10, from + i * width))
299 );
300 }
#define width

◆ for() [1/2]

for ( Int_t  j = 0;j< hfy->GetNbinsX();j++) =normLogfy+(log(10)/B)*hlogyfy->GetBinContent(j)

Definition at line 263 of file extended/medical/dna/microyz/plot.C.

264 {
265  hlogyfy->SetBinContent(i,
266 //(log(10)/B)*
267 hlogyfy->GetBinCenter(i)
268 *hlogyfy->GetBinContent(i)
269 /(TMath::Power(10, from + (i+1) * width)-TMath::Power(10, from + i * width))
270 );
271 }
#define width

◆ for() [2/2]

for ( )

Definition at line 241 of file extended/medical/dna/microyz/plot.C.

242 {
243  ntuple->GetEntry(i);
244  hlogyfy->Fill(y);
245  hlogy2fy->Fill(y);
246  hlogydy->Fill(y);
247  hlogy3fy->Fill(y);
248 
249 }
TTree * ntuple

◆ GetXaxis()

hfy GetXaxis ( ) -> SetTitle("y (keV/um)")

◆ if()

if ( fp  )

Definition at line 31 of file extended/medical/dna/microyz/plot.C.

31  {
32  // exists
33  cout << "*** Notice: the output file yz.root exists ***"<< endl;
34  fclose(fp);
35 } else {
fclose(fp)
Here is the call graph for this function:

◆ Scale() [1/5]

hfy Scale ( 1./  hfy->GetEntries() *hfy->GetBinWidth(1))

◆ Scale() [2/5]

hlogyfy Scale ( 1./  hlogyfy->GetEntries())

◆ Scale() [3/5]

hlogy2fy Scale ( 1./  hlogy2fy->GetEntries())

◆ Scale() [4/5]

hlogydy Scale ( 1./  hlogydy->GetEntries())

◆ Scale() [5/5]

hlogy3fy Scale ( 1./  hlogy3fy->GetEntries())

◆ Set()

axis4 Set ( bins  ,
new_bins   
)

◆ SetBranchAddress() [1/3]

ntuple SetBranchAddress ( "radius"  ,
radius 
)

◆ SetBranchAddress() [2/3]

ntuple SetBranchAddress ( "y"  ,
y 
)

◆ SetBranchAddress() [3/3]

ntuple SetBranchAddress ( "z"  ,
z 
)

◆ SetFillColor() [1/2]

hfy SetFillColor ( )

◆ SetFillColor() [2/2]

hlogyfy SetFillColor ( )

◆ SetLineColor()

hlogyfy SetLineColor ( )

◆ SetLogx()

gPad SetLogx ( )

◆ SetOptStat()

gStyle SetOptStat ( 00000  )

◆ SetPalette()

gStyle SetPalette ( )

◆ SetStyle()

gROOT SetStyle ( "Plain"  )

◆ SetTitle() [1/2]

hfy SetTitle ( "f(y) (um/keV)"  )

◆ SetTitle() [2/2]

hlogyfy SetTitle ( "y*f(y)"  )

Variable Documentation

◆ B

Int_t B =1000

Definition at line 25 of file extended/medical/dna/microyz/plot.C.

◆ else

else
Initial value:
{
cout << "*** Notice: the output file yz.root does not exist ***"<< endl

Definition at line 35 of file extended/medical/dna/microyz/plot.C.

◆ fp

FILE* fp = fopen("yz.root","r")

Definition at line 30 of file extended/medical/dna/microyz/plot.C.

◆ Get

cout<< "*** it will be created from merged ROOT files ***"<< endl; system ("rm -rf yz.root"); system ("hadd yz.root yz_*.root");}c1 = new TCanvas ("c1","",60,60,800,600);c1.Divide(3,2);TFile f("yz.root"); TNtuple* ntuple;ntuple = (TNtuple*)f-> Get("yz")

Definition at line 66 of file extended/medical/dna/microyz/plot.C.

◆ logyF

Double_t logyF =0

Definition at line 302 of file extended/medical/dna/microyz/plot.C.

◆ max

Int_t max =2

Definition at line 27 of file extended/medical/dna/microyz/plot.C.

◆ min

Int_t min =-2

Definition at line 26 of file extended/medical/dna/microyz/plot.C.

◆ nentries

Int_t nentries = (Int_t)ntuple->GetEntries()

Definition at line 240 of file extended/medical/dna/microyz/plot.C.

◆ new_bins

delete new_bins

Definition at line 211 of file extended/medical/dna/microyz/plot.C.

◆ norm

Double_t norm =0

Definition at line 83 of file extended/medical/dna/microyz/plot.C.

◆ normLogfy

Double_t normLogfy =0

Definition at line 281 of file extended/medical/dna/microyz/plot.C.

◆ radius

Double_t radius

Definition at line 235 of file extended/medical/dna/microyz/plot.C.

◆ y

Double_t y

Definition at line 235 of file extended/medical/dna/microyz/plot.C.

◆ z

Double_t z

Definition at line 235 of file extended/medical/dna/microyz/plot.C.