File indexing completed on 2025-01-18 09:58:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef G4EmConfigurator_h
0049 #define G4EmConfigurator_h 1
0050
0051 #include "globals.hh"
0052 #include "G4VEmModel.hh"
0053 #include "G4VEmFluctuationModel.hh"
0054 #include <vector>
0055
0056
0057
0058 class G4VEnergyLossProcess;
0059 class G4VEmProcess;
0060 class G4VMultipleScattering;
0061 class G4TransportationWithMsc;
0062
0063 class G4EmConfigurator
0064 {
0065 public:
0066
0067 explicit G4EmConfigurator(G4int verboseLevel = 1);
0068
0069 ~G4EmConfigurator();
0070
0071
0072
0073
0074
0075 void SetExtraEmModel(const G4String& particleName,
0076 const G4String& processName,
0077 G4VEmModel*,
0078 const G4String& regionName = "",
0079 G4double emin = 0.0,
0080 G4double emax = DBL_MAX,
0081 G4VEmFluctuationModel* fm = nullptr);
0082
0083
0084
0085
0086 void AddModels();
0087
0088
0089
0090 void PrepareModels(const G4ParticleDefinition* aParticle,
0091 G4VEnergyLossProcess* p);
0092
0093 void PrepareModels(const G4ParticleDefinition* aParticle,
0094 G4VEmProcess* p);
0095
0096 void PrepareModels(const G4ParticleDefinition* aParticle,
0097 G4VMultipleScattering* p,
0098 G4TransportationWithMsc* trans = nullptr);
0099
0100 void Clear();
0101
0102 inline void SetVerbose(G4int value);
0103
0104
0105 G4EmConfigurator & operator=(const G4EmConfigurator &right) = delete;
0106 G4EmConfigurator(const G4EmConfigurator&) = delete;
0107
0108 private:
0109
0110 void SetModelForRegion(G4VEmModel* model,
0111 G4VEmFluctuationModel* fm,
0112 const G4Region* reg,
0113 const G4String& particleName,
0114 const G4String& processName,
0115 G4double emin,
0116 G4double emax);
0117
0118 G4bool UpdateModelEnergyRange(G4VEmModel* mod,
0119 G4double emin, G4double emax);
0120
0121 std::vector<G4VEmModel*> models;
0122 std::vector<G4VEmFluctuationModel*> flucModels;
0123 std::vector<G4String> particles;
0124 std::vector<G4String> processes;
0125 std::vector<G4String> regions;
0126 std::vector<G4double> lowEnergy;
0127 std::vector<G4double> highEnergy;
0128
0129 G4int index;
0130 G4int verbose;
0131 };
0132
0133
0134
0135 inline void G4EmConfigurator::SetVerbose(G4int value)
0136 {
0137 verbose = value;
0138 }
0139
0140 #endif
0141
0142
0143
0144
0145
0146
0147
0148