Examples of GEANT 4 application in medical diagnostic















































































- Slides: 79
Examples of GEANT 4 application in medical diagnostic energy range G. Mettivier, F. Di Lillo, A. Sarno, P. Russo Medical Physics Research Laboratory Dipartimento di Fisica “Ettore Pancini” Università di Napoli Federico II INFN, Sezione di Napoli Prof. Giovanni Mettivier, Ph. D mettivier@na. infn. it XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 081676137 1
MC simulations for X-ray breast imaging • Total Volume irradiation • Full Field Digital Mammography (dosimetry) • Digital Breast Tomosynthesis (dosimetry) • Cone-beam breast CT (Computed tomography) (image quality and dosimetry) • Partial Volume irradiation • Magnification/spot Mammography (dosimetry) • Synchrotron radiation breast CT (image quality and dosimetry) • Personalized dosimetry • Synchrotron radiation rotational radiotherapy (dosimetry) XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 2
Total volume irradiation - FFDM XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 3
Mammography - Geometry XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 4
Mammography - dosimetry - K (m. Gy) Kerma in air- > Entrance Surface Air Kerma (without backscattering) - Dg. N are calculated as a function of the weight glandular fraction using MC simulation - USA - Europa 3 m. Gy** 2. 5 m. Gy* *D. R. Dance, “Monte Carlo calculation of conversion factors for the estimation of mean glandular breast dose, ” Phys. Med. Biol. , vol. 35, pp. 1211– 1219, 1980. **R. van Engen et al. , “Addendum on Digital Mammography, ” European Guidelines for Quality Assurance in Mammography Screening, ch. 3, 1. 0 ed. , European Reference Organization for Quality Assured Breast Screening and Diagnostic Services, 2003. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 5
Mammography - Dosimetry XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 6
Mammography - Dosimetry XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 7
Mammography - Dosimetry XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 8
Mammography - Dosimetry Energy Range (ke. V) Fit Equation Parameters Value 1 -4 (a/(xb+c))+d 4 -10 (a/(b+c·xd))+e 10 -20 (a/(b+c·x 3))+d+e·x a=55966. 6 b=-580. 838 c=20. 0272 d=-0. 145142 e=0. 00507372 20 -35 (a/(b+c·x 3))+d+e·x a=43. 9956 b=-11. 1528 c=0. 0192767 d=-0. 00892 e=0. 0004033 35 -50 (a/(b+c·x 3))+d Energy Range (ke. V) Fit Equation 1 -4 (a/(xb+c))+d 4 -10 (a/(b+c·xd))+e a=73226. 7 b=17. 6474 c=14. 2058 d=3. 0487 e=-0. 140218 10 -20 (a/(b+c·x 3))+d+e·x a=892136 b=-4276. 73 c=198. 54 d=-0. 20005 e=0. 0067657 20 -35 (a/(b+c·x 3))+d+e·x a=73. 0777 b=-5. 98609 c=0. 01857 d=-0. 03248 e=0. 0008786 35 -50 (a/(b+c·x 3))+d a=2768. 13 b=2. 88037 c=0. 07367 d=-3. 23978 a=50707. 5 b=13. 9004 c=14. 5793 d=3. 08251 e=-0. 089153 a=2. 6947· 10 6 b=-1. 4991· 10 7 c=1847. 76 d=0. 0175524 Parameters Value a=3664. 9 b=2. 7337 c=0. 009753 d=-9. 01574 a=5. 0999 b=-10. 7473 c=0. 01841 d=0. 01617 XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 9
Total volume irradiation - FFDM Fig. Percentage deviation in Dg. N(E) from the case in which bremsstrahlung processes are simulated and a low cutoff electron energy is set, for the cases in which the bremsstrahlung processes are not included in the MC simulations. Breast thickness = 5 cm; compression paddles = 2 mm PMMA; skin thickness = 1. 45 mm. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 0
Total volume irradiation - FFDM Fig. Influence of the thickness of the top compression paddle on the MC calculation of Dg. N(E) for a PMMA paddle thickness in the range 1 5 m when the incident photon angle on the scoring surface is considered in the air kerma calculation. The deviation is evaluated as the ratio to the results obtained without the top paddle. Breast glandular fraction = 20%; compressed breast thickness = 5 cm: cone-beam irradiation. The breast was in place in the beam path when evaluating the glandular dose and the incident air kerma. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 1
Total volume irradiation - FFDM Fig. MGD per photon to a breast of 20% glandular fraction, due to the primary photons (a) and to the secondary photons (b) for skin thicknesses of 1. 45 mm and 5 mm. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 2
Total volume irradiation - DBT - For a given compressed breast, glandular dose per view depends on scan angle and spectrum - Few experimental data available for dose distribution in the irradiated breast XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 13
Total volume irradiation - DBT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 14
Total volume irradiation - DBT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 15
Total volume irradiation - DBT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 16
Total volume irradiation - BCT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 7
Total volume irradiation - BCT more projections Full 3 D image reconstruction Absorbed dose ~ 5 m. Gy XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 8
Total volume irradiation - BCT Courtesy of Prof. J. Boone, Univ. California Davis XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 1 9
Total volume irradiation - BCT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 2 0
Total volume irradiation - BCT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 2 1
Total volume irradiation - BCT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 2 2
Total volume irradiation – Future work - Validation of the code with standard (TG 95) - Definition od the Dg. N in CBT, DBT and FFDM XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 23
attenuation phase shift S. D. Auweter et al. , British Inst. Radiol. 2014, doi 10. 1259/bjr. 201330606 Black Sea Conference 2016– 8 June 2016 24
Black Sea Conference 2016– 8 June 2016 56
s Black Sea Conference 2016– 8 June 2016 59
Partial Volume Irradiation - Syrma. CT XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 27
Longo et al. , Phys Med Biol 61, 2016 28
Partial Volume Irradiation - Syrma. CT - Interview on Medical. Physics. WEB - Featured article XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 29
Partial Volume Irradiation - Spot. DM XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 30
Partial Volume Irradiation - Spot. DM XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 31
Partial Volume Irradiation - Spot. DM Fig. Polyenergetic Dg. N, Dg. NV and Dg. NM for a 20% glandular breast with a thickness of 50 mm (constant thickness compression) for varying compression paddle size. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 32
Phantom #5 UCDMC breast scan patient Personalized dosimetry Volume rendering Axial slice Coronal slice XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 Sagittal slice 33
Synchrotron radiation rotational radiotherapy • • Energy: 178 ke. V Phantom dimension: 14 cm diameter, 9 cm heigh Material: polyethilen Beam dimension: 1, 7, 14 cm x (direction) XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 34
Exercise: a realistic X-ray imaging simulation XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 35
Main. cc Random engine Pseudo-random number generators (PRNG) use in MC simulations are necessary to generate reliable representations of the physical imaging environment. The Hep. Random module consists of classes implementing different random engines and different random distributions - Ranecu engine - Mersenne/Twister engine - Hep. James. Random engine #include "Randomize. hh" CLHEP: : Hep. Random: : set. The. Engine(new CLHEP: : Hep. James. Random); if(argc>2){ long indice = strtol(argv[2], NULL, 10); CLHEP: : Hep. Random: : set. The. Seed(time(NULL)+indice); } else{ CLHEP: : Hep. Random: : set. The. Seed(time(NULL)); } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 36
Main. cc Run Manager G 4 Run. Manager * run. Manager = new G 4 Run. Manager; Detector. Construction* detector = new Detector. Construction; //Setup descriction run. Manager->Set. User. Initialization(detector); Physics. List* physics = new Physics. List; // Used Physic List run. Manager->Set. User. Initialization(physics); Primary. Generator. Action* gen_action = new Primary. Generator. Action(); run. Manager->Set. User. Action(gen_action); Run. Action* run_action = new Run. Action; run. Manager->Set. User. Action(run_action); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 37
Main. cc XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 38
Main. cc Geant 4 Kernel run. Manager->Initialize(); #ifdef G 4 VIS_USE G 4 Vis. Manager* vis. Manager = new G 4 Vis. Executive; vis. Manager->Initialize(); #endif XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 39
Main. cc User Interface manager G 4 UImanager* UImanager = G 4 UImanager: : Get. UIpointer(); if (argc!=1) { // batch mode G 4 String command = "/control/execute "; G 4 String file. Name = argv[1]; UImanager->Apply. Command(command+file. Name); } else { // interactive mode : define UI session #ifdef G 4 UI_USE G 4 UIExecutive* ui = new G 4 UIExecutive(argc, argv); #ifdef G 4 VIS_USE //UImanager->Apply. Command("/control/execute vis. mac"); #endif ui->Session. Start(); delete ui; #endif #ifdef G 4 VIS_USE delete vis. Manager; #endif } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 40
Detector. Construction. cc • A detector geometry in GEANT 4 is made of a number of volumes • Largest volume -> World volume (typically a box) • Each volume is created by describing its shape and its physical characteristics, and then placing it inside a containing volume • When a volume (daughter) is placed within another volume(mother), its coordinate system is defined with respect to its mother volume XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 41
Detector. Construction. cc Object Dimensions G 4 double skin_thickness=0. 5; //*cm; G 4 double breast_out_radium=8. ; //*cm; G 4 double breast_out_height=5. ; //*cm; G 4 double source_det_distance=64. 5; //*cm; G 4 double superior_compressing_pl=0. 28; //*cm; G 4 double inf_compressing_pl=0. 41; //*cm; G 4 double f_g=. 5; //glandular fraction by mass; G 4 double source_to_rot_dist=62. ; //cm G 4 double source_to_det_dist=66. ; //cm G 4 double air_gap=1. 5; //cm XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 42
Detector. Construction. cc Materials Definition G 4 double density, fractionmass; G 4 int ncomponents; G 4 Nist. Manager* man = G 4 Nist. Manager: : Instance(); G 4 Element* N = man -> Find. Or. Build. Element("N"); G 4 Element* O = man -> Find. Or. Build. Element("O"); G 4 Element* H = man -> Find. Or. Build. Element("H"); G 4 Element* C = man -> Find. Or. Build. Element("C"); G 4 Element* P = man -> Find. Or. Build. Element("P"); air = man->Find. Or. Build. Material ("G 4_AIR"); water = man->Find. Or. Build. Material ("G 4_WATER"); plexi = man->Find. Or. Build. Material ("G 4_PLEXIGLASS"); polietilene = man->Find. Or. Build. Material ("G 4_POLYETHYLENE"); graphite = man->Find. Or. Build. Material ("G 4_GRAPHITE"); Al = man->Find. Or. Build. Material ("G 4_Al"); polycarbonate = man->Find. Or. Build. Material ("G 4_POLYCARBONATE"); carbon= man->Find. Or. Build. Material ("G 4_C"); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 43
Detector. Construction. cc Materials Definition // Carbon Fiber G 4 Element* el. C = new G 4 Element("Carbon", "C", 6. , 12. 01*g/mole); Carbon. Fiber = new G 4 Material("Carbon. Fiber", 0. 145*g/cm 3, 1); Carbon. Fiber->Add. Element(el. C, 1); //vacuum = new G 4 Material("Galactic", 1. 01*g/mole, universe_mean_density, k. State. Gas, 2. 73*kelvin, 3. e-18*pascal); // Skin Boone skin_boone = new G 4 Material("skin_boone", density=1. 09*g/cm 3, ncomponents=5); skin_boone -> Add. Element(H, fractionmass=0. 098); skin_boone -> Add. Element(C, fractionmass=0. 178); skin_boone -> Add. Element(N, fractionmass=0. 050); skin_boone -> Add. Element(O, fractionmass=0. 667); skin_boone -> Add. Element(P, fractionmass=0. 007); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 44
Detector. Construction. cc Materials Definition //Breast Tissue 0% GLANDULAR G 4 double adip_density=0. 9301; breast_tissue_0 = new G 4 Material("breast_tissue_0", adip_density*g/cm 3, ncomponents=5); breast_tissue_0 -> Add. Element(H, fractionmass=0. 112); breast_tissue_0 -> Add. Element(C, fractionmass=0. 619); breast_tissue_0 -> Add. Element(N, fractionmass=0. 017); breast_tissue_0 -> Add. Element(O, fractionmass=0. 251); breast_tissue_0 -> Add. Element(P, fractionmass=0. 001); //Breast Tissue 100% GLANDULAR G 4 double gland_density=1. 04; breast_tissue_100 = new G 4 Material("breast_tissue_100", gland_density*g/cm 3, ncomponents=5); breast_tissue_100 -> Add. Element(H, fractionmass=0. 102); breast_tissue_100 -> Add. Element(C, fractionmass=0. 184); breast_tissue_100 -> Add. Element(N, fractionmass=0. 032); breast_tissue_100 -> Add. Element(O, fractionmass=0. 677); breast_tissue_100 -> Add. Element(P, fractionmass=0. 005); //Breast Tissue X% GLANDULAR G 4 double breast_density=1. /((f_g/gland_density)+((1 -f_g)/adip_density)); breast_tissue = new G 4 Material("breast_tissue", breast_density*g/cm 3, ncomponents=2); breast_tissue->Add. Material(breast_tissue_0, (1 -f_g)); breast_tissue->Add. Material(breast_tissue_100, f_g); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 45
Detector. Construction. cc World solid_world = new G 4 Box("solid_world", 1. *m, 1. *m); logic_world = new G 4 Logical. Volume(solid_world, air, "logic_world", 0, 0, 0); physical_world = new G 4 PVPlacement(0, G 4 Three. Vector(), logic_world, "physical_world", 0, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 46
Detector. Construction. cc Body solid_body = new G 4 Box("solid_body", 8. 5*cm, 15. *cm); logic_body = new G 4 Logical. Volume(solid_body, water, "logic_body", 0, 0, 0); G 4 Vis. Attributes* solid_body_Vis. Att = new G 4 Vis. Attributes(); solid_body_Vis. Att->Set. Force. Aux. Edge. Visible(true); solid_body_Vis. Att->Set. Colour(1. , 0. , 1. ); logic_body->Set. Vis. Attributes(solid_body_Vis. Att); physical_body = new G 4 PVPlacement(0, G 4 Three. Vector(-8. 5* cm, 0. *cm, -source_to_det_dist-source_to_rot_dist-air_gap-3. )*cm), logic_body, "physical_body", logic_world, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 47
Detector. Construction. cc Compression plate_sup = new G 4 Box("plate_sup", 12. *cm, 15. *cm, (superior_compressing_pl/2. )*cm); logic_plate_sup = new G 4 Logical. Volume(plate_sup, polycarbonate, "logic_plate_sup", 0, 0, 0); G 4 Vis. Attributes* plate_sup_Vis. Att = new G 4 Vis. Attributes(); plate_sup_Vis. Att->Set. Force. Aux. Edge. Visible(true); plate_sup_Vis. Att->Set. Colour(1. , 0. , 1. ); logic_plate_sup->Set. Vis. Attributes(plate_sup_Vis. Att); physical_plate_sup = new G 4 PVPlacement(0, G 4 Three. Vector(12. * cm, 0. *cm, -(source_to_det_distsource_to_rot_dist-air_gap-breast_out_height-superior_compressing_pl/2. )*cm), logic_plate_sup, "physical_plate_sup", logic_world, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 48
Detector. Construction. cc Compression plate_inf = new G 4 Box("plate_inf", 12. *cm, 15. *cm, (inf_compressing_pl/2. )*cm); logic_plate_inf = new G 4 Logical. Volume(plate_inf, Carbon. Fiber, "logic_plate_inf", 0, 0, 0); G 4 Vis. Attributes* plate_inf_Vis. Att = new G 4 Vis. Attributes(); plate_inf_Vis. Att->Set. Force. Aux. Edge. Visible(true); plate_inf_Vis. Att->Set. Colour(1. , 0. , 1. ); logic_plate_inf->Set. Vis. Attributes(plate_inf_Vis. Att); physical_plate_inf = new G 4 PVPlacement(0, G 4 Three. Vector(12. * cm, 0. *cm, -(source_to_det_distsource_to_rot_dist-air_gap+inf_compressing_pl/2. )*cm), logic_plate_inf, "physical_plate_inf", logic_world, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 49
Detector. Construction. cc Skin skin_layer = new G 4 Tubs("skin_layer", 0. *cm, breast_out_radium*cm, (breast_out_height/2)*cm, 270. *deg, 180. *deg); logic_skin_layer = new G 4 Logical. Volume(skin_layer, breast_tissue_0, "logic_skin_layer", 0, 0, 0); G 4 Vis. Attributes* skin_layer_Vis. Att = new G 4 Vis. Attributes(); skin_layer_Vis. Att->Set. Force. Aux. Edge. Visible(true); skin_layer_Vis. Att->Set. Colour(1. , 0. , 1. ); logic_skin_layer->Set. Vis. Attributes(skin_layer_Vis. Att); physical_skin_layer = new G 4 PVPlacement(0, G 4 Three. Vector(0. * cm, 0. *cm, -(source_to_det_dist-source_to_rot_dist-air_gapbreast_out_height/2)*cm), logic_skin_layer, "physical_skin_layer", logic_world, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 50
Detector. Construction. cc Breast breast = new G 4 Tubs("breast", 0. *cm, (breast_out_radium-skin_thickness)*cm, ((breast_out_height/2)skin_thickness)*cm, 270. *deg, 180. *deg); logic_breast = new G 4 Logical. Volume(breast, breast_tissue, "logic_breast", 0, 0, 0); G 4 Vis. Attributes* breast_Vis. Att = new G 4 Vis. Attributes(); breast_Vis. Att->Set. Force. Aux. Edge. Visible(true); breast_Vis. Att->Set. Colour(1. , 1. ); logic_breast->Set. Vis. Attributes(breast_Vis. Att); physical_breast = new G 4 PVPlacement(0, G 4 Three. Vector(0. * cm, 0. *cm), logic_breast, "physical_breast", logic_skin_layer, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 51
Detector. Construction. cc Detector det_cov. Al = new G 4 Box("det_cov. Al", 12. *cm, 15. *cm, 0. 0025/2. *cm); logic_det_cov. Al = new G 4 Logical. Volume(det_cov. Al, "logic_det_cov. Al", 0, 0, 0); G 4 Vis. Attributes* det_cov. Al_Vis. Att = new G 4 Vis. Attributes(); det_cov. Al_Vis. Att->Set. Force. Aux. Edge. Visible(true); det_cov. Al_Vis. Att->Set. Colour(1. , 2. , 1. ); logic_det_cov. Al->Set. Vis. Attributes(det_cov. Al_Vis. Att); physical_det_cov. Al = new G 4 PVPlacement(0, G 4 Three. Vector(12. * cm, 0. *cm, -(source_to_det_dist+0. 0025/2. source_to_rot_dist)*cm), logic_det_cov. Al, "physical_det_cov. Al", logic_world, false, 0); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 52
Detector. Construction. cc Detector det_cov. C = new G 4 Box("det_cov. C", 12. *cm, 15. *cm, 0. 0084/2. *cm); logic_det_cov. C = new G 4 Logical. Volume(det_cov. C, carbon, "logic_det_cov. C", 0, 0, 0); G 4 Vis. Attributes* det_cov. C_Vis. Att = new G 4 Vis. Attributes(); det_cov. C_Vis. Att->Set. Force. Aux. Edge. Visible(true); det_cov. C_Vis. Att->Set. Colour(1. , 1. ); logic_det_cov. C->Set. Vis. Attributes(det_cov. C_Vis. Att); physical_det_cov. C = new G 4 PVPlacement(0, G 4 Three. Vector(12. * cm, 0. *cm, -(source_to_det_dist+0. 0084/2. +0. 0025 -source_to_rot_dist)*cm), logic_det_cov. C, "physical_det_cov. C", logic_world, false, 0); Setup. Detectors(); return physical_world; } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 53
Physics. List. cc Within this class all particles and physics process to be used during the simulation must be defined. The range cut-off parameter should also be defined in this class. Construct. Particle(); // construction of particles Construct. Process(); //construct process and register then to particles Set. Cuts(); // setting a range cut value for all particles Construct. Particle() #include G 4 Gamma. hh //gamma G 4 Gamma: : Gamma. Definition(); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 54
Physics. List. cc void Physics. List: : Construct. Decay() { G 4 Decay* the. Decay. Process = new G 4 Decay(); the. Particle. Iterator->reset(); while( (*the. Particle. Iterator)() ){ G 4 Particle. Definition* particle = the. Particle. Iterator->value(); G 4 Process. Manager* pmanager = particle->Get. Process. Manager(); } } if (the. Decay. Process->Is. Applicable(*particle)) { pmanager ->Add. Process(the. Decay. Process); pmanager ->Set. Process. Ordering(the. Decay. Process, idx. Post. Step); pmanager ->Set. Process. Ordering(the. Decay. Process, idx. At. Rest); } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 55
Physics. List. cc void Physics. List: : Set. Cuts() { if (verbose. Level >0){ G 4 cout << "Physics. List: : Set. Cuts: "; G 4 cout << "Cut. Length : " << G 4 Best. Unit(default. Cut. Value, "Length") << G 4 endl; } Set. Cut. Value(default. Cut. Value, "gamma"); Set. Cut. Value(default. Cut. Value, "e-"); Set. Cut. Value(default. Cut. Value, "e+"); Set. Cut. Value(default. Cut. Value, "proton"); } if (verbose. Level>0) Dump. Cut. Values. Table(); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 56
Primary. Generation. Action. cc • It is a mandatory class which specifies the generation of primary particles (e. g. gammas X-rays) • Geant 4 provides three G 4 VPrimary. Generator concrete classes: • G 4 Particle. Gun • G 4 General. Particle. Source • G 4 HEPEvt. Interface • The Geant 4 General Particle Source module (GPS) allows to generate primary particles in a more sophisticated manner. • Spectrum: linear, exponential, gaussian, user-defined, etc. • Angula distribution: unidirectional, isotropic, ets. , • Spatial sampling: on simple 2 D or 3 D surfaces (e. g. discs, spheres and boxes) XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 57
Primary. Generation. Action. cc Action Primary. Generator. Action: : Primary. Generator. Action() { G 4 UImanager* uimanager = G 4 UImanager: : Get. UIpointer(); particle. Gun = new G 4 General. Particle. Source(); uimanager->Apply. Command("/gps/particle gamma"); uimanager->Apply. Command("/gps/ene/type User"); f. Tube. Messenger = new Primary. Generator. Messenger(this); } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 58
Primary. Generation. Action. cc Action G 4 double angle, x, y, z, costheta, phi, theta, x_p 0, y_p 0, z_p 0, Px, Py, Pz; angle = PI*(ft. Ang/deg)/180. +asin((source_to_det_distsource_to_rot_dist)*sin(PI*((ft. Ang/deg)/180. ))/source_to_rot_dist); z = (source_to_rot_dist)*cos(angle); y = -(source_to_rot_dist)*sin(angle); x = 0. ; G 4 String command; std: : stringstream s 1; std: : stringstream s 2; s 1 << "/gps/position " << x << " " << y << " " << z ; command = s 1. str(); uimanager->Apply. Command(command); XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 59
Primary. Generation. Action. cc Action while(!detector_flag){ phi = G 4 Uniform. Rand()*2*M_PI; costheta = 2*G 4 Uniform. Rand()-1; theta=acos(costheta); z_p 0=sin(theta)*cos(phi); y_p 0=sin(theta)*sin(phi); x_p 0=cos(theta); z_p 0=z_p 0/sqrt(pow(x_p 0, 2)+pow(y_p 0, 2)+pow(z_p 0, 2)); y_p 0=y_p 0/sqrt(pow(x_p 0, 2)+pow(y_p 0, 2)+pow(z_p 0, 2)); x_p 0=x_p 0/sqrt(pow(x_p 0, 2)+pow(y_p 0, 2)+pow(z_p 0, 2)); if(fabs((source_to_det_dist)*y_p 0)<=20. && (source_to_det_dist)*x_p 0<=30. && (source_to_det_dist)*x_p 0>=0. && z_p 0>=0. ) { detector_flag=true; Pz=z_p 0; Py=y_p 0; Px=x_p 0; } } detector_flag=false; Pz= source_to_det_dist; Py= source_to_det_dist * tan(2. *atan(15. /source_to_det_dist)*(G 4 Uniform. Rand()-0. 5)); // Px = source_to_det_dist * tan(atan(26. /source_to_det_dist)*G 4 Uniform. Rand()); // G 4 double x 0; G 4 double y 0; G 4 double z 0; XIV Seminar on z 0 = Pz *cos(angle) - Py *sin(angle); y 0 = Pz * sin(angle)+ Py *cos(angle); Software for Nuclear, Subnuclear x 0 = Px; and Applied Physics, Alghero – 8 June 2017 60
Run. Action. cc Action G 4 Run* Run. Action: : Generate. Run() { return new Run; } void Run. Action: : End. Of. Run. Action(const G 4 Run* a. Run) { Run *the. Run=(Run*)(a. Run); } G 4 cout<<"@@@@@@@@@@@@@@@@"<<G 4 endl; G 4 cout<<"The calculated mean glandular dose (total) is: "<<the. Run->mgd_tot<<" m. Gy. "<<G 4 endl; G 4 cout<<"@@@@@@@@@@@@@@@@"<<G 4 endl; (the. Run->mgd_tot)=0; XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 61
Run. cc Action Run: : Run() { mgd_tot=0; } Run: : ~Run() {; } void Run: : Increment (G 4 double mgd_p) { mgd_tot+=mgd_p; } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 62
Analysis manager XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 63
Analysis manager XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 64
MGD. cc Inizialize extern G 4 double f_g; G 4 double MGD_p; MGD: : MGD(G 4 String name) : G 4 VSensitive. Detector(name) {} MGD: : ~MGD() {} void MGD: : Initialize(G 4 HCof. This. Event* HCE) { G 4 Run. Manager* run. Manager=G 4 Run. Manager: : Get. Run. Manager(); the. Run=(Run*)run. Manager->Get. Current. Run(); } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 65
MGD. cc Process. Hits G 4 bool MGD: : Process. Hits( G 4 Step* a. Step, G 4 Touchable. History*) { G 4 Track* track = a. Step->Get. Track(); G 4 Material *material = a. Step->Get. Track()->Get. Material(); const G 4 Dynamic. Particle* dyn. Particle = track-> Get. Dynamic. Particle(); G 4 Particle. Definition* particle = dyn. Particle-> Get. Definition(); G 4 Step. Point* pre. Step = a. Step->Get. Pre. Step. Point(); G 4 Three. Vector pos = pre. Step->Get. Position(); G 4 Particle. Definition* particle_s= G 4 Electron: : Electron. Definition(); if ( particle_s!=particle && track->Get. Track. ID()==1 ){ G 4 double ener_dep = (a. Step->Get. Pre. Step. Point()->Get. Kinetic. Energy()/ke. V)-(a. Step>Get. Post. Step. Point()->Get. Kinetic. Energy()/ke. V); G 4 double ener_part = a. Step->Get. Pre. Step. Point()->Get. Kinetic. Energy()/ke. V; G 4 VPhysical. Volume* phys. Volum = a. Step->Get. Pre. Step. Point()->Get. Physical. Volume(); G 4 double g_factor=G_factor(ener_part, material, phys. Volum); MGD_p=(g_factor*ener_dep*1. 6/pow(10, 13)); the. Run->Increment(MGD_p); } return true; } XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 66
MGD. cc G_Factor double MGD: : G_factor(G 4 double energy_inc, G 4 Material *material_b, G 4 VPhysical. Volume* phys. Vol) { G 4 double mu_rho_adipose; G 4 double mu_rho_glandular; if (energy_inc<4. ) { mu_rho_adipose = …. ; //0% mu_rho_glandular = …. ; //100% } …. …. …. if (energy_inc>87. && energy_inc<120. ) { mu_rho_adipose = …. ; //0% mu_rho_glandular = …. ; //100% } G 4 double g_factor = (f_g*mu_rho_glandular)/(f_g*mu_rho_glandular+(1 -f_g)*mu_rho_adipose); G 4 double global_factor=g_factor/(f_g*(material_b->Get. Density()/(kg/cm 3))*(phys. Vol->Get. Logical. Volume()>Get. Solid()->Get. Cubic. Volume()/cm 3)); return global_factor; XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 67
GPS Macro. File Example using mono-energetic energy spectrum #type of particle /gps/particle gamma #Set the momentum direction /gps/direction 0. -1. 0. #(Infinitesimal) Point source /gps/pos/type Point /gps/pos/centre 0 32 0 cm #Energy /gps/ene/type Mono /gps/ene/mono 0. 0290 Me. V #Visualization /vis/open DAWNFILE /vis/viewer/set/viewpoint. Theta. Phi 90 0 /vis/viewer/zoom 1 /vis/draw. Volume /tracking/store. Trajectory 1 /vis/scene/add/trajectories /vis/scene/end. Of. Even. Action accumulate #Verbosity (0, 1 or 2) /tracking/verbose 1 #No particles /run/beam. On 1000 XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 68
GPS macro file mono_beam. mac Run_macro. mac /gps/ene/type Mono /gps/ene/mono 16. 8 ke. V /run/beam. On 100 monoenergetic /run/verbose 1 /tube/angle. Tomo/angle. Fix 20. /control/execute mono_beam. mac polyenergetic Mo_25 um. Mo_25 kv. mac or Rh_25 um. Rh_29 kv. mac or W_700 um. Al_50 kv. mac XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 69
Energy spectrum simulation https: //www. oem-xray-components. siemens. com/x-ray-spectra-simulation XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 70
Energy spectrum simulation XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 71
GPS macro file Mo_25 um. Mo_25 kv. mac /gps/hist/type energy /gps/ene/min 0. 004 Me. V /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point /gps/hist/point 0. 0045 0. 0055 0. 0065 0. 0075 0. 0085 0. 0095 0. 0105 0. 0115 0. 0125 0. 0135 0. 0145 0. 0155 0. 0165 0. 0175 0. 0185 0. 0195 0. 0205 0. 0215 0. 0225 0. 023 2. 44 7580. 73 4545482. 58 326455789. 09 9087389185. 42 83002376501. 10 486087372730. 25 1986962689668. 87 6667912207776. 68 14446907314006. 20 26855335297994. 30 45790256233885. 90 72063272641971. 70 92936112506315. 10 118451016671956. 00 144883124269545. 00 169667974218726. 00 196330058857799. 00 221483947075903. 00 243448775909841. 00 265594287864864. 00 284095977604389. 00 299124674059451. 00 302358754917979. 00 303749482043087. 00 303395259514451. 00 394956947952509. 00 1202838638633490. 00 304466908425093. 00 267147505760193. 00 260081890702248. 00 427331568583846. 00 34398571347817. 80 22978615961968. 90 23378389713820. 10 22906997936777. 80 22275230078026. 70 19952498137019. 60 16850598949007. 70 XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 72
Vis. mac /vis/open OGL 600 x 600 -0+0 /vis/draw. Volume # Draw geometry /vis/scene/add/axes 0 0 0 2. cm # Axes /vis/viewer/set/viewpoint. Theta. Phi -70. # Specify view angle /vis/viewer/zoom 2 # Specify zoom value # Draw smooth trajectories /vis/scene/add/trajectories /vis/modeling/trajectories/create/draw. By. Charge /vis/modeling/trajectories/draw. By. Charge-0/default/set. Draw. Step. Pts true /vis/modeling/trajectories/draw. By. Charge-0/default/set. Step. Pts. Size 1 # Draw hits at end of event: /vis/scene/add/hits /vis/scene/end. Of. Event. Action accumulate -1 # Re-establish auto refreshing and verbosity: /vis/verbose warnings XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 73
Debugging, compiling and linking experiments > cd /DBT_alghero > cmake -DGeant 4_DIR=/home/adminlab/geant 4. 10. 00. p 01 -install/lib/Geant 4 -10. 0. 1/ > make -j. N >. /DBT_alghero Idle> /control/execute vis. mac Idle> /control/execute run_macro. mac XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 74
Scatter field estimation XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 75
XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 76
Elenco pubblicazioni 1. G. Mettivier et a. , “Evaluation of scattering in Cone-Beam breast computed tomography: a Monte Carlo and experimental phantom study”, (IEEE Trans. Nucl. Sci. , vol. 57, N° 5, pp. 2510 -2517, 2010). 2. G. Mettivier et al. , “Scatter correction in Cone-Beam breast computed tomography: simulations and experiments”, ( IEEE Trans. Nucl. Sci. , vol. 59, N° 5, pp. 2008 -2019, 2012). 3. N. Lanconelli et al. , “Investigation of the dose distribution for a Cone Beam CT system dedicated to breast imaging”, (Physica Medica, vol. 4, N. 4, pp. 379 -387, 2013). 4. C. Fedon et al. , “GEANT 4 for breast dosimetry: parameters optimization study”, (Phys. Med. Biol. 60, vol. 16, pp. N 311 -N 323 , 2015). 5. G. Mettivier et al. , “Glandular dose in breast computed tomography with synchrotron radiation” (Phys. Med. Biol. 61, pp. 569 -587, 2016). Featured article. 6. A. Sarno et al. , “A Monte Carlo study of monoenergetic and polyenergetic normalized glandular dose (Dg. N) coefficients in mammography", (Phys. Med. Biol. 62, pp. 306 -325, 2017). 7. G. Mettivier et al. , “Evaluation of dose homogeneity in cone-beam breast computed tomography”, (Radiat. Prot. Dosimetry, pp. 1 -7, 2017). XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 77
Elenco pubblicazioni (under review) 1. Sarno A, Dance D R, van Engen R E, Young K C, Russo P, Di Lillo F, Mettivier G, Bliznakova K, Fei B W and Sechopoulos I. “A Monte Carlo model for mean glandular dose evaluation in spot compression mammography“. Med. Phys. (2017) under review. 2. Sarno A, Mettivier G and Russo P. “Air kerma calculation in Monte Carlo simulations for deriving normalized glandular dose coefficients in mammography “. Phys. Med Biol. (2017) under review. 3. Sarno A, Masi M, Antonelli N, Di Lillo F, Mettivier G, Castriconi R and Russo P. “Dose Volume Distribution in Digital Breast Tomosynthesis: a Phantom Study“. Trans. Rad. Pl. Med. Sc. (2017) under review. XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 78
Napoli Medical Physics Laboratory Thank you!!! Prof. Paolo Russo Dr. Giovanni Mettivier, Ph. D Dr. Antonio Sarno Dr. Francesca Di Lillo Dr. Roberta Castriconi (now @HSR Milano) XIV Seminar on Software for Nuclear, Subnuclear and Applied Physics, Alghero – 8 June 2017 79