45 G4AnalysisManager::Instance();
50 delete G4AnalysisManager::Instance();
56 G4cout <<
"### Run " << run_number <<
" start." <<
G4endl;
58 energyTotal[
"logicalHead"]=0.;
59 energyTotal[
"logicalTrunk"]=0.;
60 energyTotal[
"logicalLeftLeg"]=0.;
61 energyTotal[
"logicalRightLeg"]=0.;
62 energyTotal[
"logicalBrain"]=0.;
63 energyTotal[
"logicalLeftArmBone"]=0.;
64 energyTotal[
"logicalRightArmBone"]=0.;
65 energyTotal[
"logicalSkull"]=0.;
66 energyTotal[
"logicalUpperSpine"]=0.;
67 energyTotal[
"logicalMiddleLowerSpine"]=0.;
68 energyTotal[
"logicalPelvis"]=0.;
69 energyTotal[
"logicalStomach"]=0.;
70 energyTotal[
"logicalUpperLargeIntestine"]=0.;
71 energyTotal[
"logicalLowerLargeIntestine"]=0.;
72 energyTotal[
"logicalRibCage"]=0.;
73 energyTotal[
"logicalSpleen"]=0.;
74 energyTotal[
"logicalPancreas"]=0.;
75 energyTotal[
"logicalLeftKidney"]=0.;
76 energyTotal[
"logicalRightKidney"]=0.;
77 energyTotal[
"logicalUrinaryBladder"]=0.;
78 energyTotal[
"logicalUterus"]=0.;
79 energyTotal[
"logicalLeftLung"]=0.;
80 energyTotal[
"logicalRightLung"]=0.;
81 energyTotal[
"logicalLeftOvary"]=0.;
82 energyTotal[
"logicalRightOvary"]=0.;
83 energyTotal[
"logicalLeftLegBone"]=0.;
84 energyTotal[
"logicalRightLegBone"]=0.;
85 energyTotal[
"logicalLeftBreast"]=0.;
86 energyTotal[
"logicalRightBreast"]=0.;
87 energyTotal[
"logicalLeftScapula"]=0.;
88 energyTotal[
"logicalRightScapula"]=0.;
89 energyTotal[
"logicalLeftAdrenal"]=0.;
90 energyTotal[
"logicalRightAdrenal"]=0.;
100 G4String fileName =
"g4humanphantom.root";
101 analysisManager -> OpenFile(fileName);
104 analysisManager -> CreateNtuple(
"ntuple1",
"Edep (MeV) in the organs");
105 analysisManager -> CreateNtupleDColumn(
"ID");
106 analysisManager -> CreateNtupleDColumn(
"Edep");
107 analysisManager -> FinishNtuple();
113 totalRunEnergyDeposit();
119 analysisManager -> Write();
120 analysisManager -> CloseFile();
128 energyTotal[bName] += energyDeposit;
131 void G4HumanPhantomRunAction::totalRunEnergyDeposit()
133 std::map<std::string,G4double>::iterator i = energyTotal.begin();
134 std::map<std::string,G4double>::iterator end = energyTotal.end();
136 G4double totalEnergyDepositInPhantom =0.;
145 G4cout <<
"Energy Total in Run" <<bodypart <<
" = "
153 analysisManager -> FillNtupleDColumn(0, k);
154 analysisManager -> FillNtupleDColumn(1, energyDep/
MeV);
155 analysisManager -> AddNtupleRow();
159 totalEnergyDepositInPhantom += energyDep;
163 G4cout <<
"Total Energy deposit in the body is: "
164 << totalEnergyDepositInPhantom/
MeV <<
" MeV" <<
G4endl;