Ignore:
Timestamp:
Apr 6, 2009, 12:21:12 PM (15 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/electromagnetic/standard/src/G4hMultipleScattering.cc

    r819 r961  
    2424// ********************************************************************
    2525//
    26 // $Id: G4hMultipleScattering.cc,v 1.7 2007/12/07 17:35:52 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     26// $Id: G4hMultipleScattering.cc,v 1.13 2008/10/15 17:53:44 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2828//
    2929// -----------------------------------------------------------------------------
     
    5858  : G4VMultipleScattering(processName)
    5959{
    60   dtrl              = 0.05;
    61   lambdalimit       = 1.*mm;
    62  
    63   samplez           = false ;
    64   isInitialized     = false; 
    65 
    66   SetLateralDisplasmentFlag(true);
    67   SetSkin(0.0);
    68   SetRangeFactor(0.2);
    69   SetGeomFactor(0.1);
     60  isInitialized = false; 
     61  isIon         = false;
    7062  SetStepLimitType(fMinimal);
    7163}
     
    8981  // Modification of parameters between runs
    9082  if(isInitialized) {
    91     if (p->GetParticleType() != "nucleus") {
     83    if (p->GetParticleType() != "nucleus" && p->GetPDGMass() < GeV) {
    9284      mscUrban->SetStepLimitType(StepLimitType());
    9385      mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
     
    9991  }
    10092
     93  // defaults for ions, which cannot be overwritten
     94  if (p->GetParticleType() == "nucleus" || p->GetPDGMass() > GeV) {
     95    SetStepLimitType(fMinimal);
     96    SetLateralDisplasmentFlag(false);
     97    SetBuildLambdaTable(false);
     98    if(p->GetParticleType() == "nucleus") isIon = true;
     99  }
     100
    101101  // initialisation of parameters
    102102  G4String part_name = p->GetParticleName();
    103   mscUrban = new G4UrbanMscModel90(RangeFactor(),dtrl,lambdalimit,
    104                                  GeomFactor(),Skin(),
    105                                  samplez,StepLimitType());
     103  mscUrban = new G4UrbanMscModel90();
     104
     105  mscUrban->SetStepLimitType(StepLimitType());
    106106  mscUrban->SetLateralDisplasmentFlag(LateralDisplasmentFlag());
     107  mscUrban->SetSkin(Skin());
     108  mscUrban->SetRangeFactor(RangeFactor());
     109  mscUrban->SetGeomFactor(GeomFactor());
    107110
    108   if (p->GetParticleType() == "nucleus") {
    109     mscUrban->SetStepLimitType(fMinimal);
    110     SetLateralDisplasmentFlag(false);
    111     SetBuildLambdaTable(false);
    112     SetSkin(0.0);
    113     SetRangeFactor(0.2);
    114   }
    115111  AddEmModel(1,mscUrban);
    116112  isInitialized = true;
     
    121117void G4hMultipleScattering::PrintInfo()
    122118{
    123   G4cout << "      Boundary/stepping algorithm is active with RangeFactor= "
    124          << RangeFactor()
    125          << "  Step limit type " << StepLimitType()
     119  G4cout << "      RangeFactor= " << RangeFactor()
     120         << ", step limit type: " << StepLimitType()
     121         << ", lateralDisplacement: " << LateralDisplasmentFlag()
     122         << ", skin= " << Skin() 
     123    //   << ", geomFactor= " << GeomFactor() 
    126124         << G4endl;
    127125}
     
    129127//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    130128
     129G4double G4hMultipleScattering::AlongStepGetPhysicalInteractionLength(
     130                             const G4Track& track,
     131                             G4double,
     132                             G4double currentMinimalStep,
     133                             G4double& currentSafety,
     134                             G4GPILSelection* selection)
     135{
     136  // get Step limit proposed by the process
     137  valueGPILSelectionMSC = NotCandidateForSelection;
     138
     139  G4double escaled = track.GetKineticEnergy();
     140  if(isIon) escaled *= track.GetDynamicParticle()->GetMass()/proton_mass_c2;
     141
     142  G4double steplength = GetMscContinuousStepLimit(track,
     143                                                  escaled,
     144                                                  currentMinimalStep,
     145                                                  currentSafety);
     146  // G4cout << "StepLimit= " << steplength << G4endl;
     147  // set return value for G4GPILSelection
     148  *selection = valueGPILSelectionMSC;
     149  return  steplength;
     150}
     151
     152//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     153
Note: See TracChangeset for help on using the changeset viewer.