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