Scoring mesh results

Hello this is my G4 application about a 45GeV positron beam hitting two circular targets
https://we.tl/t-JFgCYJ2LwB. My targets have diameter d=1.5 cm and thickness 3.00 mm. The first one is centered in (0,0,0) the second one in (0,0,2.3).

In the application there is the Scoring mesh function defined in run1.mac to save data about released energy in the two targets in two dump file.

This is the code for the target 1

/score/create/cylinderMesh boxMesh_1
/score/mesh/cylinderSize 0.75 0.15 cm
/score/mesh/translate/xyz 0.0 0.0 0.0 cm
/score/mesh/nBin 30 30 30
/score/quantity/energyDeposit eDep
/score/quantity/nOfStep nOfStepGamma
/score/filter/particle gammaFilter gamma
/score/quantity/nOfStep nOfStepEMinus
/score/filter/particle eMinusFilter e-
/score/filter/particle muMinusFilter mu-
/score/quantity/nOfStep nOfStepEPlus
/score/filter/particle ePlusFilter e+
/score/filter/particle muPlusFilter mu+
/score/close
/score/list

and this is fo the target 2

/score/create/cylinderMesh boxMesh_2
/score/mesh/cylinderSize 0.75 0.15 cm
/score/mesh/translate/xyz 0. 0. 2.3 cm
/score/mesh/nBin 30 30 30
/score/quantity/energyDeposit eDep
/score/quantity/nOfStep nOfStepGamma
/score/filter/particle gammaFilter gamma
/score/quantity/nOfStep nOfStepEMinus
/score/filter/particle eMinusFilter e-
/score/filter/particle muMinusFilter mu-
/score/quantity/nOfStep nOfStepEPlus
/score/filter/particle ePlusFilter e+
/score/filter/particle muPlusFilter mu+
/score/close
/score/list

You see, I setted

/score/mesh/cylinderSize 0.75 0.15 cm
/score/mesh/translate/xyz 0.0 0.0 0.0 cm

and

/score/mesh/cylinderSize 0.75 0.15 cm
/score/mesh/translate/xyz 0. 0. 2.3 cm

because I want the scoring mesh in my two targets

Here the dump file of the two targets

boxMesh_1.txt (1.8 MB)

boxMesh_2.txt (2.2 MB)

but it looks like that results are wrong.
Because

  1. the z axis should be in the range [-1.5mm;1.5mm] for the first target and [21.5mm;24.5mm] for the second target, instead in the dump files iZ values are in the range [0mm;30mm]

  2. The phi axis should be in the range [0;2pi] (i.e. the angle of a full circle) instead it is in the range [0;30]

  3. The R axis should be in the range [-0.75cm;0.75cm] (because the diameter is 1.5 cm instead it is in the range [0;30]

  4. Mostly of realeased energy should be at center of the two targets, instead this is for example the plot of
    # iZ, iPHI, iR, total(value) [MeV],
    for the first target


I got it by using this root macro

So, I can’t understand the results…they don’t look like right…

Please, can someone check how to fix the results?
Thank you

Hi dear
you divided x,y and z axis into 30 parts.every voxels have a id (ix ,iy,iz).for examples id= 0 0 0 related to the voxel tha there is in center and show the deposit energy in 0 0 0 cm.
and id= 0 0 1 for the first voxel after central voxel in z axis and show the deposit energy in 0.75/30 cm, id= 0 0 3 show the deposit energy in(0.75/30*3)cm

Hi @asra_talebi and thanks for you reply! So the results are related to the voxels and not to the cilindrical coorindates!

I’ve some questions, please:

  1. The results have to be read:
    a) R coordinate (0.75/30 * id)cm
    b) phi coordinate (2pi/30 * id) rad
    c) z coordinate (0.3/30 * id)cm
    Right?

  2. isnt’t there a way to print values in the cilindrical coordinates instead of in voxels?

  3. How to read the “entry”? I mean if I read entry=3, does it means that there are 3 events releasing the energy in a voxel (z,phi,R) or doeas it means that the entry number 3 released that energy (but the entry number 3 is just a single event)?

Thank you

1 Like