source: trunk/source/processes/electromagnetic/utils/include/G4EmConfigurator.hh @ 1340

Last change on this file since 1340 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.6 KB
Line 
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// $Id: G4EmConfigurator.hh,v 1.3 2010/04/12 11:44:40 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29// -------------------------------------------------------------------
30//
31// GEANT4 Class header file
32//
33// File name:     G4EmConfigurator
34//
35// Author:        Vladimir Ivanchenko
36//
37// Creation date: 14.07.2008
38//
39// Modifications:
40//
41// Class Description:
42//
43// This class provides configuration EM models for
44// particles/processes/regions
45//
46
47// -------------------------------------------------------------------
48//
49
50#ifndef G4EmConfigurator_h
51#define G4EmConfigurator_h 1
52
53#include "globals.hh"
54#include "G4VEmModel.hh"
55#include "G4VEmFluctuationModel.hh"
56#include <vector>
57
58//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59
60class G4VEnergyLossProcess;
61class G4VEmProcess;
62class G4VMultipleScattering;
63
64class G4EmConfigurator 
65{
66public: 
67 
68  G4EmConfigurator(G4int verboseLevel = 1);
69 
70  ~G4EmConfigurator();
71
72  // Set EM model for particle type and process to
73  // be active for the G4Region and energy interval
74  // The model will be added to the list
75  //
76  void SetExtraEmModel(const G4String& particleName,
77                       const G4String& processName,
78                       G4VEmModel*,
79                       const G4String& regionName = "",
80                       G4double emin = 0.0,
81                       G4double emax = DBL_MAX,
82                       G4VEmFluctuationModel* fm = 0); 
83
84  // Add all previously declared models to corresponding processes
85  // Can be called in ConstructPhysics
86  //
87  void AddModels();
88
89  // These methods called by G4LossTableManager
90  //
91  void PrepareModels(const G4ParticleDefinition* aParticle,
92                     G4VEnergyLossProcess* p);
93
94  void PrepareModels(const G4ParticleDefinition* aParticle,
95                     G4VEmProcess* p);
96
97  void PrepareModels(const G4ParticleDefinition* aParticle,
98                     G4VMultipleScattering* p);
99
100  void Clear();
101
102  inline void SetVerbose(G4int value);
103
104private:
105
106  G4Region* FindRegion(const G4String&);
107
108  void SetModelForRegion(G4VEmModel* model,
109                         G4VEmFluctuationModel* fm,
110                         G4Region* reg,
111                         const G4String& particleName,
112                         const G4String& processName,
113                         G4double emin,
114                         G4double emax);
115
116  G4bool UpdateModelEnergyRange(G4VEmModel* mod,
117                                G4double emin, G4double emax);
118
119  // hide assignment operator
120  G4EmConfigurator & operator=(const G4EmConfigurator &right);
121  G4EmConfigurator(const G4EmConfigurator&);
122
123  std::vector<G4VEmModel*> models; 
124  std::vector<G4VEmFluctuationModel*> flucModels; 
125  std::vector<G4String> particles; 
126  std::vector<G4String> processes; 
127  std::vector<G4String> regions; 
128  std::vector<G4double> lowEnergy;
129  std::vector<G4double> highEnergy;
130 
131  G4int index;
132  G4int verbose;
133};
134
135//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136
137inline void G4EmConfigurator::SetVerbose(G4int value)
138{
139  verbose = value;
140}
141
142#endif
143
144
145
146
147
148
149
150
Note: See TracBrowser for help on using the repository browser.