Message: Re: Instructions for using physics lists Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Instructions for using physics lists 

Forum: Physics List
Re: Question Instructions for using physics lists (Bethany)
Date: 16 Mar, 2012
From: Andrea Dotti <Andrea Dotti>

  the easiest thing is to look under:
Physics Lists have usually all capital letters, except Shielding.

To use it you can do two things in tour main: #include "Shieling.hh" [...] runManager->SetUserInitialization( new Shielding );

I think this other solution is better: #include "G4PhysListFactory.hh" [...] G4PhysListFactory factory; physList = factory.ReferencePhysList(); runManager->SetUserInitialization( physList );

You can define at run-time the physics list to use setting the environment variable PHYSLIST before running.
E.g. (for bash):
   export PHYSLIST=Shielding

You can also (if you do not want/like env variables): #include "G4PhysListFactory.hh" [...] G4String plname = "Shielding"; G4PhysListFactory factory; physList = factory.GetReferencePhysList( plname ); runManager->SetUserInitialization( physList );


 Add Message Add Message
to: "Re: Instructions for using physics lists"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]