6 #include "CLHEP/Units/PhysicalConstants.h"
15 G4cout <<
"PhysicsConfigurationHelper constructor: start" << G4endl;
30 G4cout<<
"Read in physics parameters:"<<G4endl;
39 else G4cout<<
" s"<<G4endl;
41 G4cout<<
"Mixing = "<<
m_mixing*100 <<
" %"<<G4endl;
46 G4cout <<
"WARNING: Inconsistent treatment of R-Hadron properties! Lifetime of " <<
m_hadronlifetime
74 std::ifstream physics_stream (
"PhysicsConfiguration.txt");
77 while (getline(physics_stream,
line)) {
78 std::vector<G4String>
tokens;
85 physics_stream.close();
90 std::vector<G4String>&
tokens,
91 const G4String& delimiters)
const
94 G4String::size_type lastPos =
str.find_first_not_of(delimiters, 0);
95 if (lastPos==G4String::npos)
return;
98 G4String::size_type
pos =
str.find_first_of(delimiters, lastPos);
100 while (G4String::npos !=
pos || G4String::npos != lastPos)
103 G4String temp =
str.substr(lastPos,
pos - lastPos);
104 while(temp.c_str()[0] ==
' ') temp.erase(0,1);
105 while(temp[temp.size()-1] ==
' ') temp.erase(temp.size()-1,1);
111 lastPos =
str.find_first_not_of(delimiters,
pos);
112 if (lastPos==G4String::npos)
continue;
115 pos =
str.find_first_of(delimiters, lastPos);