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