Geant4  10.02.p03
human_phantom/macro.C File Reference

Go to the source code of this file.

Functions

TFile f ("human_phantom.root")
 
ntuple Print ()
 
ntuple GetBranch ("organID") -> SetAddress(&xx)
 
ntuple GetBranch ("edep") -> SetAddress(&edep)
 
 for (Int_t i=0;i< nevent;i++)
 

Variables

TDirectory * dir = (TDirectory*)f.Get("human_phantom_ntuple")
 
TTree * ntuple = (TTree*)dir->Get("1")
 
Int_t nevent = Int_t(ntuple->GetEntries())
 
Double_t xx
 
Double_t edep
 

Function Documentation

◆ f()

TFile f ( "human_phantom.root"  )

◆ for()

for ( )

Definition at line 17 of file human_phantom/macro.C.

17  {
18  ntuple->GetEvent(i);
19  cout << "organ ID, edep (MeV): "
20  << xx << ", " << edep << endl;
21  }
Double_t xx
Double_t edep
TTree * ntuple

◆ GetBranch() [1/2]

ntuple GetBranch ( "organID"  ) -> SetAddress(&xx)

◆ GetBranch() [2/2]

ntuple GetBranch ( "edep"  ) -> SetAddress(&edep)

◆ Print()

ntuple Print ( )

Variable Documentation

◆ dir

TDirectory* dir = (TDirectory*)f.Get("human_phantom_ntuple")

Definition at line 5 of file human_phantom/macro.C.

◆ edep

Double_t edep

Definition at line 13 of file human_phantom/macro.C.

◆ nevent

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

Definition at line 10 of file human_phantom/macro.C.

◆ ntuple

TTree* ntuple = (TTree*)dir->Get("1")

Definition at line 6 of file human_phantom/macro.C.

◆ xx

Double_t xx

Definition at line 12 of file human_phantom/macro.C.