G4VMultipleScattering Class Reference

#include <G4VMultipleScattering.hh>

Inheritance diagram for G4VMultipleScattering:

G4VContinuousDiscreteProcess G4VProcess G4AdjointhMultipleScattering G4eMultipleScattering G4hMultipleScattering G4MuMultipleScattering

Public Member Functions

 G4VMultipleScattering (const G4String &name="msc", G4ProcessType type=fElectromagnetic)
virtual ~G4VMultipleScattering ()
virtual G4bool IsApplicable (const G4ParticleDefinition &p)=0
virtual void PrintInfo ()=0
void PreparePhysicsTable (const G4ParticleDefinition &)
void BuildPhysicsTable (const G4ParticleDefinition &)
void PrintInfoDefinition ()
G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
void StartTracking (G4Track *)
G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety, G4GPILSelection *selection)
G4double PostStepGetPhysicalInteractionLength (const G4Track &, G4double previousStepSize, G4ForceCondition *condition)
G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
G4double ContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety)
G4VEmModelSelectModel (G4double kinEnergy, size_t idx)
void AddEmModel (G4int order, G4VEmModel *, const G4Region *region=0)
void SetModel (G4VMscModel *, G4int index=1)
G4VMscModelModel (G4int index=1)
void SetEmModel (G4VMscModel *, G4int index=1)
G4VMscModelEmModel (G4int index=1)
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) const
void SetIonisation (G4VEnergyLossProcess *)
G4bool LateralDisplasmentFlag () const
void SetLateralDisplasmentFlag (G4bool val)
G4double Skin () const
void SetSkin (G4double val)
G4double RangeFactor () const
void SetRangeFactor (G4double val)
G4double GeomFactor () const
void SetGeomFactor (G4double val)
G4double PolarAngleLimit () const
void SetPolarAngleLimit (G4double val)
G4MscStepLimitType StepLimitType () const
void SetStepLimitType (G4MscStepLimitType val)
const G4ParticleDefinitionFirstParticle () const

Protected Member Functions

virtual void InitialiseProcess (const G4ParticleDefinition *)=0
G4double GetMeanFreePath (const G4Track &track, G4double, G4ForceCondition *condition)
G4double GetContinuousStepLimit (const G4Track &track, G4double previousStepSize, G4double currentMinimalStep, G4double &currentSafety)

Protected Attributes

G4GPILSelection valueGPILSelectionMSC
G4ParticleChangeForMSC fParticleChange

Detailed Description

Definition at line 91 of file G4VMultipleScattering.hh.


Constructor & Destructor Documentation

G4VMultipleScattering::G4VMultipleScattering ( const G4String name = "msc",
G4ProcessType  type = fElectromagnetic 
)

Definition at line 86 of file G4VMultipleScattering.cc.

References fMultipleScattering, fParticleChange, G4GenericIon::GenericIon(), G4LossTableManager::Instance(), G4VProcess::pParticleChange, G4LossTableManager::Register(), G4VProcess::SetProcessSubType(), and G4VProcess::SetVerboseLevel().

00086                                                                                :
00087   G4VContinuousDiscreteProcess("msc", fElectromagnetic),
00088   numberOfModels(0),
00089   firstParticle(0),
00090   currParticle(0),
00091   stepLimit(fUseSafety),
00092   skin(1.0),
00093   facrange(0.04),
00094   facgeom(2.5),
00095   latDisplasment(true),
00096   isIon(false)
00097 {
00098   SetVerboseLevel(1);
00099   SetProcessSubType(fMultipleScattering);
00100   if("ionmsc" == name) { firstParticle = G4GenericIon::GenericIon(); }
00101 
00102   geomMin = 1.e-6*CLHEP::mm;
00103   lowestKinEnergy = 1*eV;
00104 
00105   // default limit on polar angle
00106   polarAngleLimit = 0.0;
00107 
00108   physStepLimit = gPathLength = tPathLength = 0.0;
00109   fIonisation = 0;
00110 
00111   pParticleChange = &fParticleChange;
00112   safetyHelper = 0;
00113   fPositionChanged = false;
00114   isActive = false;
00115 
00116   modelManager = new G4EmModelManager();
00117   emManager = G4LossTableManager::Instance();
00118   emManager->Register(this);
00119 
00120   warn = 0;
00121 }

G4VMultipleScattering::~G4VMultipleScattering (  )  [virtual]

Definition at line 125 of file G4VMultipleScattering.cc.

References G4LossTableManager::DeRegister(), G4cout, G4endl, G4VProcess::GetProcessName(), and G4VProcess::verboseLevel.

00126 {
00127   if(1 < verboseLevel) {
00128     G4cout << "G4VMultipleScattering destruct " << GetProcessName() 
00129            << G4endl;
00130   }
00131   delete modelManager;
00132   emManager->DeRegister(this);
00133 }


Member Function Documentation

void G4VMultipleScattering::AddEmModel ( G4int  order,
G4VEmModel ,
const G4Region region = 0 
)

Definition at line 137 of file G4VMultipleScattering.cc.

References G4EmModelManager::AddEmModel(), G4VProcess::pParticleChange, and G4VEmModel::SetParticleChange().

Referenced by TLBE< T >::ConstructEM(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmStandardPhysics::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmDNAPhysicsChemistry::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4MuMultipleScattering::InitialiseProcess(), G4hMultipleScattering::InitialiseProcess(), G4eMultipleScattering::InitialiseProcess(), G4AdjointhMultipleScattering::InitialiseProcess(), and G4EmConfigurator::PrepareModels().

00139 {
00140   G4VEmFluctuationModel* fm = 0;
00141   modelManager->AddEmModel(order, p, fm, region);
00142   if(p) { p->SetParticleChange(pParticleChange); }
00143 }

G4VParticleChange * G4VMultipleScattering::AlongStepDoIt ( const G4Track ,
const G4Step  
) [virtual]

Reimplemented from G4VContinuousDiscreteProcess.

Definition at line 403 of file G4VMultipleScattering.cc.

References G4VMscModel::ComputeSafety(), G4VMscModel::ComputeTrueStepLength(), fParticleChange, G4Track::GetKineticEnergy(), G4Track::GetMaterialCutsCouple(), G4StepPoint::GetMomentumDirection(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4VMscModel::GetRange(), G4StepPoint::GetSafety(), G4Step::GetStepLength(), G4ParticleChangeForMSC::ProposeMomentumDirection(), G4ParticleChangeForMSC::ProposePosition(), G4VParticleChange::ProposeTrueStepLength(), and G4VMscModel::SampleScattering().

00404 {
00405   fParticleChange.ProposeMomentumDirection(step.GetPostStepPoint()->GetMomentumDirection());
00406   fNewPosition = step.GetPostStepPoint()->GetPosition();
00407   fParticleChange.ProposePosition(fNewPosition);
00408   fPositionChanged = false;
00409 
00410   G4double geomLength = step.GetStepLength();
00411 
00412   // very small step - no msc
00413   if(!isActive) {
00414     tPathLength = geomLength;
00415 
00416     // sample msc
00417   } else {
00418     G4double range = 
00419       currentModel->GetRange(currParticle,track.GetKineticEnergy(),
00420                              track.GetMaterialCutsCouple());
00421 
00422     G4double trueLength = currentModel->ComputeTrueStepLength(geomLength);
00423 
00424     
00425     // protection against wrong t->g->t conversion
00426     //    if(trueLength > tPathLength) 
00427     /*
00428     if(currParticle->GetPDGMass() > GeV)    
00429     G4cout << "G4VMsc::AlongStepDoIt: GeomLength= " 
00430            << geomLength 
00431            << " trueLenght= " << trueLength 
00432            << " tPathLength= " << tPathLength
00433            << " dr= " << range - trueLength 
00434            << " ekin= " << track.GetKineticEnergy() << G4endl;
00435     */
00436     if (trueLength <= physStepLimit) {
00437       tPathLength = trueLength; 
00438     } else {
00439       tPathLength = physStepLimit - 0.5*geomMin; 
00440     }
00441 
00442     // do not sample scattering at the last or at a small step
00443     if(tPathLength + geomMin < range && tPathLength > geomMin) {
00444 
00445       G4double preSafety = step.GetPreStepPoint()->GetSafety();
00446       G4double postSafety= preSafety - geomLength; 
00447       G4bool safetyRecomputed = false;
00448       if( postSafety < geomMin ) {
00449         safetyRecomputed = true;
00450         postSafety = currentModel->ComputeSafety(fNewPosition,0.0); 
00451       } 
00452       G4ThreeVector displacement = 
00453         currentModel->SampleScattering(step.GetPostStepPoint()->GetMomentumDirection(),postSafety);
00454 
00455       G4double r2 = displacement.mag2();
00456 
00457       //G4cout << "R= " << sqrt(r2) << " postSafety= " << postSafety << G4endl;
00458 
00459       // make correction for displacement
00460       if(r2 > 0.0) {
00461 
00462         fPositionChanged = true;
00463         G4double fac = 1.0;
00464 
00465         // displaced point is definitely within the volume
00466         if(r2 > postSafety*postSafety) {
00467           if(!safetyRecomputed) {
00468             postSafety = currentModel->ComputeSafety(fNewPosition, 0.0);
00469           } 
00470           // add a factor which ensure numerical stability
00471           if(r2 > postSafety*postSafety) { fac = 0.99*postSafety/std::sqrt(r2); }
00472         }
00473         // compute new endpoint of the Step
00474         fNewPosition += fac*displacement;
00475         //safetyHelper->ReLocateWithinVolume(fNewPosition);
00476       }
00477     }
00478   }
00479   fParticleChange.ProposeTrueStepLength(tPathLength);
00480   //fParticleChange.ProposePosition(fNewPosition);
00481   return &fParticleChange;
00482 }

G4double G4VMultipleScattering::AlongStepGetPhysicalInteractionLength ( const G4Track ,
G4double  previousStepSize,
G4double  currentMinimalStep,
G4double currentSafety,
G4GPILSelection selection 
) [virtual]

Reimplemented from G4VContinuousDiscreteProcess.

Definition at line 346 of file G4VMultipleScattering.cc.

References CandidateForSelection, G4VMscModel::ComputeTruePathLengthLimit(), G4MaterialCutsCouple::GetIndex(), G4Track::GetKineticEnergy(), G4Track::GetMaterialCutsCouple(), G4Track::GetParticleDefinition(), G4ParticleDefinition::GetPDGMass(), G4VEmModel::IsActive(), NotCandidateForSelection, and SelectModel().

Referenced by GetContinuousStepLimit().

00352 {
00353   // get Step limit proposed by the process
00354   *selection = NotCandidateForSelection;
00355   physStepLimit = gPathLength = tPathLength = currentMinimalStep;
00356 
00357   G4double ekin = track.GetKineticEnergy();
00358   // isIon flag is used only to select a model
00359   if(isIon) { 
00360     ekin *= proton_mass_c2/track.GetParticleDefinition()->GetPDGMass(); 
00361   }
00362   
00363   // select new model
00364   if(1 < numberOfModels) {
00365     currentModel = static_cast<G4VMscModel*>(
00366       SelectModel(ekin,track.GetMaterialCutsCouple()->GetIndex()));
00367   }
00368 
00369   // step limit
00370   if(currentModel->IsActive(ekin) && gPathLength >= geomMin 
00371      && ekin >= lowestKinEnergy) {
00372     isActive = true;
00373     tPathLength = currentModel->ComputeTruePathLengthLimit(track, gPathLength);
00374     if (tPathLength < physStepLimit) { 
00375       *selection = CandidateForSelection; 
00376     }
00377   } else { isActive = false; }
00378   /*  
00379   if(currParticle->GetPDGMass() > GeV)    
00380   G4cout << "MSC::AlongStepGPIL: Ekin= " << ekin
00381          << " gPathLength= " << gPathLength
00382          << " tPathLength= " << tPathLength
00383          << " currentMinimalStep= " << currentMinimalStep
00384          << " isActive " << isActive << G4endl;
00385   */
00386   return gPathLength;
00387 }

void G4VMultipleScattering::BuildPhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VProcess.

Definition at line 267 of file G4VMultipleScattering.cc.

References G4LossTableManager::BuildPhysicsTable(), G4EmModelManager::DumpModelList(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), PrintInfo(), and G4VProcess::verboseLevel.

00268 {
00269   G4String num = part.GetParticleName();
00270   if(1 < verboseLevel) {
00271     G4cout << "### G4VMultipleScattering::BuildPhysicsTable() for "
00272            << GetProcessName()
00273            << " and particle " << num
00274            << G4endl;
00275   }
00276 
00277   emManager->BuildPhysicsTable(firstParticle);
00278 
00279   // explicitly defined printout by particle name
00280   if(1 < verboseLevel || 
00281      (0 < verboseLevel && (num == "e-" || 
00282                            num == "e+"    || num == "mu+" || 
00283                            num == "mu-"   || num == "proton"|| 
00284                            num == "pi+"   || num == "pi-" || 
00285                            num == "kaon+" || num == "kaon-" || 
00286                            num == "alpha" || num == "anti_proton" || 
00287                            num == "GenericIon")))
00288     { 
00289       G4cout << G4endl << GetProcessName() 
00290              << ":   for " << num
00291              << "    SubType= " << GetProcessSubType() 
00292              << G4endl;
00293       PrintInfo();
00294       modelManager->DumpModelList(verboseLevel);
00295     }
00296 
00297   if(1 < verboseLevel) {
00298     G4cout << "### G4VMultipleScattering::BuildPhysicsTable() done for "
00299            << GetProcessName()
00300            << " and particle " << num
00301            << G4endl;
00302   }
00303 }

G4double G4VMultipleScattering::ContinuousStepLimit ( const G4Track track,
G4double  previousStepSize,
G4double  currentMinimalStep,
G4double currentSafety 
)

Definition at line 516 of file G4VMultipleScattering.cc.

References GetContinuousStepLimit().

00521 {
00522   return GetContinuousStepLimit(track,previousStepSize,currentMinimalStep,
00523                                 currentSafety);
00524 }

G4VMscModel * G4VMultipleScattering::EmModel ( G4int  index = 1  ) 

Definition at line 186 of file G4VMultipleScattering.cc.

Referenced by G4MuMultipleScattering::InitialiseProcess(), G4hMultipleScattering::InitialiseProcess(), and G4eMultipleScattering::InitialiseProcess().

00187 {
00188   G4VMscModel* p = 0;
00189   if(index >= 0 && index <  G4int(mscModels.size())) { p = mscModels[index]; }
00190   return p;
00191 }

const G4ParticleDefinition * G4VMultipleScattering::FirstParticle (  )  const [inline]

Definition at line 402 of file G4VMultipleScattering.hh.

00403 {
00404   return firstParticle;
00405 }

G4double G4VMultipleScattering::GeomFactor (  )  const [inline]

Definition at line 357 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), PreparePhysicsTable(), G4hMultipleScattering::PrintInfo(), and G4eMultipleScattering::PrintInfo().

00358 {
00359   return facgeom;
00360 }

G4double G4VMultipleScattering::GetContinuousStepLimit ( const G4Track track,
G4double  previousStepSize,
G4double  currentMinimalStep,
G4double currentSafety 
) [protected, virtual]

Implements G4VContinuousDiscreteProcess.

Definition at line 501 of file G4VMultipleScattering.cc.

References AlongStepGetPhysicalInteractionLength(), and NotCandidateForSelection.

Referenced by ContinuousStepLimit().

00506 {
00507   G4GPILSelection selection = NotCandidateForSelection;
00508   G4double x = AlongStepGetPhysicalInteractionLength(track,previousStepSize,
00509                                                      currentMinimalStep,
00510                                                      currentSafety, &selection);
00511   return x;
00512 }

G4double G4VMultipleScattering::GetMeanFreePath ( const G4Track track,
G4double  ,
G4ForceCondition condition 
) [protected, virtual]

Implements G4VContinuousDiscreteProcess.

Definition at line 528 of file G4VMultipleScattering.cc.

References DBL_MAX, and Forced.

00530 {
00531   *condition = Forced;
00532   return DBL_MAX;
00533 }

G4VEmModel * G4VMultipleScattering::GetModelByIndex ( G4int  idx = 0,
G4bool  ver = false 
) const

Definition at line 196 of file G4VMultipleScattering.cc.

References G4EmModelManager::GetModel().

00197 {
00198   return modelManager->GetModel(idx, ver);
00199 }

virtual void G4VMultipleScattering::InitialiseProcess ( const G4ParticleDefinition  )  [protected, pure virtual]

Implemented in G4AdjointhMultipleScattering, G4MuMultipleScattering, G4eMultipleScattering, and G4hMultipleScattering.

Referenced by PreparePhysicsTable().

virtual G4bool G4VMultipleScattering::IsApplicable ( const G4ParticleDefinition p  )  [pure virtual]

Reimplemented from G4VProcess.

Implemented in G4AdjointhMultipleScattering, G4MuMultipleScattering, G4eMultipleScattering, and G4hMultipleScattering.

G4bool G4VMultipleScattering::LateralDisplasmentFlag (  )  const [inline]

Definition at line 314 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), PreparePhysicsTable(), G4MuMultipleScattering::PrintInfo(), G4hMultipleScattering::PrintInfo(), G4eMultipleScattering::PrintInfo(), and G4AdjointhMultipleScattering::PrintInfo().

00315 {
00316   return latDisplasment;
00317 }

G4VMscModel * G4VMultipleScattering::Model ( G4int  index = 1  ) 

Definition at line 162 of file G4VMultipleScattering.cc.

References G4cout, and G4endl.

00163 {
00164   ++warn;
00165   if(warn < 10) { 
00166     G4cout << "### G4VMultipleScattering::Model is obsolete method "
00167            << "and will be removed for the next release." << G4endl;
00168     G4cout << "    Please, use EmModel" << G4endl;
00169   } 
00170   G4VMscModel* p = 0;
00171   if(index >= 0 && index <  G4int(mscModels.size())) { p = mscModels[index]; }
00172   return p;
00173 }

G4double G4VMultipleScattering::PolarAngleLimit (  )  const [inline]

Definition at line 371 of file G4VMultipleScattering.hh.

Referenced by G4MuMultipleScattering::PrintInfo().

00372 {
00373   return polarAngleLimit;
00374 }

G4VParticleChange * G4VMultipleScattering::PostStepDoIt ( const G4Track ,
const G4Step  
) [virtual]

Reimplemented from G4VContinuousDiscreteProcess.

Definition at line 487 of file G4VMultipleScattering.cc.

References fParticleChange, G4ParticleChangeForMSC::Initialize(), G4ParticleChangeForMSC::ProposePosition(), and G4SafetyHelper::ReLocateWithinVolume().

00488 {
00489   fParticleChange.Initialize(track);  
00490   
00491   if(fPositionChanged) { 
00492     safetyHelper->ReLocateWithinVolume(fNewPosition);
00493     fParticleChange.ProposePosition(fNewPosition); 
00494   }
00495   
00496   return &fParticleChange;
00497 }

G4double G4VMultipleScattering::PostStepGetPhysicalInteractionLength ( const G4Track ,
G4double  previousStepSize,
G4ForceCondition condition 
) [virtual]

Reimplemented from G4VContinuousDiscreteProcess.

Definition at line 392 of file G4VMultipleScattering.cc.

References DBL_MAX, and Forced.

00394 {
00395   *condition = Forced;
00396   //*condition = NotForced;
00397   return DBL_MAX;
00398 }

void G4VMultipleScattering::PreparePhysicsTable ( const G4ParticleDefinition  )  [virtual]

Reimplemented from G4VProcess.

Definition at line 204 of file G4VMultipleScattering.cc.

References G4Electron::Electron(), fMinimal, G4cout, G4endl, G4GenericIon::GenericIon(), GeomFactor(), G4EmModelManager::GetModel(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4VProcess::GetProcessName(), G4TransportationManager::GetSafetyHelper(), G4TransportationManager::GetTransportationManager(), G4EmModelManager::Initialise(), G4SafetyHelper::InitialiseHelper(), InitialiseProcess(), LateralDisplasmentFlag(), G4LossTableManager::MaxKinEnergy(), G4EmModelManager::NumberOfModels(), G4LossTableManager::PreparePhysicsTable(), RangeFactor(), SetLateralDisplasmentFlag(), SetRangeFactor(), G4VMscModel::SetStepLimitType(), SetStepLimitType(), Skin(), StepLimitType(), and G4VProcess::verboseLevel.

00205 {
00206   if(!firstParticle) { firstParticle = &part; }
00207   if(part.GetParticleType() == "nucleus") {
00208     SetStepLimitType(fMinimal);
00209     SetLateralDisplasmentFlag(false);
00210     SetRangeFactor(0.2);
00211     if(&part == G4GenericIon::GenericIon()) { firstParticle = &part; }
00212     isIon = true; 
00213   }
00214 
00215   emManager->PreparePhysicsTable(&part, this);
00216   currParticle = 0;
00217 
00218   if(1 < verboseLevel) {
00219     G4cout << "### G4VMultipleScattering::PrepearPhysicsTable() for "
00220            << GetProcessName()
00221            << " and particle " << part.GetParticleName()
00222            << " local particle " << firstParticle->GetParticleName()
00223            << " isIon= " << isIon 
00224            << G4endl;
00225   }
00226 
00227   if(firstParticle == &part) {
00228 
00229     InitialiseProcess(firstParticle);
00230 
00231     // initialisation of models
00232     numberOfModels = modelManager->NumberOfModels();
00233     for(G4int i=0; i<numberOfModels; ++i) {
00234       G4VMscModel* msc = static_cast<G4VMscModel*>(modelManager->GetModel(i));
00235       msc->SetIonisation(0, firstParticle);
00236       if(0 == i) { currentModel = msc; }
00237       if(isIon) {
00238         msc->SetStepLimitType(fMinimal);
00239         msc->SetLateralDisplasmentFlag(false);
00240         msc->SetRangeFactor(0.2);
00241       } else {
00242         msc->SetStepLimitType(StepLimitType());
00243         msc->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
00244         msc->SetSkin(Skin());
00245         msc->SetRangeFactor(RangeFactor());
00246         msc->SetGeomFactor(GeomFactor());
00247       }
00248       msc->SetPolarAngleLimit(polarAngleLimit);
00249       G4double emax = 
00250         std::min(msc->HighEnergyLimit(),emManager->MaxKinEnergy());
00251       msc->SetHighEnergyLimit(emax);
00252     }
00253 
00254     modelManager->Initialise(firstParticle, G4Electron::Electron(), 
00255                              10.0, verboseLevel);
00256 
00257     if(!safetyHelper) {
00258       safetyHelper = G4TransportationManager::GetTransportationManager()
00259         ->GetSafetyHelper();
00260       safetyHelper->InitialiseHelper();
00261     }
00262   }
00263 }

virtual void G4VMultipleScattering::PrintInfo (  )  [pure virtual]

Implemented in G4AdjointhMultipleScattering, G4MuMultipleScattering, G4eMultipleScattering, and G4hMultipleScattering.

Referenced by BuildPhysicsTable(), and PrintInfoDefinition().

void G4VMultipleScattering::PrintInfoDefinition (  ) 

Definition at line 307 of file G4VMultipleScattering.cc.

References G4EmModelManager::DumpModelList(), G4cout, G4endl, G4ParticleDefinition::GetParticleName(), G4VProcess::GetProcessName(), G4VProcess::GetProcessSubType(), PrintInfo(), and G4VProcess::verboseLevel.

00308 {
00309   if (0 < verboseLevel) {
00310     G4cout << G4endl << GetProcessName() 
00311            << ":   for " << firstParticle->GetParticleName()
00312            << "    SubType= " << GetProcessSubType() 
00313            << G4endl;
00314     PrintInfo();
00315     modelManager->DumpModelList(verboseLevel);
00316   }
00317 }

G4double G4VMultipleScattering::RangeFactor (  )  const [inline]

Definition at line 343 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), PreparePhysicsTable(), G4MuMultipleScattering::PrintInfo(), G4hMultipleScattering::PrintInfo(), G4eMultipleScattering::PrintInfo(), and G4AdjointhMultipleScattering::PrintInfo().

00344 {
00345   return facrange;
00346 }

G4bool G4VMultipleScattering::RetrievePhysicsTable ( const G4ParticleDefinition ,
const G4String directory,
G4bool  ascii 
) [virtual]

Reimplemented from G4VProcess.

Definition at line 576 of file G4VMultipleScattering.cc.

00579 {
00580   return true;
00581 }

G4VEmModel * G4VMultipleScattering::SelectModel ( G4double  kinEnergy,
size_t  idx 
) [inline]

Definition at line 307 of file G4VMultipleScattering.hh.

References G4EmModelManager::SelectModel().

Referenced by AlongStepGetPhysicalInteractionLength().

00308 {
00309   return modelManager->SelectModel(kinEnergy, coupleIndex);
00310 }

void G4VMultipleScattering::SetEmModel ( G4VMscModel ,
G4int  index = 1 
)

Definition at line 177 of file G4VMultipleScattering.cc.

References CLHEP::detail::n.

Referenced by G4MuMultipleScattering::InitialiseProcess(), G4hMultipleScattering::InitialiseProcess(), and G4eMultipleScattering::InitialiseProcess().

00178 {
00179   G4int n = mscModels.size();
00180   if(index >= n) { for(G4int i=n; i<=index; ++i) { mscModels.push_back(0); } }
00181   mscModels[index] = p;
00182 }

void G4VMultipleScattering::SetGeomFactor ( G4double  val  )  [inline]

Definition at line 364 of file G4VMultipleScattering.hh.

00365 {
00366   if(val > 0.0) facgeom = val;
00367 }

void G4VMultipleScattering::SetIonisation ( G4VEnergyLossProcess  ) 

Definition at line 585 of file G4VMultipleScattering.cc.

References G4EmModelManager::GetModel().

00586 {
00587   for(G4int i=0; i<numberOfModels; ++i) {
00588     G4VMscModel* msc = static_cast<G4VMscModel*>(modelManager->GetModel(i));
00589     msc->SetIonisation(p, firstParticle);
00590   }
00591 }

void G4VMultipleScattering::SetLateralDisplasmentFlag ( G4bool  val  )  [inline]

Definition at line 321 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), and PreparePhysicsTable().

00322 {
00323   latDisplasment = val;
00324 }

void G4VMultipleScattering::SetModel ( G4VMscModel ,
G4int  index = 1 
)

Definition at line 147 of file G4VMultipleScattering.cc.

References G4cout, G4endl, and CLHEP::detail::n.

00148 {
00149   ++warn;
00150   if(warn < 10) { 
00151     G4cout << "### G4VMultipleScattering::SetModel is obsolete method "
00152            << "and will be removed for the next release." << G4endl;
00153     G4cout << "    Please, use SetEmModel" << G4endl;
00154   } 
00155   G4int n = mscModels.size();
00156   if(index >= n) { for(G4int i=n; i<=index; ++i) {mscModels.push_back(0);} }
00157   mscModels[index] = p;
00158 }

void G4VMultipleScattering::SetPolarAngleLimit ( G4double  val  )  [inline]

Definition at line 378 of file G4VMultipleScattering.hh.

References G4INCL::Math::pi.

00379 {
00380   if(val < 0.0)            { polarAngleLimit = 0.0; }
00381   else if(val > CLHEP::pi) { polarAngleLimit = CLHEP::pi; }
00382   else                     { polarAngleLimit = val; }
00383 }

void G4VMultipleScattering::SetRangeFactor ( G4double  val  )  [inline]

Definition at line 350 of file G4VMultipleScattering.hh.

Referenced by PreparePhysicsTable().

00351 {
00352   if(val > 0.0) facrange = val;
00353 }

void G4VMultipleScattering::SetSkin ( G4double  val  )  [inline]

Definition at line 335 of file G4VMultipleScattering.hh.

00336 {
00337   if(val < 1.0) { skin = 0.0; }
00338   else          { skin = val; }
00339 }

void G4VMultipleScattering::SetStepLimitType ( G4MscStepLimitType  val  )  [inline]

Definition at line 394 of file G4VMultipleScattering.hh.

References fMinimal.

Referenced by TLBE< T >::ConstructEM(), G4EmStandardPhysics_option4::ConstructProcess(), G4EmStandardPhysics_option3::ConstructProcess(), G4EmStandardPhysics_option2::ConstructProcess(), G4EmStandardPhysics_option1::ConstructProcess(), G4EmPenelopePhysics::ConstructProcess(), G4EmLowEPPhysics::ConstructProcess(), G4EmLivermorePolarizedPhysics::ConstructProcess(), G4EmLivermorePhysics::ConstructProcess(), G4EmDNAPhysicsChemistry::ConstructProcess(), G4EmDNAPhysics::ConstructProcess(), G4AdjointhMultipleScattering::G4AdjointhMultipleScattering(), G4hMultipleScattering::G4hMultipleScattering(), G4MuMultipleScattering::G4MuMultipleScattering(), G4AdjointhMultipleScattering::InitialiseProcess(), and PreparePhysicsTable().

00395 {
00396   stepLimit = val;
00397   if(val == fMinimal) { facrange = 0.2; }
00398 }

G4double G4VMultipleScattering::Skin (  )  const [inline]

Definition at line 328 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), PreparePhysicsTable(), G4hMultipleScattering::PrintInfo(), G4eMultipleScattering::PrintInfo(), and G4AdjointhMultipleScattering::PrintInfo().

00329 {
00330   return skin;
00331 }

void G4VMultipleScattering::StartTracking ( G4Track  )  [virtual]

Reimplemented from G4VProcess.

Definition at line 321 of file G4VMultipleScattering.cc.

References G4LossTableManager::GetEnergyLossProcess(), G4EmModelManager::GetModel(), G4Track::GetParticleDefinition(), G4VMscModel::SetIonisation(), and G4VEmModel::StartTracking().

00322 {
00323   G4VEnergyLossProcess* eloss = 0;
00324   if(track->GetParticleDefinition() != currParticle) {
00325     currParticle = track->GetParticleDefinition();
00326     fIonisation = emManager->GetEnergyLossProcess(currParticle);
00327     eloss = fIonisation;
00328   }
00329   // one model
00330   if(1 == numberOfModels) {
00331     currentModel->StartTracking(track);
00332     if(eloss) { currentModel->SetIonisation(fIonisation, currParticle); }
00333 
00334     // many models
00335   } else { 
00336     for(G4int i=0; i<numberOfModels; ++i) {
00337       G4VMscModel* msc = static_cast<G4VMscModel*>(modelManager->GetModel(i));
00338       msc->StartTracking(track);
00339       if(eloss) { msc->SetIonisation(fIonisation, currParticle); }
00340     }
00341   }
00342 }

G4MscStepLimitType G4VMultipleScattering::StepLimitType (  )  const [inline]

Definition at line 387 of file G4VMultipleScattering.hh.

Referenced by G4AdjointhMultipleScattering::InitialiseProcess(), PreparePhysicsTable(), G4MuMultipleScattering::PrintInfo(), G4hMultipleScattering::PrintInfo(), G4eMultipleScattering::PrintInfo(), and G4AdjointhMultipleScattering::PrintInfo().

00388 {
00389   return stepLimit;
00390 }

G4bool G4VMultipleScattering::StorePhysicsTable ( const G4ParticleDefinition ,
const G4String directory,
G4bool  ascii = false 
) [virtual]

Reimplemented from G4VProcess.

Definition at line 538 of file G4VMultipleScattering.cc.

References G4cout, G4endl, G4VEmModel::GetCrossSectionTable(), G4EmModelManager::GetModel(), G4ParticleDefinition::GetParticleName(), G4VProcess::GetPhysicsTableFileName(), G4VProcess::GetProcessName(), G4EmModelManager::NumberOfModels(), G4PhysicsTable::StorePhysicsTable(), and G4VProcess::verboseLevel.

00541 {
00542   G4bool yes = true;
00543   if(part != firstParticle) { return yes; }
00544   G4int nmod = modelManager->NumberOfModels();
00545   const G4String ss[4] = {"1","2","3","4"};
00546   for(G4int i=0; i<nmod; ++i) {
00547     G4VEmModel* msc = modelManager->GetModel(i);
00548     yes = true;
00549     G4PhysicsTable* table = msc->GetCrossSectionTable();
00550     if (table) {
00551       G4int j = std::min(i,3); 
00552       G4String name = 
00553         GetPhysicsTableFileName(part,directory,"LambdaMod"+ss[j],ascii);
00554       yes = table->StorePhysicsTable(name,ascii);
00555 
00556       if ( yes ) {
00557         if ( verboseLevel>0 ) {
00558           G4cout << "Physics table are stored for " << part->GetParticleName()
00559                  << " and process " << GetProcessName()
00560                  << " with a name <" << name << "> " << G4endl;
00561         }
00562       } else {
00563         G4cout << "Fail to store Physics Table for " << part->GetParticleName()
00564                << " and process " << GetProcessName()
00565                << " in the directory <" << directory
00566                << "> " << G4endl;
00567       }
00568     }
00569   }
00570   return yes;
00571 }


Field Documentation

G4ParticleChangeForMSC G4VMultipleScattering::fParticleChange [protected]

Definition at line 283 of file G4VMultipleScattering.hh.

Referenced by AlongStepDoIt(), G4VMultipleScattering(), and PostStepDoIt().

G4GPILSelection G4VMultipleScattering::valueGPILSelectionMSC [protected]

Definition at line 282 of file G4VMultipleScattering.hh.


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:51 2013 for Geant4 by  doxygen 1.4.7