82 if ( !
ParseArg(vararg))
return false;
95 en = std::pow(10., logmin + ( c*(logmax-logmin) / (npoints - 1.)) );
109 data <<
"MeV " <<
"MeV*cm2/g " <<
particle <<
" (into " <<
113 for (
size_t i=0; i<
energy.size(); i++){
121 G4cout <<
"User choice:\n";
125 "\", material= \"" <<
material <<
"\", filename= \""<<
142 std::istringstream strParam(vararg);
154 G4cout <<
"WARNING: kinEmin must not exceed kinEmax!" <<
G4endl;
155 G4cout <<
"Usage: /parameter/command material EkinMin EKinMax nPoints [particle] [output filename]" <<
G4endl;
163 G4cout <<
"WARNING: material \"" <<
material <<
"\" doesn't exist in NIST elements/materials"
164 " table [$G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
165 G4cout <<
"Use command \"/parameter/nist\" to see full materials list" <<
G4endl;
173 G4cout <<
"Try the command \"/particle/list\" to get full supported particles list." <<
G4endl;
174 G4cout <<
"If you are interested in an ion that isn't in this list you must give it to the particle gun."
175 "\nTry the commands:\n/gun/particle ion"
176 "\n/gun/ion <atomic number> <mass number> <[charge]>" << G4endl <<
G4endl;
184 outfile.open(filename,std::ios_base::trunc);
198 G4cout <<
"Issuing a G4RunManager::beamOn()... ";
199 G4cout <<
"Current Run State is " << mState -> GetStateString( aState ) <<
G4endl;
216 const std::vector<G4String>& vec =
nistMat -> GetMaterialNames();
217 for (
size_t i=0; i<vec.size(); i++)
223 else if (vararg ==
"all" || vararg ==
"simple" || vararg ==
"compound" || vararg ==
"hep" )
225 nistMat -> ListMaterials(vararg);
static G4RunManager * GetRunManager()
G4NistMaterialBuilder * nistMat
static constexpr double MeV
void ListOfNistMaterials(const G4String &vararg)
std::vector< G4double > energy
bool ParseArg(const G4String &vararg)
G4bool GetStoppingTable(const G4String &vararg)
const XML_Char const XML_Char * data
static constexpr double g
static constexpr double cm2
const G4ParticleDefinition * FindParticle(const G4String &)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4double ComputeTotalDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, G4double cut=DBL_MAX)
G4NistElementBuilder * nistEle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4double GetStopping(G4double energy, const G4ParticleDefinition *, const G4Material *, G4double density=0.)
G4GLOB_DLL std::ostream G4cout
~HadrontherapyInteractionParameters()
G4Material * GetNistMaterial(G4String material)
std::vector< G4double > massDedx
HadrontherapyParameterMessenger * pMessenger
HadrontherapyInteractionParameters(G4bool)
static G4StateManager * GetStateManager()
static G4NistManager * Instance()