Coder Social home page Coder Social logo

kaphleamrit2 / 2020radres_interactionprobability Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyejin081588/2020radres_interactionprobability

0.0 0.0 0.0 9.64 MB

Calculation of radial dose and interaction probability with 150kVp, 6MV, and Ir-192 (Geant4.10.5).

CMake 14.25% C++ 82.82% Shell 2.93%

2020radres_interactionprobability's Introduction

2020RadRes_InteractionProbability (Geant4.10.5)

  • Calculation of interaction probability with 150kVp, 6MV, and Ir-192.
  • Each folder(P_150kVp, P_6MV, P_192Ir) has the same configuration.
  • Calculation depth : change "wantDepth" in folder of 2&3./src/DetecctorConstruction.cc.
  • Weighting factor : check "// 4. direction" part in folder of 4./src/PrimaryGeneratorAction.cc.

#################################### Geant4 codes #####################################

  1. Normalized Dose
  • physics : G4EmPenelopePhysics
  • input : -
  • output : [distance(cm) dE(keV)] "N1_norm_X*_E7_s.txt"
  • histories : E7
  • how to run: ./N1_norm run.mac
  1. Deposited Dose at 1mm
  • physics : G4EmPenelopePhysics
  • input : -
  • output : [dE(keV)] "N1_D_X*_E7_s.txt"
  • histories : E7
  • how to run: ./N1_norm run.mac
  1. Phase space file at 1mm
  • physics : G4EmPenelopePhysics, rangecut(1nm)
  • input : -
  • output : [particle x y z(cm) dirx diry dirz(cm) KE(keV)] "N1_X*_phsp_s.txt"
  • histories : E7
  • how to run: ./N1_phsp run.mac
  1. Inoization number in GNP
  • physics : G4EmPenelopePhysics, rangecut(1nm)
  • input : "N1_X*_phsp_s.txt" (from 3.)
  • output : [dE(keV)] "N2_dE_GNP_X*_s.txt"
  • histories : E7
  • how to run: ./phspfromGNP run.mac

(X*: 150kVp, 6MV, 192Ir)

##################################### matlab code #####################################

%%%%%%%%%% loading 2~4 output files in matlab

output2 = load("N1_D_X*_E7_s.txt"); % Deposited Dose at 1mm

output3 = load("N1_X*_phsp_s.txt"); % Phase space file at 1mm

output4 = load("N2_dE_GNP_X*_s.txt"); % ionization number in GNP

%%%%%%%%%% calculation of Deposited dose at 1 mm and interaction probability

dE = sum(output2);

h = 0.1; % cm

r = 0.95; % cm

c = 1.6021810^-16; % 1 keV = 1.6021810^-16 J

D = cdE/(pi()r^2h10^-3); % Gy

scale1 = ((1.910^-9)/(1.910^-2))^2; % phsp file beam area correction (cm to nm)

scale2 = length(output3)/10^7; % phsp file beam number correction

p = length(output4)scale1scale2/D;

2020radres_interactionprobability's People

Contributors

hyejin081588 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.