<div dir="ltr"><div>Thank you very much. <br></div><div>my source is placed at 0 0 100 cm</div><div>the waterbox is placed at 0 0 -20 cm</div><div>and   i want to calculate the profil to 1.5 cm depth in water <br></div><div>the code become:</div><div> 
<span class="gmail-im">/gate/actor/addActor                          DoseActor  doseprofile<br>
> /gate/actor/doseprofile/save                  output/electron-profile.txt<br>
> /gate/actor/doseprofile/attachTo                waterbox<br>
> /gate/actor/doseprofile/stepHitType           random</span></div><div><span class="gmail-im">
/gate/actor/doseprofile/setPosition           0 0 -18.5 cm <br></span></div><div><span class="gmail-im">
/gate/actor/doseprofile/setSize               40 1 1 cm <br></span></div><div><span class="gmail-im">
/gate/actor/doseprofile/setVoxelSize           0.4 1 1 cm <br></span></div><div><span class="gmail-im">--</span></div><div><span class="gmail-im">Am I right?</span>

</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 10 févr. 2020 à 13:56, Dimitrios Thanasas <<a href="mailto:dthanas@uoa.gr">dthanas@uoa.gr</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Mohamed,<br>
<br>
One way to calculate profile using dose actor is the following:<br>
<br>
> /gate/actor/addActor                          DoseActor  doseprofile<br>
> /gate/actor/doseprofile/save                  output/electron-profile.txt<br>
> /gate/actor/doseprofile/attachTo                waterbox<br>
> /gate/actor/doseprofile/stepHitType           random<br>
> /gate/actor/doseprofile/setPosition           0 0 18.5 cm (be sure that<br>
+18.5 is on the side of the source. You may need to put -18.5 cm)<br>
> #/gate/actor/doseprofile/setResolution         100 1 1 (do not use<br>
setResolution. I put this command in comment.)<br>
> /gate/actor/doseprofile/setSize               40 1 1 cm (this is a line<br>
along x axis)<br>
> /gate/actor/doseprofile/setVoxelSize           0.4 1 1 cm (0.4x1x1 cm<br>
each voxel, along the line in order to have 100 voxels)<br>
> /gate/actor/doseprofile/saveEveryNSeconds     60<br>
> /gate/actor/doseprofile/enableEdep            true<br>
> /gate/actor/doseprofile/enableUncertaintyEdep true<br>
> /gate/actor/doseprofile/enableDose            false<br>
> /gate/actor/doseprofile/enableUncertaintyDose false<br>
> /gate/actor/doseprofile/enableNumberOfHits    false<br>
<br>
I think this will help you.<br>
<br>
Dimitris Thanasas<br>
<br>
> Hi Mohammed,<br>
><br>
><br>
> Please keep the conversation on the mailing list.<br>
><br>
> The next few days I'll be very busy and won't have time to answer myself.<br>
> Maybe someone else can have a look at your macro and tell if it's fine for<br>
> your purpose.<br>
><br>
><br>
> Good luck!<br>
><br>
> /David<br>
><br>
><br>
> ________________________________<br>
> Von: Mohammed REZZOUG <<a href="mailto:nmedrezz@gmail.com" target="_blank">nmedrezz@gmail.com</a>><br>
> Gesendet: Montag, 10. Februar 2020 10:39:25<br>
> An: David Boersma<br>
> Betreff: Re: [Gate-users] Dose actor<br>
><br>
> Hi david<br>
> thank you for your reply<br>
> i want to validate a phase space source ( condition DSP= 100 cm waterbox<br>
> 40*40*40 cm)<br>
> in this order, I use this cod macro.<br>
> --------------------------------------------------------------------------<br>
><br>
> # WORLD<br>
> /gate/world/setMaterial            Air<br>
> /gate/world/geometry/setXLength    3.0 m<br>
> /gate/world/geometry/setYLength    3.0 m<br>
> /gate/world/geometry/setZLength    3.0 m<br>
> /gate/world/vis/setVisible 1<br>
><br>
> # WATER BOX<br>
><br>
> /gate/world/daughters/name              waterbox<br>
> /gate/world/daughters/insert            box<br>
> /gate/waterbox/setMaterial              Water<br>
> /gate/waterbox/placement/setTranslation 0 0 -200 mm<br>
> /gate/waterbox/geometry/setXLength      400 mm<br>
> /gate/waterbox/geometry/setYLength      400 mm<br>
> /gate/waterbox/geometry/setZLength      400 mm<br>
> /gate/waterbox/vis/setColor             blue<br>
><br>
><br>
><br>
><br>
><br>
><br>
> # VIRTUAL PLANE FOR PHASE SPACE<br>
> # It should be the same geometry than PhS generation Here we add a<br>
> # "gantry" rotation. To do that easily, we define two box, on for the<br>
> # rotation (according to the isocenter=world origin), then one another<br>
> # to translation the phase-space plane to the right distance<br>
><br>
> /gate/world/daughters/name                     linacGantry<br>
> /gate/world/daughters/insert                   box<br>
> /gate/linacGantry/setMaterial                  Air<br>
> /gate/linacGantry/geometry/setXLength          1.0 mm<br>
> /gate/linacGantry/geometry/setYLength          1.0 mm<br>
> /gate/linacGantry/geometry/setZLength          1.0 mm<br>
> /gate/linacGantry/placement/setRotationAxis    0 1 0<br>
> /gate/linacGantry/placement/setRotationAngle   0 deg<br>
> /gate/linacGantry/vis/setVisible               1<br>
><br>
> /gate/linacGantry/daughters/name         linac<br>
> /gate/linacGantry/daughters/insert       box<br>
> /gate/linac/setMaterial                  Air<br>
> /gate/linac/geometry/setXLength          1.0 mm<br>
> /gate/linac/geometry/setYLength          1.0 mm<br>
> /gate/linac/geometry/setZLength          1.0 mm<br>
> /gate/linac/placement/setTranslation     0 0 1000 mm<br>
> /gate/linac/vis/setVisible               1<br>
><br>
> # /gate/geometry/setMaterialDatabase data/PreciseMaterials.db<br>
> # /control/execute mac/linac_head.mac<br>
> /gate/linac/placement/setTranslation 0 0 1000 mm<br>
><br>
> /gate/linac/daughters/name               PhS_Plane<br>
> /gate/linac/daughters/insert             cylinder<br>
> /gate/PhS_Plane/setMaterial              Vacuum<br>
> /gate/PhS_Plane/geometry/setRmin         0 mm<br>
> /gate/PhS_Plane/geometry/setRmax         70 mm<br>
> /gate/PhS_Plane/geometry/setHeight       1 nm<br>
> /gate/PhS_Plane/placement/setTranslation 0.0 0.0 -297 mm<br>
> /gate/PhS_Plane/vis/setColor             white<br>
> /gate/PhS_Plane/vis/setVisible           1<br>
><br>
> # =====================================================<br>
> # PHYSICS<br>
> # =====================================================<br>
><br>
> /gate/physics/addPhysicsList emstandard_opt1<br>
><br>
> /gate/physics/Gamma/SetCutInRegion      world 1 mm<br>
> /gate/physics/Electron/SetCutInRegion   world 1 mm<br>
> /gate/physics/Positron/SetCutInRegion   world 1 mm<br>
><br>
> /gate/physics/Gamma/SetCutInRegion      waterbox 0.5 mm<br>
> /gate/physics/Electron/SetCutInRegion   waterbox 0.5 mm<br>
> /gate/physics/Positron/SetCutInRegion   waterbox 0.5 mm<br>
> ------------------------------------------------------------------------<br>
><br>
><br>
><br>
><br>
> I have to calculate the profile dose at equal depth 1.5 cm<br>
><br>
> /gate/actor/addActor                          DoseActor  doseprofile<br>
> /gate/actor/doseprofile/save                  output/electron-profile.txt<br>
> /gate/actor/doseprofile/attachTo                waterbox<br>
> /gate/actor/doseprofile/stepHitType           random<br>
> /gate/actor/doseprofile/setPosition           0 0 18.5 cm<br>
> /gate/actor/doseprofile/setResolution         100 1 1<br>
> /gate/actor/doseprofile/setSize               40 40 40 cm<br>
> /gate/actor/doseprofile/saveEveryNSeconds     60<br>
> /gate/actor/doseprofile/enableEdep            true<br>
> /gate/actor/doseprofile/enableUncertaintyEdep true<br>
> /gate/actor/doseprofile/enableDose            false<br>
> /gate/actor/doseprofile/enableUncertaintyDose false<br>
> /gate/actor/doseprofile/enableNumberOfHits    false<br>
><br>
><br>
> --<br>
><br>
> This method is valid or not?(I have to calculate the profile dose at equal<br>
> depth 1.5 cm)<br>
><br>
> --<br>
><br>
><br>
><br>
><br>
> #=====================================================<br>
> # INITIALISATION<br>
> #=====================================================<br>
><br>
> /gate/run/initialize<br>
><br>
> #=====================================================<br>
> # BEAMS<br>
> #=====================================================<br>
><br>
> # Read from Phase Space files. Here we indicate the type of particle<br>
> # (e-) because this information is not stored in the PhS to gain<br>
> # space. Moreover, we set 'useRandomSymmetry' to generate more<br>
> # particle than the number of particle in the PhS, using a Z axis<br>
> # symmetry.<br>
><br>
> /gate/source/addSource                         beam_g phaseSpace<br>
> /gate/source/beam_g/addPhaseSpaceFile          output/output-PhS-g.root<br>
> /gate/source/beam_g/setParticleType            e-<br>
> /gate/source/beam_g/attachTo                   PhS_Plane<br>
> /gate/source/beam_g/useRandomSymmetry          true<br>
><br>
><br>
> #=====================================================<br>
> # START BEAMS<br>
> #=====================================================<br>
><br>
> /gate/random/setEngineName MersenneTwister<br>
> /gate/random/setEngineSeed auto<br>
> /gate/application/noGlobalOutput<br>
><br>
> #/tracking/verbose 2<br>
><br>
> /gate/application/setTotalNumberOfPrimaries 5000<br>
> /gate/application/start<br>
><br>
><br>
> Thank  you for any help<br>
><br>
> Mohammed.<br>
><br>
><br>
> Le lun. 10 févr. 2020 à 03:30, David Boersma<br>
> <<a href="mailto:david.boersma@acmit.at" target="_blank">david.boersma@acmit.at</a><mailto:<a href="mailto:david.boersma@acmit.at" target="_blank">david.boersma@acmit.at</a>>> a écrit :<br>
><br>
> Hi Mohammed,<br>
><br>
><br>
> Your question is a bit short and unspecific, we need more information in<br>
> order to have a chance to give you a useful answer. Can you describe what<br>
> you have tried so far to configure the dose actor in your simulation, and<br>
> what are the problems you encountered? Which Gate release are you using?<br>
><br>
><br>
> The documentation of the dose actor is here:<br>
><br>
> <a href="https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#dose-measurement-doseactor" rel="noreferrer" target="_blank">https://opengate.readthedocs.io/en/latest/tools_to_interact_with_the_simulation_actors.html#dose-measurement-doseactor</a><br>
><br>
><br>
> Examples for how to use the dose actor can be found in the GateContrib<br>
> project, for instance here:<br>
><br>
> <a href="https://github.com/OpenGATE/GateContrib/tree/master/dosimetry/dosimetry/electron_radiotherapy" rel="noreferrer" target="_blank">https://github.com/OpenGATE/GateContrib/tree/master/dosimetry/dosimetry/electron_radiotherapy</a><br>
><br>
><br>
> Hope that helps,<br>
><br>
> David<br>
><br>
> ________________________________<br>
> Von: Gate-users<br>
> <<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a><mailto:<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>><br>
> im Auftrag von Mohammed REZZOUG<br>
> <<a href="mailto:nmedrezz@gmail.com" target="_blank">nmedrezz@gmail.com</a><mailto:<a href="mailto:nmedrezz@gmail.com" target="_blank">nmedrezz@gmail.com</a>>><br>
> Gesendet: Sonntag, 9. Februar 2020 19:53:53<br>
> An:<br>
> <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><mailto:<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a>><br>
> Betreff: [Gate-users] Dose actor<br>
><br>
> I want to simulate the electron accelerator on Gate in order to calculate<br>
> the pdd and the dose profile in a water tank, I want to know how to use<br>
> the "Dose actor"<br>
> Thanks for any help<br>
> Cordially.<br>
> Mohammed<br>
><br>
> _______________________________________________<br>
> Gate-users mailing list<br>
> <a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
> <a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
<br>
</blockquote></div>