Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4IonCoulombScatteringModel Class Reference

#include <G4IonCoulombScatteringModel.hh>

Inheritance diagram for G4IonCoulombScatteringModel:
Collaboration diagram for G4IonCoulombScatteringModel:

Public Member Functions

 G4IonCoulombScatteringModel (const G4String &nam="IonCoulombScattering")
 
virtual ~G4IonCoulombScatteringModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &) final
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) final
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) final
 
void SetRecoilThreshold (G4double eth)
 
void SetHeavyIonCorr (G4int b)
 
G4int GetHeavyIonCorr ()
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector
< G4EmElementSelector * > * 
GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
virtual G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
- Static Protected Attributes inherited from G4VEmModel
static const G4double inveplus = 1.0/CLHEP::eplus
 

Detailed Description

Definition at line 71 of file G4IonCoulombScatteringModel.hh.

Constructor & Destructor Documentation

G4IonCoulombScatteringModel::G4IonCoulombScatteringModel ( const G4String nam = "IonCoulombScattering")
explicit

Definition at line 75 of file G4IonCoulombScatteringModel.cc.

76  : G4VEmModel(nam),
77  cosThetaMin(1.0)
78 {
79  fNistManager = G4NistManager::Instance();
81  theProton = G4Proton::Proton();
82 
83  pCuts = nullptr;
84  currentMaterial = nullptr;
85  currentElement = nullptr;
86  currentCouple = nullptr;
87  fParticleChange = nullptr;
88 
89  recoilThreshold = 0.*eV;
90  heavycorr =0;
91  particle = 0;
92  mass=0;
93  currentMaterialIndex = -1;
94 
95  ioncross = new G4IonCoulombCrossSection();
96 }
static G4NistManager * Instance()
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:68
G4IonTable * GetIonTable() const
static G4Proton * Proton()
Definition: G4Proton.cc:93
static constexpr double eV
Definition: G4SIunits.hh:215
static G4ParticleTable * GetParticleTable()

Here is the call graph for this function:

G4IonCoulombScatteringModel::~G4IonCoulombScatteringModel ( )
virtual

Definition at line 101 of file G4IonCoulombScatteringModel.cc.

102 {
103  delete ioncross;
104 }

Member Function Documentation

G4double G4IonCoulombScatteringModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition p,
G4double  kinEnergy,
G4double  Z,
G4double  A,
G4double  cut,
G4double  emax 
)
finalvirtual

Reimplemented from G4VEmModel.

Definition at line 125 of file G4IonCoulombScatteringModel.cc.

130 {
131  SetupParticle(p);
132 
133  G4double cross = 0.0;
134 
135  DefineMaterial(CurrentCouple());
136 
137  G4int iz = G4lrint(Z);
138 
139  //from lab to pCM & mu_rel of effective particle
140  G4double tmass = proton_mass_c2;
141  if(1 < iz) {
142  tmass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
143  }
144  ioncross->SetupKinematic(kinEnergy, tmass);
145  ioncross->SetupTarget(Z, kinEnergy, heavycorr);
146  cross = ioncross->NuclearCrossSection();
147 
148  //cout<< "..........cross "<<G4BestUnit(cross,"Surface") <<endl;
149  return cross;
150 }
void SetupTarget(G4double Z, G4double kinEnergy, G4int heavycorr)
void SetupKinematic(G4double kinEnergy, G4double tmass)
static constexpr double proton_mass_c2
int G4int
Definition: G4Types.hh:78
const G4MaterialCutsCouple * CurrentCouple() const
Definition: G4VEmModel.hh:451
static constexpr double amu_c2
int G4lrint(double ad)
Definition: templates.hh:163
G4double GetAtomicMassAmu(const G4String &symb) const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4int G4IonCoulombScatteringModel::GetHeavyIonCorr ( )
inline

Definition at line 183 of file G4IonCoulombScatteringModel.hh.

184 {
185  return heavycorr;
186 }
void G4IonCoulombScatteringModel::Initialise ( const G4ParticleDefinition p,
const G4DataVector cuts 
)
finalvirtual

Implements G4VEmModel.

Definition at line 108 of file G4IonCoulombScatteringModel.cc.

110 {
111  SetupParticle(p);
112  currentCouple = 0;
113  currentMaterialIndex = -1;
114  ioncross->Initialise(p,cosThetaMin);
115 
116  pCuts = &cuts;
117  // G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
118  if(!fParticleChange) {
119  fParticleChange = GetParticleChangeForGamma();
120  }
121 }
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:132
void Initialise(const G4ParticleDefinition *, G4double cosThetaLim)

Here is the call graph for this function:

void G4IonCoulombScatteringModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple couple,
const G4DynamicParticle dp,
G4double  tmin,
G4double  maxEnergy 
)
finalvirtual

Implements G4VEmModel.

Definition at line 154 of file G4IonCoulombScatteringModel.cc.

159 {
160  G4double kinEnergy = dp->GetKineticEnergy();
161 
162  DefineMaterial(couple);
163 
164  SetupParticle(dp->GetDefinition());
165 
166  // Choose nucleus
167  currentElement = SelectRandomAtom(couple, particle, kinEnergy);
168 
169  G4int iz = currentElement->GetZasInt();
170  G4int ia = SelectIsotopeNumber(currentElement);
172 
173  ioncross->SetupKinematic(kinEnergy, mass2);
174 
175  ioncross->SetupTarget(currentElement->GetZ(), kinEnergy, heavycorr);
176 
177  //scattering angle, z1 == (1-cost)
178  G4double z1 = ioncross->SampleCosineTheta();
179  if(z1 > 2.0) { z1 = 2.0; }
180  else if(z1 < 0.0) { z1 = 0.0; }
181 
182  G4double cost = 1.0 - z1;
183  G4double sint = sqrt(z1*(1.0 + cost));
184  G4double phi = twopi * G4UniformRand();
185 
186  // kinematics in the Lab system
187  G4double ptot = dp->GetTotalMomentum();
188  G4double e1 = dp->GetTotalEnergy();
189 
190  // Lab. system kinematics along projectile direction
191  G4LorentzVector v0 = G4LorentzVector(0, 0, ptot, e1);
192  G4double bet = ptot/(e1 + mass2);
193  G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
194 
195  // CM projectile
196  G4double momCM = gam*(ptot - bet*e1);
197  G4double eCM = gam*(e1 - bet*ptot);
198 
199  // Momentum after scattering of incident particle
200  G4double pxCM = momCM*sint*cos(phi);
201  G4double pyCM = momCM*sint*sin(phi);
202  G4double pzCM = momCM*cost;
203 
204  // CM--->Lab
205  G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
206 
207  // Rotate to global system
208  G4ThreeVector dir = dp->GetMomentumDirection();
209  G4ThreeVector newDirection = v1.vect().unit();
210  newDirection.rotateUz(dir);
211 
212  fParticleChange->ProposeMomentumDirection(newDirection);
213 
214  // recoil v0 energy is kinetic
215  v0 -= v1;
216  G4double trec = v0.e();
217  G4double edep = 0.0;
218 
219  G4double tcut = recoilThreshold;
220  if(pCuts) {
221  tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]);
222  //G4cout<<" tcut eV "<<tcut/eV<<endl;
223  }
224 
225  // Recoil
226  if(trec > tcut) {
227  G4ParticleDefinition* ion = theIonTable->GetIon(iz, ia, 0);
228  newDirection = v0.vect().unit();
229  newDirection.rotateUz(dir);
230  G4DynamicParticle* newdp = new G4DynamicParticle(ion, newDirection, trec);
231  fvect->push_back(newdp);
232  } else if(trec > 0.0) {
233  edep = trec;
234  fParticleChange->ProposeNonIonizingEnergyDeposit(edep);
235  }
236 
237  // finelize primary energy and energy balance
238  G4double finalT = v1.e() - mass;
239  if(finalT < 0.0) {
240  edep += finalT;
241  finalT = 0.0;
242  }
243  edep = std::max(edep, 0.0);
244  fParticleChange->SetProposedKineticEnergy(finalT);
245  fParticleChange->ProposeLocalEnergyDeposit(edep);
246 }
void SetupTarget(G4double Z, G4double kinEnergy, G4int heavycorr)
static G4double GetNuclearMass(const G4double A, const G4double Z)
void SetupKinematic(G4double kinEnergy, G4double tmass)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:503
G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static constexpr double twopi
Definition: G4SIunits.hh:76
G4double GetTotalMomentum() const
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:97
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:38
G4int SelectIsotopeNumber(const G4Element *)
Definition: G4VEmModel.hh:584
T max(const T t1, const T t2)
brief Return the largest of the two arguments
Hep3Vector unit() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
double G4double
Definition: G4Types.hh:76
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:541
CLHEP::HepLorentzVector G4LorentzVector

Here is the call graph for this function:

void G4IonCoulombScatteringModel::SetHeavyIonCorr ( G4int  b)
inline

Definition at line 176 of file G4IonCoulombScatteringModel.hh.

177 {
178  heavycorr = b;
179 }
void G4IonCoulombScatteringModel::SetRecoilThreshold ( G4double  eth)
inline

Definition at line 169 of file G4IonCoulombScatteringModel.hh.

170 {
171  recoilThreshold = eth;
172 }

The documentation for this class was generated from the following files: