Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // G4ProcessManager inline function members im << 27 // 26 // 28 // - 02.12.1995, G.Cosmo - First implementatio << 27 // $Id$ 29 // ------------------------------------------- << 28 // >> 29 // 30 30 >> 31 // ----------------------------------------- >> 32 // inlined function members implementation >> 33 // ----------------------------------------- 31 inline 34 inline 32 void G4ProcessManager::SetParticleType(const G << 35 void G4ProcessManager::SetParticleType(const G4ParticleDefinition* aParticle) 33 { 36 { 34 theParticleType = aParticle; 37 theParticleType = aParticle; 35 } 38 } 36 39 37 inline 40 inline 38 G4ProcessVector* G4ProcessManager::GetProcessL << 41 G4ProcessVector* G4ProcessManager::GetProcessList() const 39 { 42 { 40 return theProcessList; 43 return theProcessList; 41 } 44 } 42 45 43 inline 46 inline 44 G4int G4ProcessManager::GetProcessListLength() << 47 G4int G4ProcessManager::GetProcessListLength() const 45 { 48 { 46 return numberOfProcesses; 49 return numberOfProcesses; 47 } 50 } 48 51 49 inline 52 inline 50 G4int G4ProcessManager::GetProcessIndex(G4VPro << 53 G4int G4ProcessManager::GetProcessIndex(G4VProcess* aProcess) const 51 { 54 { 52 G4int idx = G4int(theProcessList->index(aPro << 55 G4int idx = theProcessList->index(aProcess); 53 if (idx>=numberOfProcesses) idx = -1; 56 if (idx>=numberOfProcesses) idx = -1; 54 return idx; 57 return idx; 55 } 58 } 56 59 57 inline 60 inline 58 G4int G4ProcessManager::GetProcessVectorId(G4P << 61 G4int G4ProcessManager::GetProcessVectorId(G4ProcessVectorDoItIndex idx, 59 G4P << 62 G4ProcessVectorTypeIndex typ) const 60 { 63 { 61 if ( idx == idxAtRest ) << 64 if ( idx == idxAtRest ) { 62 { << 63 if (typ == typeGPIL) { return 0; } 65 if (typ == typeGPIL) { return 0; } 64 else { return 1; } 66 else { return 1; } 65 } << 67 } else if ( idx == idxAlongStep ) { 66 else if ( idx == idxAlongStep ) << 67 { << 68 if (typ == typeGPIL) { return 2; } 68 if (typ == typeGPIL) { return 2; } 69 else { return 3; } 69 else { return 3; } 70 } << 70 } else if ( idx == idxPostStep ) { 71 else if ( idx == idxPostStep ) << 72 { << 73 if (typ == typeGPIL) { return 4; } 71 if (typ == typeGPIL) { return 4; } 74 else { return 5; } 72 else { return 5; } 75 } << 73 } else { 76 else << 77 { << 78 return -1; 74 return -1; 79 } 75 } 80 } 76 } 81 77 82 inline 78 inline 83 G4ProcessVector* G4ProcessManager::GetProcessV << 79 G4ProcessVector* G4ProcessManager::GetProcessVector( 84 G4Proce << 80 G4ProcessVectorDoItIndex idx, 85 G4Proce << 81 G4ProcessVectorTypeIndex typ 86 ) const 82 ) const 87 { 83 { 88 G4int ivec = GetProcessVectorId(idx, typ); 84 G4int ivec = GetProcessVectorId(idx, typ); 89 if ( ivec >=0 ) << 85 if ( ivec >=0 ) { 90 { << 91 return theProcVector[ivec]; 86 return theProcVector[ivec]; 92 } << 87 } else { 93 else << 88 return 0; 94 { << 95 return nullptr; << 96 } 89 } 97 } 90 } 98 91 99 inline 92 inline 100 G4ProcessVector* << 93 G4ProcessVector* G4ProcessManager::GetAtRestProcessVector(G4ProcessVectorTypeIndex typ) const 101 G4ProcessManager::GetAtRestProcessVector(G4Pro << 102 { 94 { 103 if (typ == typeGPIL) { return theProcVector[ 95 if (typ == typeGPIL) { return theProcVector[0]; } 104 else { return theProcVector[ << 96 else { return theProcVector[1]; } 105 } 97 } 106 98 107 inline 99 inline 108 G4ProcessVector* << 100 G4ProcessVector* G4ProcessManager::GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ) const 109 G4ProcessManager::GetAlongStepProcessVector(G4 << 110 { 101 { 111 if (typ == typeGPIL) { return theProcVector[ 102 if (typ == typeGPIL) { return theProcVector[2]; } 112 else { return theProcVector[ << 103 else { return theProcVector[3]; } 113 } 104 } 114 105 115 inline 106 inline 116 G4ProcessVector* << 107 G4ProcessVector* G4ProcessManager::GetPostStepProcessVector(G4ProcessVectorTypeIndex typ) const 117 G4ProcessManager::GetPostStepProcessVector(G4P << 118 { 108 { 119 if (typ == typeGPIL) { return theProcVector[ 109 if (typ == typeGPIL) { return theProcVector[4]; } 120 else { return theProcVector[ << 110 else { return theProcVector[5]; } 121 } 111 } 122 112 123 inline 113 inline 124 G4int G4ProcessManager::GetAtRestIndex( << 114 G4int G4ProcessManager::GetAtRestIndex( 125 G4VProcess* aProcess << 115 G4VProcess* aProcess, 126 G4ProcessVectorTypeI << 116 G4ProcessVectorTypeIndex typ 127 ) const << 117 ) const 128 { 118 { 129 return GetProcessVectorIndex(aProcess, idxAt 119 return GetProcessVectorIndex(aProcess, idxAtRest, typ); 130 } 120 } 131 121 132 inline 122 inline 133 G4int G4ProcessManager::GetAlongStepIndex( << 123 G4int G4ProcessManager::GetAlongStepIndex( 134 G4VProcess* aProcess << 124 G4VProcess* aProcess, 135 G4ProcessVectorTypeI << 125 G4ProcessVectorTypeIndex typ 136 ) const << 126 ) const 137 { 127 { 138 return GetProcessVectorIndex(aProcess, idxAl 128 return GetProcessVectorIndex(aProcess, idxAlongStep, typ); 139 } 129 } 140 130 141 inline 131 inline 142 G4int G4ProcessManager::GetPostStepIndex( << 132 G4int G4ProcessManager::GetPostStepIndex( 143 G4VProcess* aProcess << 133 G4VProcess* aProcess, 144 G4ProcessVectorTypeI << 134 G4ProcessVectorTypeIndex typ 145 ) const << 135 ) const 146 { 136 { 147 return GetProcessVectorIndex(aProcess, idxPo 137 return GetProcessVectorIndex(aProcess, idxPostStep, typ); 148 } 138 } 149 139 150 inline 140 inline 151 G4int G4ProcessManager::AddRestProcess(G4VProc << 141 G4int G4ProcessManager::AddRestProcess(G4VProcess *aProcess,G4int ord) 152 { 142 { 153 return AddProcess(aProcess, ord, ordInActive 143 return AddProcess(aProcess, ord, ordInActive, ordInActive); 154 } 144 } 155 145 156 inline 146 inline 157 G4int G4ProcessManager::AddContinuousProcess(G << 147 G4int G4ProcessManager::AddContinuousProcess(G4VProcess *aProcess,G4int ord) 158 { 148 { 159 return AddProcess(aProcess, ordInActive, ord 149 return AddProcess(aProcess, ordInActive, ord, ordInActive); 160 } 150 } 161 151 162 inline 152 inline 163 G4int G4ProcessManager::AddDiscreteProcess(G4V << 153 G4int G4ProcessManager::AddDiscreteProcess(G4VProcess *aProcess,G4int ord) 164 { 154 { 165 return AddProcess(aProcess, ordInActive, ord 155 return AddProcess(aProcess, ordInActive, ordInActive, ord); 166 } 156 } 167 157 168 inline 158 inline 169 G4ParticleDefinition* G4ProcessManager::GetPar << 159 G4ParticleDefinition* G4ProcessManager::GetParticleType() const 170 { 160 { 171 return (G4ParticleDefinition*)theParticleTyp << 161 return (G4ParticleDefinition* )theParticleType; 172 } 162 } 173 163 >> 164 174 inline 165 inline 175 void G4ProcessManager::SetVerboseLevel(G4int v << 166 void G4ProcessManager::SetVerboseLevel(G4int value) 176 { 167 { 177 verboseLevel = value; 168 verboseLevel = value; 178 } 169 } 179 170 180 inline 171 inline 181 G4int G4ProcessManager::GetVerboseLevel() cons << 172 G4int G4ProcessManager::GetVerboseLevel() const 182 { 173 { 183 return verboseLevel; << 174 return verboseLevel; 184 } 175 } >> 176 185 177