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 // >> 23 // $Id: G4VMultipleScattering.hh,v 1.25 2004/11/10 08:54:59 vnivanch Exp $ >> 24 // GEANT4 tag $Name: geant4-07-00-cand-01 $ 26 // 25 // 27 // ------------------------------------------- 26 // ------------------------------------------------------------------- 28 // 27 // 29 // GEANT4 Class header file 28 // GEANT4 Class header file 30 // 29 // 31 // 30 // 32 // File name: G4VMultipleScattering 31 // File name: G4VMultipleScattering 33 // 32 // 34 // Author: Vladimir Ivanchenko on base 33 // Author: Vladimir Ivanchenko on base of Laszlo Urban code 35 // 34 // 36 // Creation date: 12.03.2002 35 // Creation date: 12.03.2002 37 // 36 // 38 // Modifications: 37 // Modifications: 39 // 38 // 40 // 16-07-03 Update GetRange interface (V.Ivanc 39 // 16-07-03 Update GetRange interface (V.Ivanchenko) 41 // 26-11-03 bugfix in AlongStepDoIt (L.Urban) << 40 // 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 // 41 // 57 // Class Description: 42 // Class Description: 58 // 43 // 59 // It is the generic process of multiple scatt 44 // It is the generic process of multiple scattering it includes common 60 // part of calculations for all charged partic 45 // part of calculations for all charged particles >> 46 // >> 47 // 26-11-03 bugfix in AlongStepDoIt (L.Urban) >> 48 // 25-05-04 add protection against case when range is less than steplimit (V.Ivanchenko) >> 49 // 30-06-04 make destructor virtual (V.Ivanchenko) >> 50 // 27-08-04 Add InitialiseForRun method (V.Ivanchneko) >> 51 // 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko) 61 52 62 // ------------------------------------------- 53 // ------------------------------------------------------------------- 63 // 54 // 64 55 65 #ifndef G4VMultipleScattering_h 56 #ifndef G4VMultipleScattering_h 66 #define G4VMultipleScattering_h 1 57 #define G4VMultipleScattering_h 1 67 58 68 #include "G4VContinuousDiscreteProcess.hh" 59 #include "G4VContinuousDiscreteProcess.hh" >> 60 #include "G4LossTableManager.hh" 69 #include "globals.hh" 61 #include "globals.hh" 70 #include "G4Material.hh" 62 #include "G4Material.hh" >> 63 #include "G4MaterialCutsCouple.hh" 71 #include "G4ParticleChangeForMSC.hh" 64 #include "G4ParticleChangeForMSC.hh" 72 #include "G4Track.hh" 65 #include "G4Track.hh" 73 #include "G4Step.hh" << 74 #include "G4EmModelManager.hh" 66 #include "G4EmModelManager.hh" 75 #include "G4VMscModel.hh" << 67 #include "G4VEmModel.hh" 76 #include "G4EmParameters.hh" << 77 #include "G4MscStepLimitType.hh" << 78 68 >> 69 class G4Step; 79 class G4ParticleDefinition; 70 class G4ParticleDefinition; 80 class G4VEnergyLossProcess; << 71 class G4DataVector; 81 class G4LossTableManager; << 72 class G4Navigator; 82 class G4SafetyHelper; << 73 class G4PhysicsTable; >> 74 class G4PhysicsVector; 83 75 84 //....oooOO0OOooo........oooOO0OOooo........oo 76 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 85 77 86 class G4VMultipleScattering : public G4VContin 78 class G4VMultipleScattering : public G4VContinuousDiscreteProcess 87 { 79 { 88 public: 80 public: 89 81 90 explicit G4VMultipleScattering(const G4Strin << 82 G4VMultipleScattering(const G4String& name = "msc", 91 G4ProcessType << 83 G4ProcessType type = fElectromagnetic); 92 << 93 ~G4VMultipleScattering() override; << 94 << 95 //------------------------------------------ << 96 // Virtual methods to be implemented for the << 97 //------------------------------------------ << 98 << 99 void ProcessDescription(std::ostream& outFil << 100 84 101 virtual void InitialiseProcess(const G4Parti << 85 virtual ~G4VMultipleScattering(); 102 << 103 // Print out of generic class parameters << 104 void StreamInfo(std::ostream& outFile, const << 105 G4bool rst = false) const; << 106 86 107 protected: << 87 virtual G4bool IsApplicable(const G4ParticleDefinition& p) = 0; >> 88 // True for all charged particles 108 89 109 virtual void StreamProcessInfo(std::ostream& << 90 virtual void PreparePhysicsTable(const G4ParticleDefinition&); 110 << 91 // Initialise for build of tables 111 public: << 92 >> 93 virtual void BuildPhysicsTable(const G4ParticleDefinition&); >> 94 // Build physics table during initialisation 112 95 113 //------------------------------------------ << 96 G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&); 114 // Generic methods common to all ContinuousD << 115 //------------------------------------------ << 116 97 117 // Initialise for build of tables << 98 G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&); 118 void PreparePhysicsTable(const G4ParticleDef << 119 99 120 // Build physics table during initialisation << 100 G4double AlongStepGetPhysicalInteractionLength( 121 void BuildPhysicsTable(const G4ParticleDefin << 101 const G4Track&, >> 102 G4double previousStepSize, >> 103 G4double currentMinimalStep, >> 104 G4double& currentSafety, >> 105 G4GPILSelection* selection); >> 106 // The function overloads the corresponding function of the base >> 107 // class.It limits the step near to boundaries only >> 108 // and invokes the method GetContinuousStepLimit at every step. >> 109 >> 110 virtual void PrintInfoDefinition(); >> 111 // Print out of the class parameters >> 112 >> 113 void SetBinning(G4int nbins); >> 114 G4int Binning() const; >> 115 // Print out of the class parameters >> 116 >> 117 void SetMinKinEnergy(G4double e); >> 118 G4double MinKinEnergy() const; >> 119 // Print out of the class parameters >> 120 >> 121 void SetMaxKinEnergy(G4double e); >> 122 G4double MaxKinEnergy() const; >> 123 // Print out of the class parameters 122 124 123 // Store PhysicsTable in a file. << 124 // Return false in case of failure at I/O << 125 G4bool StorePhysicsTable(const G4ParticleDef 125 G4bool StorePhysicsTable(const G4ParticleDefinition*, 126 const G4String& dir 126 const G4String& directory, 127 G4bool ascii = fals << 127 G4bool ascii = false); >> 128 // Store PhysicsTable in a file. >> 129 // Return false in case of failure at I/O 128 130 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 131 G4bool RetrievePhysicsTable(const G4ParticleDefinition*, 135 const G4String& 132 const G4String& directory, 136 G4bool ascii) ov << 133 G4bool ascii); >> 134 // Retrieve Physics from a file. >> 135 // (return true if the Physics Table can be build by using file) >> 136 // (return false if the process has no functionality or in case of failure) >> 137 // File name should is constructed as processName+particleName and the >> 138 // should be placed under the directory specifed by the argument. 137 139 138 // This is called in the beginning of tracki << 140 void AddEmModel(G4int, G4VEmModel*, const G4Region* region = 0); 139 void StartTracking(G4Track*) override; << 140 141 141 // The function overloads the corresponding << 142 // class.It limits the step near to boundari << 143 // and invokes the method GetMscContinuousSt << 144 G4double AlongStepGetPhysicalInteractionLeng << 145 const << 146 G4doub << 147 G4doub << 148 G4doub << 149 G4GPIL << 150 << 151 // The function overloads the corresponding << 152 // class. << 153 G4double PostStepGetPhysicalInteractionLengt << 154 const G4 << 155 G4double << 156 G4ForceC << 157 << 158 // Along step actions << 159 G4VParticleChange* AlongStepDoIt(const G4Tra << 160 << 161 // This method does not used for tracking, i << 162 G4double ContinuousStepLimit(const G4Track& 142 G4double ContinuousStepLimit(const G4Track& track, 163 G4double previo << 143 G4double previousStepSize, 164 G4double curren << 144 G4double currentMinimalStep, 165 G4double& curre << 145 G4double& currentSafety); 166 << 146 // 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 147 175 // Select model in run time << 148 G4bool LateralDisplasmentFlag() const; 176 inline G4VEmModel* SelectModel(G4double kinE << 149 void SetLateralDisplasmentFlag(G4bool val); >> 150 // lateral displacement to be/not to be computed 177 151 178 public: << 152 G4bool BoundaryAlgorithmFlag() const; >> 153 void SetBoundary(G4bool val); >> 154 // boundary algorith is/isnt active 179 155 180 // Add model for region, smaller value of or << 156 void SetBuildLambdaTable(G4bool val); 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 157 191 // Access to run time models << 158 const G4PhysicsTable* LambdaTable() const; 192 inline G4int NumberOfModels() const; << 193 159 194 inline G4VMscModel* GetModelByIndex(G4int id << 160 virtual G4double TruePathLengthLimit(const G4Track& track, >> 161 G4double& lambda, >> 162 G4double currentMinimalStep) = 0; 195 163 196 //------------------------------------------ << 164 G4VEmModel* SelectModelForMaterial(G4double kinEnergy, size_t& idxRegion) const; 197 // Get/Set parameters for simulation of mult << 198 //------------------------------------------ << 199 165 200 inline G4bool LateralDisplasmentFlag() const << 166 // Define particle definition 201 << 167 const G4ParticleDefinition* Particle() const; 202 inline G4double Skin() const; << 168 void SetParticle(const G4ParticleDefinition*); 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 169 224 protected: 170 protected: 225 171 226 // This method is not used for tracking, it << 172 virtual void InitialiseProcess(const G4ParticleDefinition*) = 0; >> 173 227 G4double GetMeanFreePath(const G4Track& trac 174 G4double GetMeanFreePath(const G4Track& track, 228 G4double, << 175 G4double, 229 G4ForceCondition* c << 176 G4ForceCondition* condition); >> 177 // This method is used for tracking, it returns mean free path value >> 178 >> 179 G4double GetLambda(const G4ParticleDefinition* p, G4double& kineticEnergy); 230 180 231 // This method is not used for tracking, it << 232 G4double GetContinuousStepLimit(const G4Trac 181 G4double GetContinuousStepLimit(const G4Track& track, 233 G4double pre << 182 G4double previousStepSize, 234 G4double cur << 183 G4double currentMinimalStep, 235 G4double& cu << 184 G4double& currentSafety); >> 185 // This method is used for tracking, it returns step limit 236 186 237 private: << 187 virtual G4PhysicsVector* PhysicsVector(const G4MaterialCutsCouple*); >> 188 // Build empty Physics Vector 238 189 239 // ======== Parameters of the class fixed at << 190 void SelectModel(G4double& kinEnergy); >> 191 // Select concrete model 240 192 241 G4EmModelManager* modelManager; << 193 size_t CurrentMaterialCutsCoupleIndex() const {return currentMaterialIndex;}; 242 G4LossTableManager* emManager; << 194 // Return current index 243 G4EmParameters* theParameters; << 244 195 245 // ======== Parameters of the class fixed at << 196 G4double CurrentRange() const {return currentRange;}; 246 197 247 G4SafetyHelper* safetyHelper = n << 198 private: 248 const G4ParticleDefinition* firstParticle = << 249 const G4ParticleDefinition* currParticle = n << 250 << 251 std::vector<G4VMscModel*> mscModels; << 252 199 253 G4double facrange = 0.04; << 200 void DefineMaterial(const G4MaterialCutsCouple* couple); 254 G4double lowestKinEnergy; << 201 // define current material 255 202 256 // ======== Cached values - may be state dep << 203 // hide assignment operator 257 204 258 protected: << 205 G4VMultipleScattering(G4VMultipleScattering &); >> 206 G4VMultipleScattering & operator=(const G4VMultipleScattering &right); 259 207 260 G4ParticleChangeForMSC fParticleChange; << 208 // ===================================================================== 261 209 262 private: 210 private: 263 211 264 G4ThreeVector fNewPosition; << 212 G4ParticleChangeForMSC fParticleChange; 265 G4ThreeVector fNewDirection; << 213 G4EmModelManager* modelManager; >> 214 G4Navigator* navigator; >> 215 G4VEmModel* currentModel; 266 216 267 G4VMscModel* currentModel = n << 217 // tables and vectors 268 G4VEnergyLossProcess* fIonisation = nu << 218 G4PhysicsTable* theLambdaTable; 269 219 270 G4double geomMin; << 220 // cash 271 G4double minDisplacement2 << 221 const G4ParticleDefinition* firstParticle; 272 G4double physStepLimit = << 222 const G4ParticleDefinition* currentParticle; 273 G4double tPathLength = 0. << 223 const G4MaterialCutsCouple* currentCouple; 274 G4double gPathLength = 0. << 224 size_t currentMaterialIndex; 275 << 225 276 G4MscStepLimitType stepLimit = fUse << 226 G4int nBins; 277 G4int numberOfModels = << 227 278 << 228 G4double minKinEnergy; 279 G4bool latDisplacement << 229 G4double maxKinEnergy; 280 G4bool isIon = false; << 230 281 G4bool fPositionChanged << 231 G4double trueStepLength; 282 G4bool isActive = false << 232 G4double truePathLength; 283 G4bool baseMat = false; << 233 G4double geomPathLength; >> 234 G4double lambda0; >> 235 G4double currentRange; >> 236 >> 237 G4GPILSelection valueGPILSelectionMSC; >> 238 G4bool boundary; >> 239 G4bool latDisplasment; >> 240 G4bool buildLambdaTable; 284 }; 241 }; 285 242 286 // ======== Run time inline methods ========== << 243 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 244 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 245 >> 246 inline void G4VMultipleScattering::DefineMaterial(const G4MaterialCutsCouple* couple) >> 247 { >> 248 if(couple != currentCouple) { >> 249 currentCouple = couple; >> 250 currentMaterialIndex = couple->GetIndex(); >> 251 } >> 252 } 287 253 288 //....oooOO0OOooo........oooOO0OOooo........oo 254 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 289 255 290 inline G4VEmModel* << 256 inline G4double G4VMultipleScattering::GetMeanFreePath(const G4Track&, 291 G4VMultipleScattering::SelectModel(G4double ki << 257 G4double, >> 258 G4ForceCondition* cond) >> 259 { >> 260 *cond = Forced; >> 261 return DBL_MAX; >> 262 } >> 263 >> 264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... >> 265 >> 266 inline G4double G4VMultipleScattering::AlongStepGetPhysicalInteractionLength( >> 267 const G4Track& track, >> 268 G4double previousStepSize, >> 269 G4double currentMinimalStep, >> 270 G4double& currentSafety, >> 271 G4GPILSelection* selection) 292 { 272 { 293 return modelManager->SelectModel(kinEnergy, << 273 // get Step limit proposed by the process >> 274 valueGPILSelectionMSC = NotCandidateForSelection; >> 275 G4double steplength = GetContinuousStepLimit(track,previousStepSize, >> 276 currentMinimalStep,currentSafety); >> 277 // set return value for G4GPILSelection >> 278 *selection = valueGPILSelectionMSC; >> 279 return steplength; 294 } 280 } 295 281 296 //....oooOO0OOooo........oooOO0OOooo........oo 282 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 297 283 298 inline G4bool G4VMultipleScattering::LateralD << 284 inline G4double G4VMultipleScattering::GetContinuousStepLimit( >> 285 const G4Track& track, >> 286 G4double, >> 287 G4double currentMinimalStep, >> 288 G4double&) 299 { 289 { 300 return latDisplacement; << 290 DefineMaterial(track.GetMaterialCutsCouple()); >> 291 G4double e = track.GetKineticEnergy(); >> 292 SelectModel(e); >> 293 if(!theLambdaTable) currentModel->SetDynamicParticle(track.GetDynamicParticle()); >> 294 const G4ParticleDefinition* p = track.GetDefinition(); >> 295 lambda0 = GetLambda(p, e); >> 296 currentRange = G4LossTableManager::Instance()->GetTrancatedRange(p,e,currentCouple); >> 297 if(currentRange < currentMinimalStep) currentRange = currentMinimalStep; >> 298 truePathLength = TruePathLengthLimit(track,lambda0,currentMinimalStep); >> 299 //G4cout << "StepLimit: tpl= " << truePathLength << " lambda0= " >> 300 // << lambda0 << " range= " << currentRange >> 301 // << " currentMinStep= " << currentMinimalStep << G4endl; >> 302 if (truePathLength < currentMinimalStep) valueGPILSelectionMSC = CandidateForSelection; >> 303 geomPathLength = currentModel->GeomPathLength(theLambdaTable,currentCouple, >> 304 p,e,lambda0,currentRange,truePathLength); >> 305 if(geomPathLength > lambda0) geomPathLength = lambda0; >> 306 return geomPathLength; 301 } 307 } 302 308 >> 309 303 //....oooOO0OOooo........oooOO0OOooo........oo 310 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 304 311 305 inline G4double G4VMultipleScattering::Skin() << 312 inline G4double G4VMultipleScattering::ContinuousStepLimit( >> 313 const G4Track& track, >> 314 G4double previousStepSize, >> 315 G4double currentMinimalStep, >> 316 G4double& currentSafety) 306 { 317 { 307 return theParameters->MscSkin(); << 318 return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep, >> 319 currentSafety); 308 } 320 } 309 321 310 //....oooOO0OOooo........oooOO0OOooo........oo 322 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 311 323 312 inline G4double G4VMultipleScattering::RangeF << 324 inline G4double G4VMultipleScattering::GetLambda(const G4ParticleDefinition* p, G4double& e) 313 { 325 { 314 return facrange; << 326 G4double x; >> 327 if(theLambdaTable) { >> 328 G4bool b; >> 329 x = ((*theLambdaTable)[currentMaterialIndex])->GetValue(e, b); >> 330 >> 331 } else { >> 332 x = currentModel->CrossSection(currentCouple,p,e,0.0,1.0); >> 333 } >> 334 return x; 315 } 335 } 316 336 317 //....oooOO0OOooo........oooOO0OOooo........oo 337 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 318 338 319 inline G4double G4VMultipleScattering::GeomFa << 339 inline G4VParticleChange* G4VMultipleScattering::AlongStepDoIt( >> 340 const G4Track&, >> 341 const G4Step& step) 320 { 342 { 321 return theParameters->MscGeomFactor(); << 343 G4double geomStepLength = step.GetStepLength(); >> 344 if((geomStepLength == geomPathLength) && (truePathLength <= currentRange)) >> 345 trueStepLength = truePathLength; >> 346 else >> 347 trueStepLength = currentModel->TrueStepLength(geomStepLength); >> 348 fParticleChange.ProposeTrueStepLength(trueStepLength); >> 349 return &fParticleChange; 322 } 350 } 323 351 324 //....oooOO0OOooo........oooOO0OOooo........oo 352 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 325 353 326 inline G4double G4VMultipleScattering::PolarA << 354 inline void G4VMultipleScattering::SelectModel(G4double& kinEnergy) 327 { 355 { 328 return theParameters->MscThetaLimit(); << 356 currentModel = modelManager->SelectModel(kinEnergy, currentMaterialIndex); 329 } 357 } 330 358 331 //....oooOO0OOooo........oooOO0OOooo........oo 359 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 332 360 333 inline G4MscStepLimitType G4VMultipleScatterin << 361 inline G4VEmModel* G4VMultipleScattering::SelectModelForMaterial( >> 362 G4double kinEnergy, size_t& idxRegion) const 334 { 363 { 335 return stepLimit; << 364 return modelManager->SelectModel(kinEnergy, idxRegion); 336 } 365 } 337 366 338 //....oooOO0OOooo........oooOO0OOooo........oo 367 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 339 368 340 inline void G4VMultipleScattering::SetStepLimi << 369 inline void G4VMultipleScattering::SetBinning(G4int nbins) 341 { 370 { 342 theParameters->SetMscStepLimitType(val); << 371 nBins = nbins; 343 } 372 } 344 373 345 //....oooOO0OOooo........oooOO0OOooo........oo 374 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 346 375 347 inline G4double G4VMultipleScattering::LowestK << 376 inline G4int G4VMultipleScattering::Binning() const 348 { 377 { 349 return lowestKinEnergy; << 378 return nBins; 350 } 379 } 351 380 352 //....oooOO0OOooo........oooOO0OOooo........oo 381 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 353 382 354 inline void G4VMultipleScattering::SetLowestKi << 383 inline void G4VMultipleScattering::SetMinKinEnergy(G4double e) >> 384 { >> 385 minKinEnergy = e; >> 386 } >> 387 >> 388 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 389 >> 390 inline G4double G4VMultipleScattering::MinKinEnergy() const >> 391 { >> 392 return minKinEnergy; >> 393 } >> 394 >> 395 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 396 >> 397 inline void G4VMultipleScattering::SetMaxKinEnergy(G4double e) >> 398 { >> 399 maxKinEnergy = e; >> 400 } >> 401 >> 402 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 403 >> 404 inline G4double G4VMultipleScattering::MaxKinEnergy() const >> 405 { >> 406 return maxKinEnergy; >> 407 } >> 408 >> 409 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 410 >> 411 inline G4bool G4VMultipleScattering::LateralDisplasmentFlag() const 355 { 412 { 356 lowestKinEnergy = val; << 413 return latDisplasment; 357 } 414 } 358 415 359 //....oooOO0OOooo........oooOO0OOooo........oo 416 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 360 417 361 inline const G4ParticleDefinition* G4VMultiple << 418 inline void G4VMultipleScattering::SetLateralDisplasmentFlag(G4bool val) 362 { 419 { 363 return firstParticle; << 420 latDisplasment = val; 364 } 421 } 365 422 366 //....oooOO0OOooo........oooOO0OOooo........oo 423 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 367 424 368 inline G4VMscModel* G4VMultipleScattering::EmM << 425 inline G4bool G4VMultipleScattering::BoundaryAlgorithmFlag() const 369 { 426 { 370 return (index < mscModels.size()) ? mscModel << 427 return boundary; 371 } 428 } 372 429 373 //....oooOO0OOooo........oooOO0OOooo........oo 430 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 374 431 375 inline G4int G4VMultipleScattering::NumberOfMo << 432 inline void G4VMultipleScattering::SetBoundary(G4bool val) 376 { 433 { 377 return numberOfModels; << 434 boundary = val; 378 } 435 } 379 436 380 //....oooOO0OOooo........oooOO0OOooo........oo 437 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 381 438 382 inline G4VMscModel* << 439 inline void G4VMultipleScattering::SetBuildLambdaTable(G4bool val) 383 G4VMultipleScattering::GetModelByIndex(G4int i << 384 { 440 { 385 // static cast is possible inside this class << 441 buildLambdaTable = val; 386 return static_cast<G4VMscModel*>(modelManage << 387 } 442 } 388 443 389 //....oooOO0OOooo........oooOO0OOooo........oo 444 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 390 445 391 inline G4bool G4VMultipleScattering::UseBaseMa << 446 inline const G4ParticleDefinition* G4VMultipleScattering::Particle() const 392 { 447 { 393 return baseMat; << 448 return currentParticle; 394 } 449 } 395 450 396 //....oooOO0OOooo........oooOO0OOooo........oo 451 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 397 452 398 #endif 453 #endif 399 454