71 #ifdef G4ANALYSIS_USE_ROOT
97 if ( !
ParseArg(vararg))
return false;
110 en = std::pow(10., logmin + ( c*(logmax-logmin) / (npoints - 1.)) );
124 data <<
"MeV " <<
"MeV*cm2/g " <<
particle <<
" (into " <<
128 for (
size_t i=0; i<
energy.size(); i++){
133 #ifdef G4ANALYSIS_USE_ROOT
139 G4cout <<
"User choice:\n";
143 "\", material= \"" <<
material <<
"\", filename= \""<<
149 #ifdef G4ANALYSIS_USE_ROOT
150 void IORTInteractionParameters::PlotStopping(
const G4String& filetype)
155 gROOT->SetStyle(
"Plain");
156 theRootCanvas =
new TCanvas(
"theRootCanvas",
"Interaction Parameters",200, 10, 600,400);
158 theRootCanvas -> SetBorderMode(1);
159 theRootCanvas -> SetBorderSize(1);
160 theRootCanvas -> SetFrameBorderMode(0);
161 theRootCanvas -> SetGrid();
165 if (theRootGraph)
delete theRootGraph;
171 axisY ->
SetTitle(
"Stopping Power (MeV cm2/g)");
175 axisX -> SetAxisColor(2);
176 axisY -> SetAxisColor(2);
185 G4String fName =
"./referenceData/interaction/" + gName +
"." + filetype;
187 theRootGraph ->
Draw(
"AP");
190 theRootCanvas ->
SaveAs(fName);
207 std::istringstream strParam(vararg);
219 G4cout <<
"WARNING: kinEmin must not exceed kinEmax!" <<
G4endl;
220 G4cout <<
"Usage: /parameter/command material kinetic Emin kinetic Emax nPoints [particle] [output filename]" <<
G4endl;
228 G4cout <<
"WARNING: material \"" <<
material <<
"\" doesn't exist in NIST elements/materials"
229 " table [$G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" <<
G4endl;
230 G4cout <<
"Use command \"/parameter/nist\" to see full materials list" <<
G4endl;
238 G4cout <<
"Try the command \"/particle/list\" to get full supported particles list." <<
G4endl;
239 G4cout <<
"If you are interested in an ion that isn't in this list you must give it to the particle gun."
240 "\nTry the commands:\n/gun/particle ion"
241 "\n/gun/ion <atomic number> <mass number> <[charge]>" << G4endl <<
G4endl;
249 outfile.open(filename,std::ios_base::trunc);
263 G4cout <<
"Issuing a G4RunManager::beamOn()... ";
264 G4cout <<
"Current Run State is " << mState -> GetStateString( aState ) <<
G4endl;
281 const std::vector<G4String>& vec =
nistMat -> GetMaterialNames();
282 for (
size_t i=0; i<vec.size(); i++)
288 else if (vararg ==
"all" || vararg ==
"simple" ||
289 vararg ==
"compound" || vararg ==
"hep" )
291 nistMat -> ListMaterials(vararg);
static G4RunManager * GetRunManager()
static constexpr double MeV
G4NistElementBuilder * nistEle
std::vector< G4double > energy
G4Material * GetNistMaterial(G4String material)
gr1 GetXaxis() -> SetTitle("Distance from the centre (cm)")
IORTInteractionParameters(G4bool)
~IORTInteractionParameters()
gr1 SetTitle("Dose rate distribution")
G4NistMaterialBuilder * nistMat
const XML_Char const XML_Char * data
static constexpr double g
G4bool GetStoppingTable(const G4String &vararg)
static constexpr double cm2
IORTParameterMessenger * pMessenger
const G4ParticleDefinition * FindParticle(const G4String &)
G4double GetStopping(G4double energy, const G4ParticleDefinition *, const G4Material *, G4double density=0.)
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4double ComputeTotalDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, G4double cut=DBL_MAX)
gr1 GetYaxis() -> SetTitle("Normalised dose rate distribution")
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::vector< G4double > massDedx
G4GLOB_DLL std::ostream G4cout
void ListOfNistMaterials(const G4String &vararg)
bool ParseArg(const G4String &vararg)
static G4StateManager * GetStateManager()
static G4NistManager * Instance()