source: trunk/source/processes/hadronic/management/include/G4HadronicProcessStore.hh @ 1007

Last change on this file since 1007 was 1007, checked in by garnier, 15 years ago

update to geant4.9.2

File size: 6.4 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: G4HadronicProcessStore.hh,v 1.3 2008/10/22 07:58:20 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-02 $
28//
29//
30// -------------------------------------------------------------------
31//
32// GEANT4 Class header file
33//
34//
35// File name:     G4HadronicProcessStore
36//
37// Author:        Vladimir Ivanchenko
38//
39// Creation date: 09.05.2008
40//
41// Modifications:
42//
43//
44// Class Description:
45//
46
47// -------------------------------------------------------------------
48//
49
50#ifndef G4HadronicProcessStore_h
51#define G4HadronicProcessStore_h 1
52
53
54#include "globals.hh"
55#include "G4DynamicParticle.hh"
56#include "G4HadronicProcess.hh"
57#include "G4HadronicInteraction.hh"
58#include "G4ParticleDefinition.hh"
59#include "G4HadronicProcessType.hh"
60#include <map>
61#include <vector>
62
63class G4Element;
64
65class G4HadronicProcessStore
66{
67
68public:
69
70  static G4HadronicProcessStore* Instance();
71
72  ~G4HadronicProcessStore();
73
74  G4double GetInelasticCrossSectionPerVolume(
75    const G4ParticleDefinition *aParticle,
76    G4double kineticEnergy,
77    const G4Material *material);
78
79  G4double GetInelasticCrossSectionPerAtom(
80    const G4ParticleDefinition *aParticle,
81    G4double kineticEnergy,
82    const G4Element *anElement);
83
84  G4double GetInelasticCrossSectionPerIsotope(
85    const G4ParticleDefinition *aParticle,
86    G4double kineticEnergy,
87    G4int Z, G4int A);
88
89  G4double GetElasticCrossSectionPerVolume(
90    const G4ParticleDefinition *aParticle,
91    G4double kineticEnergy,
92    const G4Material *material);
93
94  G4double GetElasticCrossSectionPerAtom(
95    const G4ParticleDefinition *aParticle,
96    G4double kineticEnergy,
97    const G4Element *anElement);
98
99  G4double GetElasticCrossSectionPerIsotope(
100    const G4ParticleDefinition *aParticle,
101    G4double kineticEnergy,
102    G4int Z, G4int A);
103
104  G4double GetCaptureCrossSectionPerVolume(
105    const G4ParticleDefinition *aParticle,
106    G4double kineticEnergy,
107    const G4Material *material);
108
109  G4double GetCaptureCrossSectionPerAtom(
110    const G4ParticleDefinition *aParticle,
111    G4double kineticEnergy,
112    const G4Element *anElement);
113
114  G4double GetCaptureCrossSectionPerIsotope(
115    const G4ParticleDefinition *aParticle,
116    G4double kineticEnergy,
117    G4int Z, G4int A);
118
119  G4double GetFissionCrossSectionPerVolume(
120    const G4ParticleDefinition *aParticle,
121    G4double kineticEnergy,
122    const G4Material *material);
123
124  G4double GetFissionCrossSectionPerAtom(
125    const G4ParticleDefinition *aParticle,
126    G4double kineticEnergy,
127    const G4Element *anElement);
128
129  G4double GetFissionCrossSectionPerIsotope(
130    const G4ParticleDefinition *aParticle,
131    G4double kineticEnergy,
132    G4int Z, G4int A);
133
134  G4double GetChargeExchangeCrossSectionPerVolume(
135    const G4ParticleDefinition *aParticle,
136    G4double kineticEnergy,
137    const G4Material *material);
138
139  G4double GetChargeExchangeCrossSectionPerAtom(
140    const G4ParticleDefinition *aParticle,
141    G4double kineticEnergy,
142    const G4Element *anElement);
143
144  G4double GetChargeExchangeCrossSectionPerIsotope(
145    const G4ParticleDefinition *aParticle,
146    G4double kineticEnergy,
147    G4int Z, G4int A);
148
149  // register/deregister processes following G4HadronicProcess interface
150  void Register(G4HadronicProcess*); 
151
152  void RegisterParticle(G4HadronicProcess*,
153                        const G4ParticleDefinition*); 
154
155  void RegisterInteraction(G4HadronicProcess*,
156                           G4HadronicInteraction*); 
157
158  void DeRegister(G4HadronicProcess*); 
159
160  // register/deregister processes following only G4VProcess interface
161  void RegisterExtraProcess(G4VProcess*); 
162
163  void RegisterParticleForExtraProcess(G4VProcess*,
164                                       const G4ParticleDefinition*); 
165
166  void DeRegisterExtraProcess(G4VProcess*); 
167
168  void PrintInfo(const G4ParticleDefinition*); 
169
170  void Dump(G4int level);
171
172  void SetVerbose(G4int val);
173
174  G4int GetVerbose();
175
176  G4HadronicProcess* FindProcess(const G4ParticleDefinition*, 
177                                 G4HadronicProcessType subType);
178
179private:
180
181  // constructor
182  G4HadronicProcessStore();
183
184  // print process info
185  void Print(G4int idxProcess, G4int idxParticle);
186
187  static G4HadronicProcessStore* theInstance;
188
189  typedef const G4ParticleDefinition* PD;
190  typedef G4HadronicProcess* HP;
191  typedef G4HadronicInteraction* HI;
192
193  // hadronic processes following G4HadronicProcess interface
194  std::vector<G4HadronicProcess*> process;
195  std::vector<G4HadronicInteraction*> model;
196  std::vector<G4String> modelName;
197  std::vector<PD> particle;
198  std::vector<G4int> wasPrinted;
199
200  std::multimap<PD,HP> p_map;
201  std::multimap<HP,HI> m_map;
202
203  // hadronic processes following only G4VProcess interface
204  std::vector<G4VProcess*> extraProcess;
205  std::multimap<PD,G4VProcess*> ep_map;
206
207  // counters and options
208  G4int n_proc;
209  G4int n_model;
210  G4int n_part;
211  G4int n_extra;
212
213  G4int  verbose;
214  G4bool buildTableStart;
215
216  // cash
217  HP   currentProcess;
218  PD   currentParticle;
219
220  G4DynamicParticle localDP;
221
222};
223
224
225#endif
226
Note: See TracBrowser for help on using the repository browser.