36 #include "ScoreSpecies.hh"
70 for (
int i = 0; i <= tBins; i++ )
87 if ( edep == 0. )
return FALSE;
125 if(species.get() == 0 || species->size() == 0)
127 G4cout <<
"No molecule recorded, energy deposited= "
150 molInfo.fNumber += n_mol;
151 double gValue = (n_mol/(
fEdep/
eV)) * 100.;
152 molInfo.fG += gValue;
153 molInfo.fG2 += gValue*gValue;
182 for(; it_map1 != end_map1; ++it_map1)
185 InnerSpeciesMap::iterator it_map2 = map2.begin();
186 InnerSpeciesMap::iterator end_map2 = map2.end();
188 for(; it_map2 != end_map2; ++it_map2)
190 SpeciesInfo& molInfo =
192 molInfo.fNumber += it_map2->second.fNumber;
193 molInfo.fG += it_map2->second.fG;
194 molInfo.fG2 += it_map2->second.fG2;
225 G4cout <<
" Number of energy deposition recorded "
229 G4cout <<
" copy no.: " << itr.first
230 <<
" energy deposit: "
241 std::ofstream out(
"Species.txt");
244 out <<
"# Time [ps] G-value (/100 eV) RMS Molecule" <<
G4endl;
246 std::map<G4String, std::map<G4double, std::pair<G4double,G4double>>> mol;
252 for(
auto it_map2: map2)
258 G2 = std::sqrt( N/(N-1) * ( G2/N - G*G) );
259 mol[it_map2.first->GetName()][
time]=std::make_pair(G,G2);
263 for (
auto it1 : mol )
264 for (
auto it2 : it1.second )
265 out << std::setw(12) << it2.first << std::setw(12) << it2.second.first
266 << std::setw(12) << it2.second.second << std::setw(12)
267 << std::setw(12) << it1.first <<
G4endl;
283 fSpeciesInfoPerTime.clear();