- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/utils/src/G4VMultipleScattering.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VMultipleScattering.cc,v 1. 47 2007/11/09 11:35:54vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4VMultipleScattering.cc,v 1.60 2008/11/20 20:32:40 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 55 55 // 12-04-07 Add verbosity at destruction (V.Ivanchenko) 56 56 // 27-10-07 Virtual functions moved to source (V.Ivanchenko) 57 // 11-03-08 Set skin value does not effect step limit type (V.Ivanchenko) 57 58 // 58 59 // Class Description: … … 85 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 86 87 87 G4VMultipleScattering::G4VMultipleScattering(const G4String& name, G4ProcessType type): 88 G4VContinuousDiscreteProcess(name, type), 88 G4VMultipleScattering::G4VMultipleScattering(const G4String& name, 89 G4ProcessType type): 90 G4VContinuousDiscreteProcess(name, type), 91 buildLambdaTable(true), 89 92 theLambdaTable(0), 90 93 firstParticle(0), 91 currentParticle(0),92 currentCouple(0),93 nBins(120),94 94 stepLimit(fUseSafety), 95 skin( 0.0),95 skin(3.0), 96 96 facrange(0.02), 97 97 facgeom(2.5), 98 98 latDisplasment(true), 99 buildLambdaTable(true) 100 { 99 currentParticle(0), 100 currentCouple(0) 101 { 102 SetVerboseLevel(1); 103 SetProcessSubType(fMultipleScattering); 104 105 // Size of tables assuming spline 101 106 minKinEnergy = 0.1*keV; 102 107 maxKinEnergy = 100.0*TeV; 103 SetVerboseLevel(1); 108 nBins = 84; 109 110 // default limit on polar angle 111 polarAngleLimit = 0.0; 104 112 105 113 pParticleChange = &fParticleChange; … … 114 122 G4VMultipleScattering::~G4VMultipleScattering() 115 123 { 116 if(1 < verboseLevel) 124 if(1 < verboseLevel) { 117 125 G4cout << "G4VMultipleScattering destruct " << GetProcessName() 118 126 << G4endl; 127 } 119 128 delete modelManager; 120 129 if (theLambdaTable) { … … 131 140 G4String num = part.GetParticleName(); 132 141 if(1 < verboseLevel) { 133 // G4cout << "========================================================" << G4endl;134 142 G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for " 135 143 << GetProcessName() … … 148 156 if (theLambdaTable->GetFlag(i)) { 149 157 // create physics vector and fill it 150 const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i); 158 const G4MaterialCutsCouple* couple = 159 theCoupleTable->GetMaterialCutsCouple(i); 151 160 G4PhysicsVector* aVector = PhysicsVector(couple); 152 161 modelManager->FillLambdaVector(aVector, couple, false); … … 162 171 } 163 172 if(verboseLevel>0 && ( num == "e-" || num == "mu+" || 164 num == "proton" || num == "pi-" || num == "GenericIon")) { 173 num == "proton" || num == "pi-" || 174 num == "GenericIon")) { 165 175 PrintInfoDefinition(); 166 176 if(2 < verboseLevel && theLambdaTable) G4cout << *theLambdaTable << G4endl; … … 182 192 currentCouple = 0; 183 193 if(part.GetParticleType() == "nucleus" && 184 part.GetParticleSubType() == "generic") 185 firstParticle = G4GenericIon::GenericIon(); 186 else firstParticle = ∂ 194 part.GetParticleSubType() == "generic") { 195 firstParticle = G4GenericIon::GenericIon(); 196 } else { 197 firstParticle = ∂ 198 } 199 187 200 currentParticle = ∂ 188 201 } 189 202 190 203 if(1 < verboseLevel) { 191 // G4cout << "========================================================" << G4endl;192 204 G4cout << "### G4VMultipleScattering::PrepearPhysicsTable() for " 193 205 << GetProcessName() … … 217 229 { 218 230 if (0 < verboseLevel) { 219 G4cout << G4endl << GetProcessName() << ": Model variant of multiple scattering " 220 << "for " << firstParticle->GetParticleName() 231 G4cout << G4endl << GetProcessName() 232 << ": for " << firstParticle->GetParticleName() 233 << " SubType= " << GetProcessSubType() 221 234 << G4endl; 222 235 if (theLambdaTable) { … … 225 238 << " to " 226 239 << G4BestUnit(MaxKinEnergy(),"Energy") 227 << " in " << nBins << " bins." 240 << " in " << nBins << " bins, spline: " 241 << (G4LossTableManager::Instance())->SplineFlag() 228 242 << G4endl; 229 243 } 230 G4cout << " LateralDisplacementFlag= " << latDisplasment231 << " Skin= " << skin << G4endl;232 244 PrintInfo(); 245 modelManager->DumpModelList(verboseLevel); 233 246 if (2 < verboseLevel) { 234 247 G4cout << "LambdaTable address= " << theLambdaTable << G4endl; … … 242 255 G4double G4VMultipleScattering::AlongStepGetPhysicalInteractionLength( 243 256 const G4Track& track, 244 G4double previousStepSize,257 G4double, 245 258 G4double currentMinimalStep, 246 259 G4double& currentSafety, … … 249 262 // get Step limit proposed by the process 250 263 valueGPILSelectionMSC = NotCandidateForSelection; 251 G4double steplength = GetMscContinuousStepLimit(track,previousStepSize, 252 currentMinimalStep,currentSafety); 264 G4double steplength = GetMscContinuousStepLimit(track, 265 track.GetKineticEnergy(), 266 currentMinimalStep, 267 currentSafety); 253 268 // G4cout << "StepLimit= " << steplength << G4endl; 254 269 // set return value for G4GPILSelection … … 315 330 if( couple->IsUsed() ) nbins = nBins; 316 331 G4PhysicsVector* v = new G4PhysicsLogVector(minKinEnergy, maxKinEnergy, nbins); 332 v->SetSpline((G4LossTableManager::Instance())->SplineFlag()); 317 333 return v; 318 334 } … … 372 388 << G4endl; 373 389 } 390 if((G4LossTableManager::Instance())->SplineFlag()) { 391 size_t n = theLambdaTable->length(); 392 for(size_t i=0; i<n; i++) {(* theLambdaTable)[i]->SetSpline(true);} 393 } 374 394 } else { 375 395 if (1 < verboseLevel) {
Note: See TracChangeset
for help on using the changeset viewer.