[Gate-users] Σχετ: Σχετ: Energy spectrum

tony youness tony_youness at live.com
Wed Sep 27 11:16:02 CEST 2017


Hi David,

I am getting these errors only when running the energy spectrum actor. I have tried to use the dose actor in the phantom and the simulation runs with no error.

The simulation is running on a Linux pc and as i mentioned before the Gate version is 7.2 and root version is 5.34/30. What i did today, is that i tried to launch the energy spectrum macro on a Mac with Gate v7.2 and root v 5.34/36 and the simulation runs with no error. The only difference i could see until now is the root v difference.

Tony

On 27/09/17 10:49 am, David Boersma wrote:
Hi Tony,

Unfortunately your macro depends on several items that I do not have. When I run (using the same Gate and ROOT releases) the mac/fluorescenceTest.mac example in {Gate_v7.2_srcdir}/examples/example_fluorescence/ (which has an energy spectrum actor) then I do not see the warnings/errors that you see.

Can you tell us what stdout/stderr you get when you run this example on your system?

Another basic check: could you completely comment out the energy spectrum actor and run your macro one more time?

* If you then still see the same ROOT errors/warnings then they are obviously not caused by the spectrum actor, maybe they are coming from the physics list or the phasespace instead.

* If the errors/warnings do disappear then we need to have another hard look at the spectrum actor. Increasing the verbosity of "Actor" might helpful for the localization the problem.

(I already stared at the GATE & ROOT code quite a bit yesterday and I can see which lines in the TH1 and TH2 code are giving the warnings you quote, but they are in methods that do not appear to be used in the energy spectrum code.)

The warnings might be completely harmless, but they could also be indicative of some subtle bug. That's the very reason for warnings to begin with. So it's good to report them (and even better to really understand them and fix the causes so that the warnings go away).

/DavidB



Den 26/09/2017 kl. 15:15, skrev tony youness:


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                     VERBOSE and VISUALISATION
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/control/execute mac/verbose.mac
#/control/execute mac/visu.mac


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#         A specific material database is created
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/gate/geometry/setMaterialDatabase data/Materials.db

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                     GEOMETRY
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                     WORLD
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/gate/world/setMaterial Air
/gate/world/geometry/setXLength 5.0 m
/gate/world/geometry/setYLength 5.0 m
/gate/world/geometry/setZLength 5.0 m
/gate/world/vis/setVisible 0


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                 PATIENT/PHANTOM
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/control/execute mac/Waterphantom_DSP95.mac

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                 Accelerator GEOMETRY
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/control/execute mac/Linac.mac


#=====================================================
# OUTPUT ACTORS
#=====================================================

/gate/actor/addActor          EnergySpectrumActor    spectrum
/gate/actor/spectrum/attachTo                        layer3
/gate/actor/spectrum/addFilter                       particleFilter
/gate/actor/spectrum/particleFilter/addParticle      e-
/gate/actor/spectrum/save                            output/WaterSpec.root
/gate/actor/spectrum/energySpectrum/setEmin          0 eV
/gate/actor/spectrum/energySpectrum/setEmax          6 MeV
/gate/actor/spectrum/energySpectrum/setNumberOfBins  300



#=====================================================
# PHYSICS
#=====================================================

/gate/physics/addPhysicsList emlivermore
/gate/physics/Gamma/SetCutInRegion      world 1 mm
/gate/physics/Electron/SetCutInRegion   world 1 mm
/gate/physics/Positron/SetCutInRegion   world 1 mm
/gate/physics/Gamma/SetCutInRegion      patient 0.1 mm
/gate/physics/Electron/SetCutInRegion   patient 0.1 mm
/gate/physics/Positron/SetCutInRegion   patient 0.1 mm
/gate/physics/Gamma/SetCutInRegion      mylinac 1 mm
/gate/physics/Electron/SetCutInRegion   mylinac 1 mm
/gate/physics/Positron/SetCutInRegion   mylinac 1 mm
/gate/physics/displayCuts
/gate/physics/print output/physics.txt

#=====================================================
# INITIALISATION
#=====================================================


/gate/run/initialize


#=====================================================
# INPUT BEAM
#=====================================================

/gate/source/addSource MyBeam phaseSpace
/gate/source/MyBeam/addPhaseSpaceFile data/IAEA.IAEAphsp
/gate/source/MyBeam/attachTo outPhSp

#=====================================================
# START BEAMS
#=====================================================

/gate/random/setEngineName MersenneTwister
/gate/random/setEngineSeed auto
/control/execute mac/timeslices.mac
/gate/application/setTotalNumberOfPrimaries 10000000
/gate/application/start


On 26/09/17 3:03 pm, Konstantinos P. Chatzipapas, MSc wrote:
If you can, please attach the mac file that you use.
-----------------------------------------------------
 Konstantinos Chatzipapas
    Medical Physicist, MSc
University of Patras

   web page:Physics Magazine <http://www.physicsmag.com/><http://www.physicsmag.com/>


Στις 3:57 μ.μ. Τρίτη, 26 Σεπτεμβρίου 2017, ο/η tony youness <tony_youness at live.com><mailto:tony_youness at live.com> έγραψε:


Hi,
I just tried to stick with only basic commands and still getting the same error.


On 26/09/17 2:35 pm, Konstantinos P. Chatzipapas, MSc wrote:
Hi,

Have you try to only use the basic commands that are given by the guide?? Do they work??


      Energy spectrum

This actor builds four histograms: the initial kinetic energy of each track (energySpectrum), the energy deposition per event (edepHisto), the energy deposition per track (edepTrackHisto), the energy loss per track (eLossHisto). These histograms are stored in a root file. They takes into account the weight of particles. They are three commands to define the boundaries and the binning of the energy spectrum and three commands to define the boundaries and the binning of the energy loss histograms (edepHisto, edepTrackHisto, eLossHisto).
/gate/actor/addActor  EnergySpectrumActor*MyActor*
/gate/actor/*MyActor*/save  MyOutputFile.root
/gate/actor/*MyActor*/energySpectrum/setEmin 0 eV
/gate/actor/*MyActor*/energySpectrum/setEmax 10 GeV
/gate/actor/*MyActor*/energySpectrum/setNumberOfBins 200
/gate/actor/*MyActor*/energyLossHisto/setEmin 0 eV
/gate/actor/*MyActor*/energyLossHisto/setEmax 15 MeV
/gate/actor/*MyActor*/energyLossHisto/setNumberOfBins 120

If you haven't try them, try. Because I see that you are trying with extra commands, such as AttachTo, Filter etc.
Regards,
-----------------------------------------------------
 Konstantinos Chatzipapas
    Medical Physicist, MSc
University of Patras

   web page:Physics Magazine <http://www.physicsmag.com/><http://www.physicsmag.com/>


Στις 3:23 μ.μ. Τρίτη, 26 Σεπτεμβρίου 2017, ο/η tony youness <tony_youness at live.com><mailto:tony_youness at live.com> <mailto:tony_youness at live.com><mailto:tony_youness at live.com> έγραψε:


Dear David,

-Gate v7.2

-Root v5.34/30

Tony


On 26/09/17 2:17 pm, David Boersma wrote:
> Dear Tony,
>
> For us to reproduce the error:
> - Which version of GATE?
> - Which version of ROOT?
>
> DavidB
>
> Den 26/09/2017 kl. 14:03, skrev tony youness:
>> Dear Maxime,
>>
>> Thank you for your response.
>>
>> I just tried to increase the Emin to 1 MeV and reduced the number of
>> bins to 100 (just for testing), and I still get the same error...
>>
>> Tony
>>
>>
>> On 26/09/17 1:51 pm, Maxime Chauvin wrote:
>>> Dear Tony,
>>>
>>> what I can tell is that the error seems to come from Root (TH1D).
>>> I don’t know what cause the error but maybe the number of bins is
>>> too high or the Emin is too small…
>>>
>>>    Maxime
>>>
>>>> On 26 Sep 2017, at 13:17, tony youness <tony_youness at live.com<mailto:tony_youness at live.com> <mailto:tony_youness at live.com><mailto:tony_youness at live.com>> wrote:
>>>>
>>>> Dear fellow Gate users,
>>>>
>>>> I am trying to generate the electrons energy spectrum at 10 cm in
>>>> water
>>>> phantom. I used the Energy spectrum actor as follow:
>>>>
>>>> /gate/actor/addActor          EnergySpectrumActor spectrum
>>>> /gate/actor/spectrum/attachTo                        layer3
>>>> /gate/actor/spectrum/addFilter particleFilter
>>>> /gate/actor/spectrum/particleFilter/addParticle      e-
>>>> /gate/actor/spectrum/save output/WaterSpec.root
>>>> /gate/actor/spectrum/energySpectrum/setEmin          0 eV
>>>> /gate/actor/spectrum/energySpectrum/setEmax          6 MeV
>>>> /gate/actor/spectrum/energySpectrum/setNumberOfBins  300
>>>>
>>>> layer3 is a small water volume created in the water phantom at 10 cm.
>>>> When i launch the simulation i get the following error:
>>>>
>>>> Error in <TH1D::Rebin>: Illegal value of ngroup=10815379
>>>> Error in <TH1D::Rebin>: Illegal value of ngroup=10815379
>>>> Error in <TH2D::Rebin>: Illegal value of nxgroup=10815379
>>>> Error in <TH1D::Rebin>: Illegal value of ngroup=10815379
>>>> Error in <TH1D::Rebin>: Illegal value of ngroup=10815379
>>>> WARNING: Scene "none" not found.
>>>>    /vis/scene/list to see scenes.
>>>>
>>>>
>>>>
>>>> ### === G4UAtomicDeexcitation::InitialiseForNewRun()
>>>> ### ===  PIXE model for hadrons: Empirical
>>>> ### ===  PIXE model for e+-:    Livermore
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> Error in <TH2D::Fill>: Invalid signature - do nothing
>>>> ...
>>>>
>>>> Any ideas where this problem could come from?
>>>>
>>>> Regards,
>>>>
>>>> Tony Younes
>>>>
>>>> _______________________________________________
>>>> Gate-users mailing list
>>>> Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org> <mailto:Gate-users at lists.opengatecollaboration.org><mailto:Gate-users at lists.opengatecollaboration.org>
>>>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

>>
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org> <mailto:Gate-users at lists.opengatecollaboration.org><mailto:Gate-users at lists.opengatecollaboration.org>
>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org> <mailto:Gate-users at lists.opengatecollaboration.org><mailto:Gate-users at lists.opengatecollaboration.org>
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org> <mailto:Gate-users at lists.opengatecollaboration.org><mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users








_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

_______________________________________________
Gate-users mailing list
Gate-users at lists.opengatecollaboration.org<mailto:Gate-users at lists.opengatecollaboration.org>
http://lists.opengatecollaboration.org/mailman/listinfo/gate-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/pipermail/gate-users/attachments/20170927/8576585e/attachment-0001.html>


More information about the Gate-users mailing list