43 const std::map<std::string, std::string> replacements = {
44 {
"cellcharge",
"cellcharge3d"},
45 {
"depositeddose",
"depositeddose3d"},
46 {
"depositedenergy",
"depositedenergy3d"},
47 {
"population",
"population3d"},
48 {
"cellflux",
"cellflux3d"},
49 {
"cellfluxscaled",
"cellfluxscaled3d"},
50 {
"cellfluxscaledperparticle",
"cellfluxscaledperparticle3d"}
53 std::string scorerTypeNameOriginal = scorer.
type;
54 std::string scorerTypeName = scorerTypeNameOriginal;
57 auto search = replacements.find(scorerTypeNameOriginal);
58 if (search != replacements.end())
59 {scorerTypeName = search->second;}
62 G4String msg =
"scorer type \"" + scorerTypeNameOriginal +
"\" specified which does not";
63 msg +=
"\ncontain the suffix \"3d\" or \"4d\", and there is no known mapping to the required";
64 msg +=
"\n3d one. Check the scorer name or specify it with the suffix explicitly.";
65 msg +=
"\nAvailable 3d scorers are:\n";
66 for (
const auto& fs : replacements)
67 {msg +=
"\"" + fs.first +
"\" -> \"" + fs.second +
"\"\n";}
82 minimumKineticEnergy = scorer.minimumKineticEnergy * CLHEP::GeV;
83 maximumKineticEnergy = scorer.maximumKineticEnergy * CLHEP::GeV;
84 filename = scorer.conversionFactorFile;
85 pathname = scorer.conversionFactorPath;
86 minimumTime = scorer.minimumTime*CLHEP::second;
87 maximumTime = scorer.maximumTime*CLHEP::second;
89 primariesOnly = scorer.scorePrimariesOnly;
93 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
100 G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();