Geant4  10.01.p02
G4IonCoulombScatteringModel.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // G4IonCoulombScatteringModel.cc
27 // -------------------------------------------------------------------
28 //
29 // GEANT4 Class header file
30 //
31 // File name: G4IonCoulombScatteringModel
32 //
33 // Author: Cristina Consolandi
34 //
35 // Creation date: 05.10.2010 from G4eCoulombScatteringModel
36 // & G4CoulombScatteringModel
37 //
38 // Class Description:
39 // Single Scattering Model for
40 // for protons, alpha and heavy Ions
41 //
42 // Reference:
43 // M.J. Boschini et al. "Nuclear and Non-Ionizing Energy-Loss
44 // for Coulomb ScatteredParticles from Low Energy up to Relativistic
45 // Regime in Space Radiation Environment"
46 // Accepted for publication in the Proceedings of the ICATPP Conference
47 // on Cosmic Rays for Particle and Astroparticle Physics, Villa Olmo, 7-8
48 // October, 2010, to be published by World Scientific (Singapore).
49 //
50 // Available for downloading at:
51 // http://arxiv.org/abs/1011.4822
52 //
53 // -------------------------------------------------------------------
54 //
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56 
57 
59 #include "G4PhysicalConstants.hh"
60 #include "G4SystemOfUnits.hh"
61 #include "Randomize.hh"
63 #include "G4Proton.hh"
64 #include "G4ProductionCutsTable.hh"
65 #include "G4NucleiProperties.hh"
66 #include "G4ParticleTable.hh"
67 #include "G4IonTable.hh"
68 
69 #include "G4UnitsTable.hh"
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
72 
73 using namespace std;
74 
76  : G4VEmModel(nam),
77  cosThetaMin(1.0),
78  isInitialised(false)
79 {
83 
84  pCuts=0;
85  currentMaterial = 0;
86  currentElement = 0;
87  currentCouple = 0;
88  fParticleChange = 0;
89 
90  lowEnergyLimit = 100*eV;
91  recoilThreshold = 0.*eV;
92  heavycorr =0;
93  particle = 0;
94  mass=0;
96 
98 }
99 
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
102 
104 {
105  delete ioncross;
106 }
107 
108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
109 
111  const G4DataVector& cuts)
112 {
113  SetupParticle(p);
114  currentCouple = 0;
117 
118  pCuts = &cuts;
119  // G4ProductionCutsTable::GetProductionCutsTable()->GetEnergyCutsVector(3);
120  if(!isInitialised) {
121  isInitialised = true;
123  }
124 }
125 
126 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127 
129  const G4ParticleDefinition* p,
130  G4double kinEnergy,
131  G4double Z,
132  G4double,
133  G4double cutEnergy,
134  G4double)
135 {
136  SetupParticle(p);
137 
138  G4double cross = 0.0;
139  if(kinEnergy > lowEnergyLimit) {
140 
142 
143  G4int iz = G4int(Z);
144 
145  //from lab to pCM & mu_rel of effective particle
146  G4double tmass = proton_mass_c2;
147  if(1 < iz) {
148  tmass = fNistManager->GetAtomicMassAmu(iz)*amu_c2;
149  }
150  ioncross->SetupKinematic(kinEnergy, cutEnergy, tmass);
151 
152  ioncross->SetupTarget(Z, kinEnergy, heavycorr);
153 
154  cross = ioncross->NuclearCrossSection();
155  }
156  //cout<< "..........cross "<<G4BestUnit(cross,"Surface") <<endl;
157  return cross;
158 }
159 
160 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
161 
163  std::vector<G4DynamicParticle*>* fvect,
164  const G4MaterialCutsCouple* couple,
165  const G4DynamicParticle* dp,
166  G4double cutEnergy,
167  G4double)
168 {
169  G4double kinEnergy = dp->GetKineticEnergy();
170 
171  if(kinEnergy <= lowEnergyLimit) return;
172 
173  DefineMaterial(couple);
174 
176 
177  // Choose nucleus
179  kinEnergy,cutEnergy,kinEnergy);
180 
181  G4double Z = currentElement->GetZ();
182  G4int iz = G4int(Z);
183  G4int ia = SelectIsotopeNumber(currentElement);
185 
186  ioncross->SetupKinematic(kinEnergy, cutEnergy, mass2);
187 
188  ioncross->SetupTarget(Z, kinEnergy, heavycorr);
189 
190  //scattering angle, z1 == (1-cost)
192  if(z1 > 2.0) { z1 = 2.0; }
193  else if(z1 < 0.0) { z1 = 0.0; }
194 
195  G4double cost = 1.0 - z1;
196  G4double sint = sqrt(z1*(1.0 + cost));
197  G4double phi = twopi * G4UniformRand();
198 
199  G4LorentzVector v0 = dp->Get4Momentum();
200 
201  // kinematics in the Lab system
202  G4double etot = v0.e();
203  G4double ptot = v0.mag();
204 
205  //CM particle 1
206  G4double bet = ptot/(etot + mass2);
207  G4double gam = 1.0/sqrt((1.0 - bet)*(1.0 + bet));
208 
209  //CM
210  G4double momCM = gam*(ptot - bet*etot);
211  G4double eCM = gam*(etot - bet*ptot);
212  //energy & momentum after scattering of incident particle
213  G4double pxCM = momCM*sint*cos(phi);
214  G4double pyCM = momCM*sint*sin(phi);
215  G4double pzCM = momCM*cost;
216 
217  //CM--->Lab
218  G4LorentzVector v1(pxCM , pyCM, gam*(pzCM + bet*eCM), gam*(eCM + bet*pzCM));
219 
220  G4ThreeVector dir = dp->GetMomentumDirection();
221  G4ThreeVector newDirection = v1.vect().unit();
222  newDirection.rotateUz(dir);
223 
225 
226  // recoil
227  v0 -= v1;
228  G4double trec = v0.e() - mass2;
229  G4double edep = 0.0;
230 
231  G4double tcut = recoilThreshold;
232  if(pCuts) {
233  tcut= std::max(tcut,(*pCuts)[currentMaterialIndex]);
234  //G4cout<<" tcut eV "<<tcut/eV<<endl;
235  }
236 
237  if(trec > tcut) {
239  G4DynamicParticle* newdp = new G4DynamicParticle(ion, v0);
240  fvect->push_back(newdp);
241  } else if(trec > 0.0) {
242  edep = trec;
244  }
245 
246  // finelize primary energy and energy balance
247  G4double finalT = v1.e() - mass;
248  if(finalT <= lowEnergyLimit) {
249  edep += finalT;
250  finalT = 0.0;
251  if(edep < 0.0) { edep = 0.0; }
252  }
255 }
256 
257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
258 
void SetupTarget(G4double Z, G4double kinEnergy, G4int heavycorr)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:463
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax)
const std::vector< G4double > * pCuts
G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4ParticleChangeForGamma * fParticleChange
G4IonCoulombScatteringModel(const G4String &nam="IonCoulombScattering")
G4IonTable * GetIonTable() const
const G4MaterialCutsCouple * CurrentCouple() const
Definition: G4VEmModel.hh:434
#define G4UniformRand()
Definition: Randomize.hh:93
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
const G4ThreeVector & GetMomentumDirection() const
G4double iz
Definition: TRTMaterials.hh:39
static G4Proton * Proton()
Definition: G4Proton.cc:93
G4int SelectIsotopeNumber(const G4Element *)
Definition: G4VEmModel.hh:567
const G4ParticleDefinition * theProton
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4LorentzVector Get4Momentum() const
static const double eV
Definition: G4SIunits.hh:194
static G4ParticleTable * GetParticleTable()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4ParticleDefinition * particle
G4double GetAtomicMassAmu(const G4String &symb) const
void DefineMaterial(const G4MaterialCutsCouple *)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetupKinematic(G4double kinEnergy, G4double cut, G4double tmass)
void SetupParticle(const G4ParticleDefinition *)
const G4MaterialCutsCouple * currentCouple
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:526
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:134
CLHEP::HepLorentzVector G4LorentzVector
void Initialise(const G4ParticleDefinition *, G4double cosThetaLim)