Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // 23 // 27 // ------------------------------------------- 24 // ------------------------------------------------------------------- 28 // 25 // 29 // GEANT4 Class header file 26 // GEANT4 Class header file 30 // 27 // 31 // 28 // 32 // File name: G4VMultipleScattering 29 // File name: G4VMultipleScattering 33 // 30 // 34 // Author: Vladimir Ivanchenko on base 31 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 32 // 36 // Creation date: 12.03.2002 33 // Creation date: 12.03.2002 37 // 34 // 38 // Modifications: 35 // Modifications: 39 // 36 // 40 // 16-07-03 Update GetRange interface (V.Ivanc << 41 // 26-11-03 bugfix in AlongStepDoIt (L.Urban) << 42 // 25-05-04 add protection against case when r << 43 // 27-08-04 Add InitialiseForRun method (V.Iva << 44 // 08-11-04 Migration to new interface of Stor << 45 // 15-04-05 remove boundary flag (V.Ivanchenko << 46 // 07-10-05 error in a protection in GetContin << 47 // 27-10-05 introduce virtual function MscStep << 48 // 26-01-06 Rename GetRange -> GetRangeFromRes << 49 // 17-02-06 Save table of transport cross sect << 50 // 07-03-06 Move step limit calculation to mod << 51 // 13-05-06 Add method to access model by inde << 52 // 12-02-07 Add get/set skin (V.Ivanchenko) << 53 // 27-10-07 Virtual functions moved to source << 54 // 15-07-08 Reorder class members for further << 55 // 07-04-09 Moved msc methods from G4VEmModel << 56 // 37 // 57 // Class Description: 38 // Class Description: 58 // 39 // 59 // It is the generic process of multiple scatt 40 // It is the generic process of multiple scattering it includes common 60 // part of calculations for all charged partic 41 // part of calculations for all charged particles 61 42 62 // ------------------------------------------- 43 // ------------------------------------------------------------------- 63 // 44 // 64 45 65 #ifndef G4VMultipleScattering_h 46 #ifndef G4VMultipleScattering_h 66 #define G4VMultipleScattering_h 1 47 #define G4VMultipleScattering_h 1 67 48 68 #include "G4VContinuousDiscreteProcess.hh" 49 #include "G4VContinuousDiscreteProcess.hh" >> 50 #include "G4LossTableManager.hh" 69 #include "globals.hh" 51 #include "globals.hh" 70 #include "G4Material.hh" 52 #include "G4Material.hh" >> 53 #include "G4MaterialCutsCouple.hh" 71 #include "G4ParticleChangeForMSC.hh" 54 #include "G4ParticleChangeForMSC.hh" 72 #include "G4Track.hh" 55 #include "G4Track.hh" 73 #include "G4Step.hh" << 74 #include "G4EmModelManager.hh" 56 #include "G4EmModelManager.hh" 75 #include "G4VMscModel.hh" << 76 #include "G4EmParameters.hh" << 77 #include "G4MscStepLimitType.hh" << 78 57 >> 58 class G4Step; 79 class G4ParticleDefinition; 59 class G4ParticleDefinition; 80 class G4VEnergyLossProcess; << 60 class G4VEmModel; 81 class G4LossTableManager; << 61 class G4DataVector; 82 class G4SafetyHelper; << 62 class G4Navigator; >> 63 class G4PhysicsTable; >> 64 class G4PhysicsVector; 83 65 84 //....oooOO0OOooo........oooOO0OOooo........oo 66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 67 86 class G4VMultipleScattering : public G4VContin 68 class G4VMultipleScattering : public G4VContinuousDiscreteProcess 87 { 69 { 88 public: 70 public: 89 71 90 explicit G4VMultipleScattering(const G4Strin << 72 G4VMultipleScattering(const G4String& name = "msc", 91 G4ProcessType << 73 G4ProcessType type = fElectromagnetic); 92 74 93 ~G4VMultipleScattering() override; << 75 ~G4VMultipleScattering(); 94 76 95 //------------------------------------------ << 77 virtual G4bool IsApplicable(const G4ParticleDefinition& p) = 0; 96 // Virtual methods to be implemented for the << 78 // True for all charged particles 97 //------------------------------------------ << 98 79 99 void ProcessDescription(std::ostream& outFil << 80 virtual void BuildPhysicsTable(const G4ParticleDefinition&); >> 81 // Build physics table during initialisation 100 82 101 virtual void InitialiseProcess(const G4Parti << 83 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&); 102 84 103 // Print out of generic class parameters << 85 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&); 104 void StreamInfo(std::ostream& outFile, const << 105 G4bool rst = false) const; << 106 86 107 protected: << 108 << 109 virtual void StreamProcessInfo(std::ostream& << 110 << 111 public: << 112 << 113 //------------------------------------------ << 114 // Generic methods common to all ContinuousD << 115 //------------------------------------------ << 116 << 117 // Initialise for build of tables << 118 void PreparePhysicsTable(const G4ParticleDef << 119 << 120 // Build physics table during initialisation << 121 void BuildPhysicsTable(const G4ParticleDefin << 122 << 123 // Store PhysicsTable in a file. << 124 // Return false in case of failure at I/O << 125 G4bool StorePhysicsTable(const G4ParticleDef << 126 const G4String& dir << 127 G4bool ascii = fals << 128 << 129 // Retrieve Physics from a file. << 130 // (return true if the Physics Table can be << 131 // (return false if the process has no funct << 132 // File name should is constructed as proces << 133 // should be placed under the directory spec << 134 G4bool RetrievePhysicsTable(const G4Particle << 135 const G4String& << 136 G4bool ascii) ov << 137 << 138 // This is called in the beginning of tracki << 139 void StartTracking(G4Track*) override; << 140 << 141 // The function overloads the corresponding << 142 // class.It limits the step near to boundari << 143 // and invokes the method GetMscContinuousSt << 144 G4double AlongStepGetPhysicalInteractionLeng 87 G4double AlongStepGetPhysicalInteractionLength( 145 const << 88 const G4Track&, 146 G4doub << 89 G4double previousStepSize, 147 G4doub << 90 G4double currentMinimalStep, 148 G4doub << 91 G4double& currentSafety, 149 G4GPIL << 92 G4GPILSelection* selection); 150 << 93 // The function overloads the corresponding function of the base 151 // The function overloads the corresponding << 94 // class.It limits the step near to boundaries only 152 // class. << 95 // and invokes the method GetContinuousStepLimit at every step. 153 G4double PostStepGetPhysicalInteractionLengt << 96 154 const G4 << 97 virtual void PrintInfoDefinition(); 155 G4double << 98 // Print out of the class parameters 156 G4ForceC << 99 >> 100 void SetBinning(G4int nbins); >> 101 G4int Binning() const; >> 102 // Print out of the class parameters >> 103 >> 104 void SetMinKinEnergy(G4double e); >> 105 G4double MinKinEnergy() const; >> 106 // Print out of the class parameters >> 107 >> 108 void SetMaxKinEnergy(G4double e); >> 109 G4double MaxKinEnergy() const; >> 110 // Print out of the class parameters >> 111 >> 112 G4bool StorePhysicsTable(G4ParticleDefinition*, >> 113 const G4String& directory, >> 114 G4bool ascii = false); >> 115 // Store PhysicsTable in a file. >> 116 // Return false in case of failure at I/O >> 117 >> 118 G4bool RetrievePhysicsTable(G4ParticleDefinition*, >> 119 const G4String& directory, >> 120 G4bool ascii); >> 121 // Retrieve Physics from a file. >> 122 // (return true if the Physics Table can be build by using file) >> 123 // (return false if the process has no functionality or in case of failure) >> 124 // File name should is constructed as processName+particleName and the >> 125 // should be placed under the directory specifed by the argument. 157 126 158 // Along step actions << 127 void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 159 G4VParticleChange* AlongStepDoIt(const G4Tra << 160 128 161 // This method does not used for tracking, i << 162 G4double ContinuousStepLimit(const G4Track& 129 G4double ContinuousStepLimit(const G4Track& track, 163 G4double previo << 130 G4double previousStepSize, 164 G4double curren << 131 G4double currentMinimalStep, 165 G4double& curre << 132 G4double& currentSafety); 166 << 133 // This method does not used for tracking, it is intended only for tests 167 // hide assignment operator << 168 G4VMultipleScattering(G4VMultipleScattering << 169 G4VMultipleScattering & operator=(const G4VM << 170 << 171 //------------------------------------------ << 172 // Specific methods to set, access, modify m << 173 //------------------------------------------ << 174 << 175 // Select model in run time << 176 inline G4VEmModel* SelectModel(G4double kinE << 177 134 178 public: << 135 G4bool LateralDisplasmentFlag() const; >> 136 void SetLateralDisplasmentFlag(G4bool val); >> 137 // lateral displacement to be/not to be computed >> 138 >> 139 G4bool BoundaryAlgorithmFlag() const; >> 140 void SetBoundary(G4bool val); >> 141 // boundary algorith is/isnt active >> 142 >> 143 void SetBuildLambdaTable(G4bool val); >> 144 >> 145 virtual G4double TruePathLengthLimit(const G4Track& track, >> 146 G4double& lambda, >> 147 G4double currentMinimalStep) = 0; 179 148 180 // Add model for region, smaller value of or << 181 // model will be selected for a given energy << 182 void AddEmModel(G4int order, G4VMscModel*, c << 183 << 184 // Assign a model to a process local list, t << 185 // the derived process should execute AddEmM << 186 void SetEmModel(G4VMscModel*, G4int idx = 0) << 187 << 188 // return a model from the local list << 189 inline G4VMscModel* EmModel(size_t index = 0 << 190 << 191 // Access to run time models << 192 inline G4int NumberOfModels() const; << 193 << 194 inline G4VMscModel* GetModelByIndex(G4int id << 195 << 196 //------------------------------------------ << 197 // Get/Set parameters for simulation of mult << 198 //------------------------------------------ << 199 << 200 inline G4bool LateralDisplasmentFlag() const << 201 << 202 inline G4double Skin() const; << 203 << 204 inline G4double RangeFactor() const; << 205 << 206 inline G4double GeomFactor() const; << 207 << 208 inline G4double PolarAngleLimit() const; << 209 << 210 inline G4bool UseBaseMaterial() const; << 211 << 212 inline G4MscStepLimitType StepLimitType() co << 213 inline void SetStepLimitType(G4MscStepLimitT << 214 << 215 inline G4double LowestKinEnergy() const; << 216 inline void SetLowestKinEnergy(G4double val) << 217 << 218 inline const G4ParticleDefinition* FirstPart << 219 << 220 //------------------------------------------ << 221 // Run time methods << 222 //------------------------------------------ << 223 149 224 protected: 150 protected: 225 151 226 // This method is not used for tracking, it << 152 virtual void InitialiseProcess(const G4ParticleDefinition&) = 0; >> 153 227 G4double GetMeanFreePath(const G4Track& trac 154 G4double GetMeanFreePath(const G4Track& track, 228 G4double, << 155 G4double, 229 G4ForceCondition* c << 156 G4ForceCondition* condition); >> 157 // This method is used for tracking, it returns mean free path value >> 158 >> 159 G4double GetLambda(const G4ParticleDefinition* p, G4double& kineticEnergy); 230 160 231 // This method is not used for tracking, it << 232 G4double GetContinuousStepLimit(const G4Trac 161 G4double GetContinuousStepLimit(const G4Track& track, 233 G4double pre << 162 G4double previousStepSize, 234 G4double cur << 163 G4double currentMinimalStep, 235 G4double& cu << 164 G4double& currentSafety); >> 165 // This method is used for tracking, it returns step limit 236 166 237 private: << 167 virtual G4PhysicsVector* PhysicsVector(const G4MaterialCutsCouple*); >> 168 // Build empty Physics Vector 238 169 239 // ======== Parameters of the class fixed at << 170 void SelectModel(G4double& kinEnergy); >> 171 // Select concrete model 240 172 241 G4EmModelManager* modelManager; << 173 size_t CurrentMaterialCutsCoupleIndex() const {return currentMaterialIndex;}; 242 G4LossTableManager* emManager; << 174 // Return current index 243 G4EmParameters* theParameters; << 244 175 245 // ======== Parameters of the class fixed at << 176 G4double CurrentRange() const {return currentRange;}; 246 177 247 G4SafetyHelper* safetyHelper = n << 178 private: 248 const G4ParticleDefinition* firstParticle = << 249 const G4ParticleDefinition* currParticle = n << 250 << 251 std::vector<G4VMscModel*> mscModels; << 252 179 253 G4double facrange = 0.04; << 180 void DefineMaterial(const G4MaterialCutsCouple* couple); 254 G4double lowestKinEnergy; << 181 // define current material 255 182 256 // ======== Cached values - may be state dep << 183 // hide assignment operator 257 184 258 protected: << 185 G4VMultipleScattering(G4VMultipleScattering &); >> 186 G4VMultipleScattering & operator=(const G4VMultipleScattering &right); 259 187 260 G4ParticleChangeForMSC fParticleChange; << 188 // ===================================================================== 261 189 262 private: 190 private: 263 191 264 G4ThreeVector fNewPosition; << 192 G4ParticleChangeForMSC fParticleChange; 265 G4ThreeVector fNewDirection; << 193 G4EmModelManager* modelManager; >> 194 G4Navigator* navigator; >> 195 G4VEmModel* currentModel; 266 196 267 G4VMscModel* currentModel = n << 197 // tables and vectors 268 G4VEnergyLossProcess* fIonisation = nu << 198 G4PhysicsTable* theLambdaTable; 269 199 270 G4double geomMin; << 200 // cash 271 G4double minDisplacement2 << 201 const G4Material* currentMaterial; 272 G4double physStepLimit = << 202 const G4MaterialCutsCouple* currentCouple; 273 G4double tPathLength = 0. << 203 size_t currentMaterialIndex; 274 G4double gPathLength = 0. << 204 275 << 205 G4int nBins; 276 G4MscStepLimitType stepLimit = fUse << 206 277 G4int numberOfModels = << 207 G4double minKinEnergy; 278 << 208 G4double maxKinEnergy; 279 G4bool latDisplacement << 209 280 G4bool isIon = false; << 210 G4double trueStepLength; 281 G4bool fPositionChanged << 211 G4double truePathLength; 282 G4bool isActive = false << 212 G4double geomPathLength; 283 G4bool baseMat = false; << 213 G4double lambda0; >> 214 G4double currentRange; >> 215 >> 216 G4GPILSelection valueGPILSelectionMSC; >> 217 G4bool boundary; >> 218 G4bool latDisplasment; >> 219 G4bool buildLambdaTable; 284 }; 220 }; 285 221 286 // ======== Run time inline methods ========== << 222 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 224 >> 225 inline void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) >> 226 { >> 227 if(couple != currentCouple) { >> 228 currentCouple = couple; >> 229 currentMaterial = couple->GetMaterial(); >> 230 currentMaterialIndex = couple->GetIndex(); >> 231 } >> 232 } 287 233 288 //....oooOO0OOooo........oooOO0OOooo........oo 234 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 289 235 290 inline G4VEmModel* << 236 inline G4double G4VMultipleScattering::GetMeanFreePath(const G4Track&, 291 G4VMultipleScattering::SelectModel(G4double ki << 237 G4double, >> 238 G4ForceCondition* cond) >> 239 { >> 240 *cond = Forced; >> 241 return DBL_MAX; >> 242 } >> 243 >> 244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 245 >> 246 inline G4double G4VMultipleScattering::AlongStepGetPhysicalInteractionLength( >> 247 const G4Track& track, >> 248 G4double previousStepSize, >> 249 G4double currentMinimalStep, >> 250 G4double& currentSafety, >> 251 G4GPILSelection* selection) 292 { 252 { 293 return modelManager->SelectModel(kinEnergy, << 253 // get Step limit proposed by the process >> 254 valueGPILSelectionMSC = NotCandidateForSelection; >> 255 G4double steplength = GetContinuousStepLimit(track,previousStepSize, >> 256 currentMinimalStep,currentSafety); >> 257 // set return value for G4GPILSelection >> 258 *selection = valueGPILSelectionMSC; >> 259 return steplength; 294 } 260 } 295 261 296 //....oooOO0OOooo........oooOO0OOooo........oo 262 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 297 263 298 inline G4bool G4VMultipleScattering::LateralD << 264 inline G4double G4VMultipleScattering::GetContinuousStepLimit( >> 265 const G4Track& track, >> 266 G4double, >> 267 G4double currentMinimalStep, >> 268 G4double&) >> 269 { >> 270 DefineMaterial(track.GetMaterialCutsCouple()); >> 271 G4double e = track.GetKineticEnergy(); >> 272 SelectModel(e); >> 273 const G4ParticleDefinition* p = track.GetDefinition(); >> 274 lambda0 = GetLambda(p, e); >> 275 currentRange = G4LossTableManager::Instance()->GetRange(p,e,currentCouple); >> 276 truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep); >> 277 //G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= " >> 278 // << lambda0 << " range= " << currentRange >> 279 // << " currentMinStep= " << currentMinimalStep << G4endl; >> 280 if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection; >> 281 geomPathLength = currentModel->GeomPathLength(theLambdaTable,currentCouple, >> 282 p,e,lambda0,currentRange,truePathLength); >> 283 if(geomPathLength > lambda0) geomPathLength = lambda0; >> 284 return geomPathLength; >> 285 } >> 286 >> 287 >> 288 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 289 >> 290 inline G4double G4VMultipleScattering::ContinuousStepLimit( >> 291 const G4Track& track, >> 292 G4double previousStepSize, >> 293 G4double currentMinimalStep, >> 294 G4double& currentSafety) >> 295 { >> 296 return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep, >> 297 currentSafety); >> 298 } >> 299 >> 300 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 301 >> 302 inline G4double G4VMultipleScattering::GetLambda(const G4ParticleDefinition* p, G4double& e) 299 { 303 { 300 return latDisplacement; << 304 G4double x; >> 305 if(theLambdaTable) { >> 306 G4bool b; >> 307 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b); >> 308 >> 309 } else { >> 310 x = currentModel->CrossSection(currentMaterial,p,e,0.0,1.0); >> 311 } >> 312 return x; 301 } 313 } 302 314 303 //....oooOO0OOooo........oooOO0OOooo........oo 315 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 304 316 305 inline G4double G4VMultipleScattering::Skin() << 317 inline G4VParticleChange* G4VMultipleScattering::AlongStepDoIt( >> 318 const G4Track& track, >> 319 const G4Step& step) 306 { 320 { 307 return theParameters->MscSkin(); << 321 fParticleChange.Initialize(track); >> 322 G4double geomStepLength = step.GetStepLength(); >> 323 if (geomStepLength == geomPathLength) trueStepLength = truePathLength; >> 324 else trueStepLength = currentModel->TrueStepLength(geomStepLength); >> 325 fParticleChange.SetTrueStepLength(trueStepLength); >> 326 // G4cout << "AlongStep: trueLength= " << trueStepLength << " geomLength= "<< geomStepLength << " zlast= " << geomPathLength << G4endl; >> 327 return &fParticleChange; 308 } 328 } 309 329 310 //....oooOO0OOooo........oooOO0OOooo........oo 330 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 311 331 312 inline G4double G4VMultipleScattering::RangeF << 332 inline void G4VMultipleScattering::SelectModel(G4double& kinEnergy) 313 { 333 { 314 return facrange; << 334 currentModel = modelManager->SelectModel(kinEnergy, currentMaterialIndex); 315 } 335 } 316 336 317 //....oooOO0OOooo........oooOO0OOooo........oo 337 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 318 338 319 inline G4double G4VMultipleScattering::GeomFa << 339 inline void G4VMultipleScattering::SetBinning(G4int nbins) 320 { 340 { 321 return theParameters->MscGeomFactor(); << 341 nBins = nbins; 322 } 342 } 323 343 324 //....oooOO0OOooo........oooOO0OOooo........oo 344 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 325 345 326 inline G4double G4VMultipleScattering::PolarA << 346 inline G4int G4VMultipleScattering::Binning() const 327 { 347 { 328 return theParameters->MscThetaLimit(); << 348 return nBins; 329 } 349 } 330 350 331 //....oooOO0OOooo........oooOO0OOooo........oo 351 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 332 352 333 inline G4MscStepLimitType G4VMultipleScatterin << 353 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) 334 { 354 { 335 return stepLimit; << 355 minKinEnergy = e; 336 } 356 } 337 357 338 //....oooOO0OOooo........oooOO0OOooo........oo 358 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 339 359 340 inline void G4VMultipleScattering::SetStepLimi << 360 inline G4double G4VMultipleScattering::MinKinEnergy() const 341 { 361 { 342 theParameters->SetMscStepLimitType(val); << 362 return minKinEnergy; 343 } 363 } 344 364 345 //....oooOO0OOooo........oooOO0OOooo........oo 365 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 346 366 347 inline G4double G4VMultipleScattering::LowestK << 367 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) 348 { 368 { 349 return lowestKinEnergy; << 369 maxKinEnergy = e; 350 } 370 } 351 371 352 //....oooOO0OOooo........oooOO0OOooo........oo 372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 353 373 354 inline void G4VMultipleScattering::SetLowestKi << 374 inline G4double G4VMultipleScattering::MaxKinEnergy() const 355 { 375 { 356 lowestKinEnergy = val; << 376 return maxKinEnergy; 357 } 377 } 358 378 359 //....oooOO0OOooo........oooOO0OOooo........oo 379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 360 380 361 inline const G4ParticleDefinition* G4VMultiple << 381 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 362 { 382 { 363 return firstParticle; << 383 return latDisplasment; 364 } 384 } 365 385 366 //....oooOO0OOooo........oooOO0OOooo........oo 386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 367 387 368 inline G4VMscModel* G4VMultipleScattering::EmM << 388 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 369 { 389 { 370 return (index < mscModels.size()) ? mscModel << 390 latDisplasment = val; 371 } 391 } 372 392 373 //....oooOO0OOooo........oooOO0OOooo........oo 393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 374 394 375 inline G4int G4VMultipleScattering::NumberOfMo << 395 inline G4bool G4VMultipleScattering::BoundaryAlgorithmFlag() const 376 { 396 { 377 return numberOfModels; << 397 return boundary; 378 } 398 } 379 399 380 //....oooOO0OOooo........oooOO0OOooo........oo 400 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 381 401 382 inline G4VMscModel* << 402 inline void G4VMultipleScattering::SetBoundary(G4bool val) 383 G4VMultipleScattering::GetModelByIndex(G4int i << 384 { 403 { 385 // static cast is possible inside this class << 404 boundary = val; 386 return static_cast<G4VMscModel*>(modelManage << 387 } 405 } 388 406 389 //....oooOO0OOooo........oooOO0OOooo........oo 407 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 390 408 391 inline G4bool G4VMultipleScattering::UseBaseMa << 409 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 392 { 410 { 393 return baseMat; << 411 buildLambdaTable = val; 394 } 412 } 395 413 396 //....oooOO0OOooo........oooOO0OOooo........oo 414 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 397 415 398 #endif 416 #endif 399 417