102 geomMin = 1.e-6*CLHEP::mm;
103 lowestKinEnergy = 1*eV;
106 polarAngleLimit = 0.0;
108 physStepLimit = gPathLength = tPathLength = 0.0;
113 fPositionChanged =
false;
141 modelManager->
AddEmModel(order, p, fm, region);
151 G4cout <<
"### G4VMultipleScattering::SetModel is obsolete method "
152 <<
"and will be removed for the next release." <<
G4endl;
155 G4int n = mscModels.size();
156 if(index >= n) {
for(
G4int i=n; i<=index; ++i) {mscModels.push_back(0);} }
157 mscModels[index] = p;
166 G4cout <<
"### G4VMultipleScattering::Model is obsolete method "
167 <<
"and will be removed for the next release." <<
G4endl;
171 if(index >= 0 && index <
G4int(mscModels.size())) { p = mscModels[index]; }
179 G4int n = mscModels.size();
180 if(index >= n) {
for(
G4int i=n; i<=index; ++i) { mscModels.push_back(0); } }
181 mscModels[index] = p;
189 if(index >= 0 && index <
G4int(mscModels.size())) { p = mscModels[index]; }
198 return modelManager->
GetModel(idx, ver);
206 if(!firstParticle) { firstParticle = ∂ }
219 G4cout <<
"### G4VMultipleScattering::PrepearPhysicsTable() for "
223 <<
" isIon= " << isIon
227 if(firstParticle == &part) {
233 for(
G4int i=0; i<numberOfModels; ++i) {
236 if(0 == i) { currentModel = msc; }
271 G4cout <<
"### G4VMultipleScattering::BuildPhysicsTable() for "
273 <<
" and particle " << num
282 num ==
"e+" || num ==
"mu+" ||
283 num ==
"mu-" || num ==
"proton"||
284 num ==
"pi+" || num ==
"pi-" ||
285 num ==
"kaon+" || num ==
"kaon-" ||
286 num ==
"alpha" || num ==
"anti_proton" ||
287 num ==
"GenericIon")))
298 G4cout <<
"### G4VMultipleScattering::BuildPhysicsTable() done for "
300 <<
" and particle " << num
330 if(1 == numberOfModels) {
332 if(eloss) { currentModel->
SetIonisation(fIonisation, currParticle); }
336 for(
G4int i=0; i<numberOfModels; ++i) {
355 physStepLimit = gPathLength = tPathLength = currentMinimalStep;
364 if(1 < numberOfModels) {
370 if(currentModel->
IsActive(ekin) && gPathLength >= geomMin
371 && ekin >= lowestKinEnergy) {
374 if (tPathLength < physStepLimit) {
377 }
else { isActive =
false; }
408 fPositionChanged =
false;
414 tPathLength = geomLength;
436 if (trueLength <= physStepLimit) {
437 tPathLength = trueLength;
439 tPathLength = physStepLimit - 0.5*geomMin;
443 if(tPathLength + geomMin < range && tPathLength > geomMin) {
446 G4double postSafety= preSafety - geomLength;
447 G4bool safetyRecomputed =
false;
448 if( postSafety < geomMin ) {
449 safetyRecomputed =
true;
462 fPositionChanged =
true;
466 if(r2 > postSafety*postSafety) {
467 if(!safetyRecomputed) {
471 if(r2 > postSafety*postSafety) { fac = 0.99*postSafety/std::sqrt(r2); }
474 fNewPosition += fac*displacement;
490 if(fPositionChanged) {
508 currentSafety, &selection);
541 if(part != firstParticle) {
return yes; }
543 const G4String ss[4] = {
"1",
"2",
"3",
"4"};
544 for(
G4int i=0; i<nmod; ++i) {
549 G4int j = std::min(i,3);
558 <<
" with a name <" << name <<
"> " <<
G4endl;
563 <<
" in the directory <" << directory
585 for(
G4int i=0; i<numberOfModels; ++i) {
G4double condition(const G4ErrorSymMatrix &m)
@ NotCandidateForSelection
G4DLLIMPORT std::ostream G4cout
static G4Electron * Electron()
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *, const G4Region *)
G4int NumberOfModels() const
void DumpModelList(G4int verb)
G4VEmModel * GetModel(G4int, G4bool ver=false)
const G4DataVector * Initialise(const G4ParticleDefinition *, const G4ParticleDefinition *, G4double, G4int)
static G4GenericIon * GenericIon()
static G4LossTableManager * Instance()
G4VEnergyLossProcess * GetEnergyLossProcess(const G4ParticleDefinition *)
G4double MaxKinEnergy() const
void BuildPhysicsTable(const G4ParticleDefinition *aParticle)
void DeRegister(G4VEnergyLossProcess *p)
void Register(G4VEnergyLossProcess *p)
void PreparePhysicsTable(const G4ParticleDefinition *aParticle, G4VEnergyLossProcess *p)
virtual void Initialize(const G4Track &)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
void ProposePosition(const G4ThreeVector &finalPosition)
const G4String & GetParticleType() const
G4double GetPDGMass() const
const G4String & GetParticleName() const
G4bool StorePhysicsTable(const G4String &filename, G4bool ascii=false)
void ReLocateWithinVolume(const G4ThreeVector &pGlobalPoint)
G4double GetSafety() const
const G4ThreeVector & GetPosition() const
const G4ThreeVector & GetMomentumDirection() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4StepPoint * GetPostStepPoint() const
const G4ParticleDefinition * GetParticleDefinition() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
static G4TransportationManager * GetTransportationManager()
G4SafetyHelper * GetSafetyHelper() const
G4bool IsActive(G4double kinEnergy)
void SetPolarAngleLimit(G4double)
void SetHighEnergyLimit(G4double)
G4double HighEnergyLimit() const
void SetParticleChange(G4VParticleChange *, G4VEmFluctuationModel *f=0)
G4PhysicsTable * GetCrossSectionTable()
virtual void StartTracking(G4Track *)
virtual G4ThreeVector & SampleScattering(const G4DynamicParticle *, G4double safety)
void SetRangeFactor(G4double)
void SetIonisation(G4VEnergyLossProcess *, const G4ParticleDefinition *part)
void SetLateralDisplasmentFlag(G4bool val)
G4double GetRange(const G4ParticleDefinition *part, G4double kineticEnergy, const G4MaterialCutsCouple *couple)
G4double ComputeSafety(const G4ThreeVector &position, G4double limit)
void SetGeomFactor(G4double)
virtual G4double ComputeTrueStepLength(G4double geomPathLength)
virtual G4double ComputeTruePathLengthLimit(const G4Track &track, G4double &stepLimit)
void SetStepLimitType(G4MscStepLimitType)
void AddEmModel(G4int order, G4VEmModel *, const G4Region *region=0)
void SetIonisation(G4VEnergyLossProcess *)
G4double RangeFactor() const
virtual void PrintInfo()=0
void StartTracking(G4Track *)
G4bool StorePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
G4VMscModel * EmModel(G4int index=1)
G4double GetMeanFreePath(const G4Track &track, G4double, G4ForceCondition *condition)
G4ParticleChangeForMSC fParticleChange
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
G4VEmModel * GetModelByIndex(G4int idx=0, G4bool ver=false) const
G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4double currentMinimalStep, G4double ¤tSafety, G4GPILSelection *selection)
G4double ContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double ¤tSafety)
G4VMultipleScattering(const G4String &name="msc", G4ProcessType type=fElectromagnetic)
void PreparePhysicsTable(const G4ParticleDefinition &)
void SetRangeFactor(G4double val)
void SetModel(G4VMscModel *, G4int index=1)
G4double PostStepGetPhysicalInteractionLength(const G4Track &, G4double previousStepSize, G4ForceCondition *condition)
void SetStepLimitType(G4MscStepLimitType val)
void SetEmModel(G4VMscModel *, G4int index=1)
virtual void InitialiseProcess(const G4ParticleDefinition *)=0
G4double GeomFactor() const
G4VMscModel * Model(G4int index=1)
G4double GetContinuousStepLimit(const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double ¤tSafety)
void PrintInfoDefinition()
void BuildPhysicsTable(const G4ParticleDefinition &)
void SetLateralDisplasmentFlag(G4bool val)
G4bool LateralDisplasmentFlag() const
G4VEmModel * SelectModel(G4double kinEnergy, size_t idx)
G4MscStepLimitType StepLimitType() const
virtual ~G4VMultipleScattering()
G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4bool RetrievePhysicsTable(const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
void ProposeTrueStepLength(G4double truePathLength)
void SetVerboseLevel(G4int value)
void SetProcessSubType(G4int)
G4VParticleChange * pParticleChange
G4int GetProcessSubType() const
const G4String & GetPhysicsTableFileName(const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
const G4String & GetProcessName() const