Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EmConfigurator.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// -------------------------------------------------------------------
28//
29// GEANT4 Class header file
30//
31// File name: G4EmConfigurator
32//
33// Author: Vladimir Ivanchenko
34//
35// Creation date: 14.07.2008
36//
37// Modifications:
38//
39// Class Description:
40//
41// This class provides configuration EM models for
42// particles/processes/regions
43//
44
45// -------------------------------------------------------------------
46//
47
48#ifndef G4EmConfigurator_h
49#define G4EmConfigurator_h 1
50
51#include "globals.hh"
52#include "G4VEmModel.hh"
54#include <vector>
55
56//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57
59class G4VEmProcess;
61
63{
64public:
65
66 explicit G4EmConfigurator(G4int verboseLevel = 1);
67
69
70 // Set EM model for particle type and process to
71 // be active for the G4Region and energy interval
72 // The model will be added to the list
73 //
74 void SetExtraEmModel(const G4String& particleName,
75 const G4String& processName,
77 const G4String& regionName = "",
78 G4double emin = 0.0,
79 G4double emax = DBL_MAX,
80 G4VEmFluctuationModel* fm = nullptr);
81
82 // Add all previously declared models to corresponding processes
83 // Can be called in ConstructPhysics
84 //
85 void AddModels();
86
87 // These methods called by G4LossTableManager
88 //
89 void PrepareModels(const G4ParticleDefinition* aParticle,
91
92 void PrepareModels(const G4ParticleDefinition* aParticle,
93 G4VEmProcess* p);
94
95 void PrepareModels(const G4ParticleDefinition* aParticle,
97
98 void Clear();
99
100 inline void SetVerbose(G4int value);
101
102private:
103
104 G4Region* FindRegion(const G4String&);
105
106 void SetModelForRegion(G4VEmModel* model,
108 G4Region* reg,
109 const G4String& particleName,
110 const G4String& processName,
111 G4double emin,
112 G4double emax);
113
114 G4bool UpdateModelEnergyRange(G4VEmModel* mod,
115 G4double emin, G4double emax);
116
117 // hide assignment operator
118 G4EmConfigurator & operator=(const G4EmConfigurator &right) = delete;
119 G4EmConfigurator(const G4EmConfigurator&) = delete;
120
121 std::vector<G4VEmModel*> models;
122 std::vector<G4VEmFluctuationModel*> flucModels;
123 std::vector<G4String> particles;
124 std::vector<G4String> processes;
125 std::vector<G4String> regions;
126 std::vector<G4double> lowEnergy;
127 std::vector<G4double> highEnergy;
128
129 G4int index;
130 G4int verbose;
131};
132
133//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
134
136{
137 verbose = value;
138}
139
140#endif
141
142
143
144
145
146
147
148
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
void SetExtraEmModel(const G4String &particleName, const G4String &processName, G4VEmModel *, const G4String &regionName="", G4double emin=0.0, G4double emax=DBL_MAX, G4VEmFluctuationModel *fm=nullptr)
void SetVerbose(G4int value)
void PrepareModels(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
#define DBL_MAX
Definition: templates.hh:62