#include <G4CoulombScattering.hh>
Inheritance diagram for G4CoulombScattering:
Public Member Functions | |
G4CoulombScattering (const G4String &name="CoulombScat") | |
virtual | ~G4CoulombScattering () |
virtual G4bool | IsApplicable (const G4ParticleDefinition &p) |
virtual void | PrintInfo () |
Protected Member Functions | |
virtual void | InitialiseProcess (const G4ParticleDefinition *) |
virtual G4double | MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *) |
Definition at line 55 of file G4CoulombScattering.hh.
G4CoulombScattering::G4CoulombScattering | ( | const G4String & | name = "CoulombScat" |
) |
Definition at line 60 of file G4CoulombScattering.cc.
References fCoulombScattering, G4Proton::Proton(), G4VEmProcess::SetBuildTableFlag(), G4VEmProcess::SetIntegral(), G4VProcess::SetProcessSubType(), G4VEmProcess::SetSecondaryParticle(), G4VEmProcess::SetSplineFlag(), and G4VEmProcess::SetStartFromNullFlag().
00061 : G4VEmProcess(name),q2Max(TeV*TeV),isInitialised(false) 00062 { 00063 // G4cout << "G4CoulombScattering constructor "<< G4endl; 00064 SetBuildTableFlag(true); 00065 SetStartFromNullFlag(false); 00066 SetIntegral(true); 00067 SetSecondaryParticle(G4Proton::Proton()); 00068 SetProcessSubType(fCoulombScattering); 00069 SetSplineFlag(true); 00070 }
G4CoulombScattering::~G4CoulombScattering | ( | ) | [virtual] |
void G4CoulombScattering::InitialiseProcess | ( | const G4ParticleDefinition * | ) | [protected, virtual] |
Implements G4VEmProcess.
Definition at line 86 of file G4CoulombScattering.cc.
References G4VEmProcess::AddEmModel(), G4VEmProcess::EmModel(), G4LossTableManager::FactorForAngleLimit(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetParticleType(), G4ParticleDefinition::GetPDGMass(), G4VEmModel::HighEnergyLimit(), G4LossTableManager::Instance(), G4VEmModel::LowEnergyLimit(), G4VEmProcess::MaxKinEnergy(), G4VEmProcess::MinKinEnergy(), G4INCL::Math::pi, G4VEmProcess::PolarAngleLimit(), G4VEmProcess::SetBuildTableFlag(), G4VEmProcess::SetEmModel(), G4VEmModel::SetHighEnergyLimit(), G4VEmModel::SetLowEnergyLimit(), G4VEmModel::SetPolarAngleLimit(), G4VEmProcess::SetStartFromNullFlag(), and G4VProcess::SetVerboseLevel().
00087 { 00088 // second initialisation not allowed for the time being 00089 // this means that polar angle limit change will not be appled 00090 // after first initialisation 00091 if(isInitialised) { return; } 00092 00093 G4double a = G4LossTableManager::Instance()->FactorForAngleLimit() 00094 *CLHEP::hbarc/CLHEP::fermi; 00095 q2Max = 0.5*a*a; 00096 G4double theta = PolarAngleLimit(); 00097 00098 // restricted or non-restricted cross section table 00099 G4bool yes = false; 00100 if(theta == CLHEP::pi) { yes = true; } 00101 SetStartFromNullFlag(yes); 00102 /* 00103 G4cout << "### G4CoulombScattering::InitialiseProcess: " 00104 << p->GetParticleName() 00105 << " Emin(MeV)= " << MinKinEnergy()/MeV 00106 << " Emax(TeV)= " << MaxKinEnergy()/TeV 00107 << " nbins= " << LambdaBinning() 00108 << " theta= " << theta 00109 << G4endl; 00110 */ 00111 /* 00112 // second initialisation 00113 if(isInitialised) { 00114 G4VEmModel* mod = EmModel(1); 00115 mod->SetPolarAngleLimit(theta); 00116 mod = GetModelByIndex(1); 00117 if(mod) { mod->SetPolarAngleLimit(theta); } 00118 00119 // first initialisation 00120 } else { 00121 */ 00122 00123 isInitialised = true; 00124 G4double mass = p->GetPDGMass(); 00125 G4String name = p->GetParticleName(); 00126 //G4cout << name << " type: " << p->GetParticleType() 00127 //<< " mass= " << mass << G4endl; 00128 if (mass > GeV || p->GetParticleType() == "nucleus") { 00129 SetBuildTableFlag(false); 00130 if(name != "GenericIon") { SetVerboseLevel(0); } 00131 } else { 00132 if(name != "e-" && name != "e+" && 00133 name != "mu+" && name != "mu-" && name != "pi+" && 00134 name != "kaon+" && name != "proton" ) { SetVerboseLevel(0); } 00135 } 00136 00137 if(!EmModel(1)) { SetEmModel(new G4eCoulombScatteringModel(), 1); } 00138 G4VEmModel* model = EmModel(1); 00139 G4double emin = std::max(MinKinEnergy(),model->LowEnergyLimit()); 00140 G4double emax = std::min(MaxKinEnergy(),model->HighEnergyLimit()); 00141 model->SetPolarAngleLimit(theta); 00142 model->SetLowEnergyLimit(emin); 00143 model->SetHighEnergyLimit(emax); 00144 AddEmModel(1, model); 00145 }
G4bool G4CoulombScattering::IsApplicable | ( | const G4ParticleDefinition & | p | ) | [virtual] |
Implements G4VEmProcess.
Definition at line 79 of file G4CoulombScattering.cc.
References G4ParticleDefinition::GetPDGCharge(), and G4ParticleDefinition::IsShortLived().
00080 { 00081 return (p.GetPDGCharge() != 0.0 && !p.IsShortLived()); 00082 }
G4double G4CoulombScattering::MinPrimaryEnergy | ( | const G4ParticleDefinition * | , | |
const G4Material * | ||||
) | [protected, virtual] |
Reimplemented from G4VEmProcess.
Definition at line 149 of file G4CoulombScattering.cc.
References G4IonisParamMat::GetInvA23(), G4Material::GetIonisation(), G4ParticleDefinition::GetPDGMass(), and G4VEmProcess::PolarAngleLimit().
00151 { 00152 // Pure Coulomb scattering 00153 G4double emin = 0.0; 00154 00155 // Coulomb scattering combined with multiple or hadronic scattering 00156 G4double theta = PolarAngleLimit(); 00157 if(0.0 < theta) { 00158 G4double p2 = q2Max*mat->GetIonisation()->GetInvA23()/(1.0 - cos(theta)); 00159 G4double mass = part->GetPDGMass(); 00160 emin = sqrt(p2 + mass*mass) - mass; 00161 } 00162 00163 return emin; 00164 }
void G4CoulombScattering::PrintInfo | ( | ) | [virtual] |
Implements G4VEmProcess.
Definition at line 168 of file G4CoulombScattering.cc.
References DBL_MAX, G4cout, G4endl, and G4VEmProcess::PolarAngleLimit().
00169 { 00170 G4cout << " " << PolarAngleLimit()/degree 00171 << " < Theta(degree) < 180"; 00172 00173 if(q2Max < DBL_MAX) { G4cout << "; pLimit(GeV^1)= " << sqrt(q2Max)/GeV; } 00174 G4cout << G4endl; 00175 }