2 // ********************************************************************
3 // * License and Disclaimer *
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. *
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. *
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 // ********************************************************************
27 // $Id: G4ProcessManager.icc 71231 2013-06-12 13:06:28Z gcosmo $
31 // -----------------------------------------
32 // inlined function members implementation
33 // -----------------------------------------
35 void G4ProcessManager::SetParticleType(const G4ParticleDefinition* aParticle)
37 theParticleType = aParticle;
41 G4ProcessVector* G4ProcessManager::GetProcessList() const
43 return theProcessList;
47 G4int G4ProcessManager::GetProcessListLength() const
49 return numberOfProcesses;
53 G4int G4ProcessManager::GetProcessIndex(G4VProcess* aProcess) const
55 G4int idx = theProcessList->index(aProcess);
56 if (idx>=numberOfProcesses) idx = -1;
61 G4int G4ProcessManager::GetProcessVectorId(G4ProcessVectorDoItIndex idx,
62 G4ProcessVectorTypeIndex typ) const
64 if ( idx == idxAtRest ) {
65 if (typ == typeGPIL) { return 0; }
67 } else if ( idx == idxAlongStep ) {
68 if (typ == typeGPIL) { return 2; }
70 } else if ( idx == idxPostStep ) {
71 if (typ == typeGPIL) { return 4; }
79 G4ProcessVector* G4ProcessManager::GetProcessVector(
80 G4ProcessVectorDoItIndex idx,
81 G4ProcessVectorTypeIndex typ
84 G4int ivec = GetProcessVectorId(idx, typ);
86 return theProcVector[ivec];
93 G4ProcessVector* G4ProcessManager::GetAtRestProcessVector(G4ProcessVectorTypeIndex typ) const
95 if (typ == typeGPIL) { return theProcVector[0]; }
96 else { return theProcVector[1]; }
100 G4ProcessVector* G4ProcessManager::GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ) const
102 if (typ == typeGPIL) { return theProcVector[2]; }
103 else { return theProcVector[3]; }
107 G4ProcessVector* G4ProcessManager::GetPostStepProcessVector(G4ProcessVectorTypeIndex typ) const
109 if (typ == typeGPIL) { return theProcVector[4]; }
110 else { return theProcVector[5]; }
114 G4int G4ProcessManager::GetAtRestIndex(
115 G4VProcess* aProcess,
116 G4ProcessVectorTypeIndex typ
119 return GetProcessVectorIndex(aProcess, idxAtRest, typ);
123 G4int G4ProcessManager::GetAlongStepIndex(
124 G4VProcess* aProcess,
125 G4ProcessVectorTypeIndex typ
128 return GetProcessVectorIndex(aProcess, idxAlongStep, typ);
132 G4int G4ProcessManager::GetPostStepIndex(
133 G4VProcess* aProcess,
134 G4ProcessVectorTypeIndex typ
137 return GetProcessVectorIndex(aProcess, idxPostStep, typ);
141 G4int G4ProcessManager::AddRestProcess(G4VProcess *aProcess,G4int ord)
143 return AddProcess(aProcess, ord, ordInActive, ordInActive);
147 G4int G4ProcessManager::AddContinuousProcess(G4VProcess *aProcess,G4int ord)
149 return AddProcess(aProcess, ordInActive, ord, ordInActive);
153 G4int G4ProcessManager::AddDiscreteProcess(G4VProcess *aProcess,G4int ord)
155 return AddProcess(aProcess, ordInActive, ordInActive, ord);
159 G4ParticleDefinition* G4ProcessManager::GetParticleType() const
161 return (G4ParticleDefinition* )theParticleType;
166 void G4ProcessManager::SetVerboseLevel(G4int value)
168 verboseLevel = value;
172 G4int G4ProcessManager::GetVerboseLevel() const