Quick investigation of Dose deposition

267 views
Skip to first unread message

Volodymyr Rodin

unread,
Feb 26, 2019, 2:48:31 PM2/26/19
to G4Beamline
Hi everyone,

Quite a few people had already asked me about more simple obtaining of energy deposition dependence from detector depth (similar to a Bragg peak).
As far as I know, the easiest way in Geant4 is a Scoring Mesh. Keep in mind that the translation of the mesh is in Global coordinates

It also perfectly works in g4beamline after adding 2 lines in g4bl.cc:

#include "G4ScoringManager.hh"

 main section
{
     G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
}

Some demonstration for target example

Annotation 2019-02-26 194352.pngBest regards, Volodymyr Rodin




tim fulcher

unread,
Feb 26, 2019, 3:12:44 PM2/26/19
to G4Beamline
Hey thanks Volodymyr. I'll give that a try when I'm done with my admin for uni. Might be a few weeks though.

Good meeting you today. See you at lunch tomorrow.

Tim

Stefan E. Mueller

unread,
Mar 14, 2019, 8:45:35 AM3/14/19
to Volodymyr Rodin, G4Beamline
Hi,

I would appreciate to have scoring active in G4beamline. I have used
Geant4 scoring with macro commands in Geant4 already.

I tried to build G4beamline 3.06 with the modifications you gave, but
I'd expect the scoring commands appear in the "Scene tree, Help, History"
menu, but nothing is there. Is that expected?

Maybe I put the extra lines in the wrong places? Where exactly should I
put the line in the main {} section? I put it right before the

delete mgr;

line.

Having a geant4.10.5-version with GDML support, I also tried to include
the line

G4GDMLParser parser;

together with the corresponding header file
#include "G4GDMLParser.hh"

I thought that would allow me to access the "persistency" commands menu
for gdml im- and export. But also this does not show up.

Any help would be appreciated -

Stefan

--
Stefan E. Mueller
Department of Information Services and Computing - Computational Science
and Institute of Radiation Physics
Helmholtz-Zentrum Dresden-Rossendorf
Tel: +49 (0351) 260 3847
Stefan....@hzdr.de
http://www.hzdr.de

Vorstand: Prof. Dr. Dr. h. c. Roland Sauerbrey, Dr. Ulrich Breuer
Vereinsregister: VR 1693 beim Amtsgericht Dresden

On Tue, 26 Feb 2019, Volodymyr Rodin wrote:

> Hi everyone,
> Quite a few people had already asked me about more simple obtaining of
> energy deposition dependence from detector depth (similar to a Bragg peak).
> As far as I know, the easiest way in Geant4 is a Scoring Mesh. Keep in mind
> that the translation of the mesh is in Global coordinates
>
> It also perfectly works in g4beamline after adding 2 lines in g4bl.cc:
>
> #include "G4ScoringManager.hh"
>
>  main section
> {
>      G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
> }
>
> Some demonstration for target example
>
> Annotation 2019-02-26 194352.png Best regards, Volodymyr Rodin
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "G4Beamline" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to g4beamline+...@muonsinc.com.
> To post to this group, send email to g4bea...@muonsinc.com.
> Visit this group at
> https://groups.google.com/a/muonsinc.com/group/g4beamline/.
>
>

Volodymyr Rodin

unread,
Mar 14, 2019, 9:45:28 AM3/14/19
to G4Beamline
Hi Stefan,

Firstly place this in include section:
#include "G4ScoringManager.hh"

Then add the new line here

line ~260
   BLGroup::getWorld()->end();
    
    //New #include "G4ScoringManager.hh"
     G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
 scManager->SetVerboseLevel(1);
 
//quit if the world is empty


Also, place your parser here

CLHEP::HepRandom::setTheSeed(0x7FFFFFFEL);

G4GDMLParser parser;

// Ensure the BLManager has been created, and do its delayed constuction

And it should work after recompiling. But parser will overwrite your default World.
Let me know if you find out how safety to add the new CAD solid to existing geometry. 
I assume it requires some temporary volume where you can replace the usual solid shape with gdml.

      fParser.Read(fReadFile);
Temp_volume=fParser.GetWorldVolume()->GetLogicalVolume()->GetSolid();
//Play with Temp_volume position and other properties

Best regards,

Volodymyr

On Tuesday, 26 February 2019 19:48:31 UTC, Volodymyr Rodin wrote:
Message has been deleted

Volodymyr Rodin

unread,
Mar 14, 2019, 10:05:27 AM3/14/19
to G4Beamline
Annotation 2019-03-14 140122.png





Stefan E. Mueller

unread,
Mar 14, 2019, 11:09:59 AM3/14/19
to Volodymyr Rodin, G4Beamline
OK,

thanks - now it works, I see both the "score" and the "persistency"
menus.

Actually I never tried to read in gdml geometry with Geant4, I was only
exporting Geant4 geometry to gdml. And I checked that this works now alos
with G4beamline.

Great!

Stefan

--
Stefan E. Mueller
Department of Information Services and Computing - Computational Science
and Institute of Radiation Physics
Helmholtz-Zentrum Dresden-Rossendorf
Tel: +49 (0351) 260 3847
Stefan....@hzdr.de
http://www.hzdr.de

Vorstand: Prof. Dr. Dr. h. c. Roland Sauerbrey, Dr. Ulrich Breuer
Vereinsregister: VR 1693 beim Amtsgericht Dresden

> Annotation 2019-02-26 194352.png Best regards, Volodymyr Rodin
>
>
>
>

Volodymyr Rodin

unread,
Mar 14, 2019, 5:50:17 PM3/14/19
to G4Beamline
By the way, it works)
Gdml_read_into_G4BL.png






































The second example. Energy is still too high:

Gdml_read_into_G4BL_4GeV.pngInfo_tess.png















For much lower energy:
Gdml_read_into_G4BL_38MeV.png












Basically, it's doing the same job as tessellatedsolid command.

Best regards,

Volodymyr Rodin

On Tuesday, 26 February 2019 19:48:31 UTC, Volodymyr Rodin wrote:

Felix Berg

unread,
Apr 23, 2024, 1:50:54 AM4/23/24
to G4Beamline, Volodymyr Rodin
Is there a built version planned, that includes scoring mesh?
Kind Regards
Felix

Volodymyr Rodin

unread,
Apr 23, 2024, 2:45:14 PM4/23/24
to G4Beamline, Felix Berg, Volodymyr Rodin
In principle it can be implemented. I will be attending IPAC24 this year and I hope to meet there 
someone from Muons, to discuss possible implementation of some features.

Some interesting are:
 - electrostatic optics
 - flexible choice of field integrators
 - scoring mesh and gdml import

Best regards,
Volodymyr 

Tom Roberts

unread,
Apr 25, 2024, 11:56:49 PM4/25/24
to Volodymyr Rodin, G4Beamline, Felix Berg

I am unable to attend IPAC24, but Muons, Inc. will have a booth in the industrial exhibit, and several employees will attend.

Tom Roberts

--
You received this message because you are subscribed to the Google Groups "G4Beamline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g4beamline+...@muonsinc.com.
Reply all
Reply to author
Forward
0 new messages