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 | // $Id: G4ProcessTable.icc,v 1.5 2006/06/29 21:07:34 gunter Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-03 $ |
---|
29 | // |
---|
30 | // History: |
---|
31 | // Use STL vector instead of RW vector 1. Mar 00 H.Kurashige |
---|
32 | // |
---|
33 | #include "G4ParticleTable.hh" |
---|
34 | |
---|
35 | ////////////////////////// |
---|
36 | inline |
---|
37 | void G4ProcessTable::SetVerboseLevel(G4int value) |
---|
38 | { |
---|
39 | verboseLevel = value; |
---|
40 | } |
---|
41 | |
---|
42 | ////////////////////////// |
---|
43 | inline |
---|
44 | G4int G4ProcessTable::GetVerboseLevel() const |
---|
45 | { |
---|
46 | return verboseLevel; |
---|
47 | } |
---|
48 | |
---|
49 | ////////////////////////// |
---|
50 | inline |
---|
51 | G4int G4ProcessTable::Length() const |
---|
52 | { |
---|
53 | return fProcTblVector->size(); |
---|
54 | } |
---|
55 | |
---|
56 | ////////////////////////// |
---|
57 | inline |
---|
58 | G4ProcessTable::G4ProcNameVector* G4ProcessTable::GetNameList() |
---|
59 | { |
---|
60 | return fProcNameVector; |
---|
61 | } |
---|
62 | |
---|
63 | ////////////////////////// |
---|
64 | inline |
---|
65 | G4ProcessTable::G4ProcTableVector* G4ProcessTable::GetProcTableVector() |
---|
66 | { |
---|
67 | return fProcTblVector; |
---|
68 | } |
---|
69 | |
---|
70 | |
---|
71 | ////////////////////////// |
---|
72 | inline |
---|
73 | G4VProcess* G4ProcessTable::FindProcess(const G4String& processName, |
---|
74 | const G4ParticleDefinition* particle) |
---|
75 | const |
---|
76 | { |
---|
77 | if ( particle == 0 ) return 0; |
---|
78 | else return FindProcess(processName, particle->GetProcessManager()); |
---|
79 | } |
---|
80 | |
---|
81 | ////////////////////////// |
---|
82 | inline |
---|
83 | G4VProcess* G4ProcessTable::FindProcess(const G4String& processName, |
---|
84 | const G4String& particleName) const |
---|
85 | { |
---|
86 | return FindProcess(processName, |
---|
87 | G4ParticleTable::GetParticleTable()->FindParticle(particleName)); |
---|
88 | } |
---|
89 | |
---|
90 | |
---|
91 | ////////////////////////// |
---|
92 | inline |
---|
93 | void G4ProcessTable::SetProcessActivation( |
---|
94 | const G4String& processName, |
---|
95 | G4ParticleDefinition* particle, |
---|
96 | G4bool fActive) |
---|
97 | { |
---|
98 | if ( particle != 0 ) { |
---|
99 | SetProcessActivation(processName, particle->GetProcessManager(), fActive); |
---|
100 | } |
---|
101 | } |
---|
102 | ////////////////////////// |
---|
103 | inline |
---|
104 | void G4ProcessTable::SetProcessActivation( |
---|
105 | const G4String& processName, |
---|
106 | const G4String& particleName, |
---|
107 | G4bool fActive ) |
---|
108 | { |
---|
109 | if (particleName == "ALL" ) { |
---|
110 | SetProcessActivation( processName , fActive); |
---|
111 | } else { |
---|
112 | SetProcessActivation( |
---|
113 | processName, |
---|
114 | G4ParticleTable::GetParticleTable()->FindParticle(particleName), |
---|
115 | fActive ); |
---|
116 | } |
---|
117 | } |
---|
118 | |
---|
119 | ////////////////////////// |
---|
120 | inline |
---|
121 | void G4ProcessTable::SetProcessActivation( |
---|
122 | G4ProcessType processType, |
---|
123 | G4ParticleDefinition* particle, |
---|
124 | G4bool fActive) |
---|
125 | { |
---|
126 | if ( particle != 0 ) { |
---|
127 | SetProcessActivation( processType, particle->GetProcessManager(), fActive); |
---|
128 | } |
---|
129 | } |
---|
130 | |
---|
131 | ////////////////////////// |
---|
132 | inline |
---|
133 | void G4ProcessTable::SetProcessActivation( |
---|
134 | G4ProcessType processType, |
---|
135 | const G4String& particleName , |
---|
136 | G4bool fActive) |
---|
137 | { |
---|
138 | if ((particleName == "ALL" )||(particleName == "all" )) { |
---|
139 | SetProcessActivation( processType, fActive ); |
---|
140 | } else { |
---|
141 | SetProcessActivation( |
---|
142 | processType, |
---|
143 | G4ParticleTable::GetParticleTable()->FindParticle(particleName), |
---|
144 | fActive ); |
---|
145 | } |
---|
146 | } |
---|
147 | |
---|