Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronElectronElModel Class Reference

#include <G4NeutronElectronElModel.hh>

+ Inheritance diagram for G4NeutronElectronElModel:

Public Member Functions

 G4NeutronElectronElModel (const G4String &name="n-e-elastic")
 
virtual ~G4NeutronElectronElModel ()
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
void Initialise ()
 
G4double XscIntegrand (G4double x)
 
G4double CalculateAm (G4double momentum)
 
G4double GetAm ()
 
G4double SampleSin2HalfTheta (G4double Tkin)
 
G4double GetTransfer (G4int iTkin, G4int iTransfer, G4double position)
 
void SetCutEnergy (G4double ec)
 
G4double GetCutEnergy ()
 
virtual void ModelDescription (std::ostream &) const
 
- Public Member Functions inherited from G4HadronElastic
 G4HadronElastic (const G4String &name="hElasticLHEP")
 
 ~G4HadronElastic () override
 
G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A) override
 
G4double GetSlopeCof (const G4int pdg)
 
void SetLowestEnergyLimit (G4double value)
 
G4double LowestEnergyLimit () const
 
G4double ComputeMomentumCMS (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
 
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
 
G4bool operator== (const G4HadronicInteraction &right) const =delete
 
G4bool operator!= (const G4HadronicInteraction &right) const =delete
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4HadronElastic
G4double pLocalTmax
 
G4int secID
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 51 of file G4NeutronElectronElModel.hh.

Constructor & Destructor Documentation

◆ G4NeutronElectronElModel()

G4NeutronElectronElModel::G4NeutronElectronElModel ( const G4String & name = "n-e-elastic")

Definition at line 49 of file G4NeutronElectronElModel.cc.

50 : G4HadronElastic(name)
51{
52 secID = G4PhysicsModelCatalog::GetModelID( "model_" + name );
53
54 // neutron magneton squared
55
56 fM = neutron_mass_c2; // neutron mass
57 fM2 = fM*fM;
58 fme = electron_mass_c2;
59 fme2 = fme*fme;
60 fMv2 = 0.7056*GeV*GeV;
61
62 SetMinEnergy( 0.001*GeV );
63 SetMaxEnergy( 10.*TeV );
64 SetLowestEnergyLimit(1.e-6*eV);
65
66 theElectron = G4Electron::Electron();
67 // PDG2016: sin^2 theta Weinberg
68
69 fEnergyBin = 200;
70 fMinEnergy = 1.*MeV;
71 fMaxEnergy = 10000.*GeV;
72 fEnergyVector = new G4PhysicsLogVector(fMinEnergy, fMaxEnergy, fEnergyBin, false);
73
74 fAngleBin = 500;
75 fAngleTable = 0;
76
77 fCutEnergy = 0.; // default value
78
79 Initialise();
80}
static G4Electron * Electron()
Definition G4Electron.cc:91
G4HadronElastic(const G4String &name="hElasticLHEP")
void SetLowestEnergyLimit(G4double value)
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4int GetModelID(const G4int modelIndex)

Referenced by Initialise().

◆ ~G4NeutronElectronElModel()

G4NeutronElectronElModel::~G4NeutronElectronElModel ( )
virtual

Definition at line 84 of file G4NeutronElectronElModel.cc.

85{
86 if( fEnergyVector )
87 {
88 delete fEnergyVector;
89 fEnergyVector = nullptr;
90 }
91 if( fAngleTable )
92 {
93 fAngleTable->clearAndDestroy();
94 delete fAngleTable;
95 fAngleTable = nullptr;
96 }
97}
void clearAndDestroy()

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4NeutronElectronElModel::ApplyYourself ( const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus )
virtual

Reimplemented from G4HadronElastic.

Definition at line 262 of file G4NeutronElectronElModel.cc.

264{
266
267 const G4HadProjectile* aParticle = &aTrack;
268 G4double Tkin = aParticle->GetKineticEnergy();
269 fAm = CalculateAm( Tkin);
270 // G4double En = aParticle->GetTotalEnergy();
271
272 if( Tkin <= LowestEnergyLimit() )
273 {
276 return &theParticleChange;
277 }
278 // sample e-scattering angle and make final state in lab frame
279
280 G4double sin2ht = SampleSin2HalfTheta( Tkin); // in n-rrest frame
281
282 // G4cout<<"sin2ht = "<<sin2ht<<G4endl;
283
284 G4double eTkin = fee; // fM;
285
286 eTkin /= 1.+2.*fee*sin2ht/fM; // fme/En + 2*sin2ht;
287
288 eTkin -= fme;
289
290 // G4cout<<"eTkin = "<<eTkin<<G4endl;
291
292 if( eTkin > fCutEnergy )
293 {
294 G4double ePlab = sqrt( eTkin*(eTkin + 2.*fme) );
295
296 // G4cout<<"ePlab = "<<ePlab<<G4endl;
297
298 G4double cost = 1. - 2*sin2ht;
299
300 if( cost > 1. ) cost = 1.;
301 if( cost < -1. ) cost = -1.;
302
303 G4double sint = std::sqrt( (1.0 - cost)*(1.0 + cost) );
304 G4double phi = G4UniformRand()*CLHEP::twopi;
305
306 G4ThreeVector eP( sint*std::cos(phi), sint*std::sin(phi), cost );
307 eP *= ePlab;
308 G4LorentzVector lvt2( eP, eTkin + electron_mass_c2 ); // recoil e- in n-rest frame
309
310 G4LorentzVector lvp1 = aParticle->Get4Momentum();
311 G4LorentzVector lvt1(0.,0.,0.,electron_mass_c2);
312 G4LorentzVector lvsum = lvp1+lvt1;
313
314 G4ThreeVector bst = lvp1.boostVector();
315 lvt2.boost(bst);
316
317 // G4cout<<"lvt2 = "<<lvt2<<G4endl;
318
319 G4DynamicParticle * aSec = new G4DynamicParticle( theElectron, lvt2 );
321
322 G4LorentzVector lvp2 = lvsum-lvt2;
323
324 // G4cout<<"lvp2 = "<<lvp2<<G4endl;
325
326 G4double Tkin2 = lvp2.e()-aParticle->GetDefinition()->GetPDGMass();
329 }
330 else if( eTkin > 0.0 )
331 {
333 Tkin -= eTkin;
334
335 if( Tkin > 0. )
336 {
339 }
340 }
341 else
342 {
345 }
346 return &theParticleChange;
347}
double G4double
Definition G4Types.hh:83
#define G4UniformRand()
Definition Randomize.hh:52
Hep3Vector unit() const
Hep3Vector boostVector() const
Hep3Vector vect() const
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
void SetLocalEnergyDeposit(G4double aE)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double LowestEnergyLimit() const
G4double SampleSin2HalfTheta(G4double Tkin)
G4double CalculateAm(G4double momentum)

◆ CalculateAm()

G4double G4NeutronElectronElModel::CalculateAm ( G4double momentum)
inline

Definition at line 101 of file G4NeutronElectronElModel.hh.

102{
103 fee = (Tkin+fM)*fme/fM;
104 // G4cout<<"fee = "<<fee<<" MeV"<<G4endl;
105 fee2 = fee*fee;
106 G4double momentum = std::sqrt( fee2 - fme2 );
107 G4double k = momentum/CLHEP::hbarc;
108 G4double ch = 1.13;
109 G4double zn = 1.77*k*CLHEP::Bohr_radius;
110 G4double zn2 = zn*zn;
111 fAm = ch/zn2;
112
113 return fAm;
114}

Referenced by ApplyYourself(), and Initialise().

◆ GetAm()

G4double G4NeutronElectronElModel::GetAm ( )
inline

Definition at line 71 of file G4NeutronElectronElModel.hh.

71{return fAm;};

◆ GetCutEnergy()

G4double G4NeutronElectronElModel::GetCutEnergy ( )
inline

Definition at line 80 of file G4NeutronElectronElModel.hh.

80{return fCutEnergy;};

◆ GetTransfer()

G4double G4NeutronElectronElModel::GetTransfer ( G4int iTkin,
G4int iTransfer,
G4double position )

Definition at line 194 of file G4NeutronElectronElModel.cc.

195{
196 G4double x1, x2, y1, y2, randTransfer, delta, mean, epsilon = 1.e-6;
197
198 if( iTransfer == 0 || iTransfer == fAngleBin-1 )
199 {
200 randTransfer = (*fAngleTable)(iTkin)->Energy(iTransfer);
201 }
202 else
203 {
204 if ( iTransfer >= G4int((*fAngleTable)(iTkin)->GetVectorLength()) )
205 {
206 iTransfer = G4int((*fAngleTable)(iTkin)->GetVectorLength() - 1);
207 }
208 y1 = (*(*fAngleTable)(iTkin))(iTransfer-1);
209 y2 = (*(*fAngleTable)(iTkin))(iTransfer);
210
211 x1 = (*fAngleTable)(iTkin)->Energy(iTransfer-1);
212 x2 = (*fAngleTable)(iTkin)->Energy(iTransfer);
213
214 delta = y2 - y1;
215 mean = y2 + y1;
216
217 if ( x1 == x2 ) randTransfer = x2;
218 else
219 {
220 if ( delta < epsilon*mean )
221 {
222 randTransfer = x1 + ( x2 - x1 )*G4UniformRand();
223 }
224 else
225 {
226 randTransfer = x1 + ( position - y1 )*( x2 - x1 )/delta; // ( y2 - y1 );
227 }
228 }
229 }
230 return randTransfer;
231}
G4double epsilon(G4double density, G4double temperature)
int G4int
Definition G4Types.hh:85

Referenced by SampleSin2HalfTheta().

◆ Initialise()

void G4NeutronElectronElModel::Initialise ( )

Definition at line 120 of file G4NeutronElectronElModel.cc.

121{
122 G4double result = 0., sum, Tkin, dt, t1, t2;
123 G4int iTkin, jTransfer;
125
126 fAngleTable = new G4PhysicsTable(fEnergyBin);
127
128 for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
129 {
130 Tkin = fEnergyVector->GetLowEdgeEnergy(iTkin);
131 fAm = CalculateAm(Tkin);
132 dt = 1./fAngleBin;
133
134 G4PhysicsFreeVector* vectorT = new G4PhysicsFreeVector(fAngleBin);
135
136 sum = 0.;
137
138 for( jTransfer = 0; jTransfer < fAngleBin; jTransfer++)
139 {
140 t1 = dt*jTransfer;
141 t2 = t1 + dt;
142
143 result = integral.Legendre96( this, &G4NeutronElectronElModel::XscIntegrand, t1, t2 );
144
145 sum += result;
146 // G4cout<<sum<<", ";
147 vectorT->PutValue(jTransfer, t1, sum);
148 }
149 // G4cout<<G4endl;
150 fAngleTable->insertAt(iTkin,vectorT);
151 }
152 return;
153}
G4NeutronElectronElModel(const G4String &name="n-e-elastic")
void PutValue(const std::size_t index, const G4double e, const G4double value)
G4double GetLowEdgeEnergy(const std::size_t index) const

Referenced by G4NeutronElectronElModel().

◆ IsApplicable()

G4bool G4NeutronElectronElModel::IsApplicable ( const G4HadProjectile & aTrack,
G4Nucleus & targetNucleus )
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 110 of file G4NeutronElectronElModel.cc.

111{
112 G4String pName = aTrack.GetDefinition()->GetParticleName();
113 G4double energy = aTrack.GetTotalEnergy();
114
115 return (pName == "neutron" && energy >= fMinEnergy && energy <= fMaxEnergy);
116}
G4double GetTotalEnergy() const
const G4String & GetParticleName() const
G4double energy(const ThreeVector &p, const G4double m)

◆ ModelDescription()

void G4NeutronElectronElModel::ModelDescription ( std::ostream & outFile) const
virtual

Reimplemented from G4HadronElastic.

Definition at line 101 of file G4NeutronElectronElModel.cc.

102{
103 outFile << "G4NeutronElectronElModel is a neutrino-electron (neutral current) elastic scattering\n"
104 << "model which uses the standard model \n"
105 << "transfer parameterization. The model is fully relativistic\n";
106}

◆ SampleSin2HalfTheta()

G4double G4NeutronElectronElModel::SampleSin2HalfTheta ( G4double Tkin)

Definition at line 159 of file G4NeutronElectronElModel.cc.

160{
161 G4double result = 0., position;
162 G4int iTkin, iTransfer;
163
164 for( iTkin = 0; iTkin < fEnergyBin; iTkin++)
165 {
166 if( Tkin < fEnergyVector->Energy(iTkin) ) break;
167 }
168 if ( iTkin >= fEnergyBin ) iTkin = fEnergyBin-1; // Tkin is more then theMaxEnergy
169 if ( iTkin < 0 ) iTkin = 0; // against negative index, Tkin < theMinEnergy
170
171 position = (*(*fAngleTable)(iTkin))(fAngleBin-1)*G4UniformRand();
172
173 // G4cout<<"position = "<<position<<G4endl;
174
175 for( iTransfer = 0; iTransfer < fAngleBin; iTransfer++)
176 {
177 if( position <= (*(*fAngleTable)(iTkin))(iTransfer) ) break;
178 }
179 if (iTransfer >= fAngleBin-1) iTransfer = fAngleBin-1;
180
181 // G4cout<<"iTransfer = "<<iTransfer<<G4endl;
182
183 result = GetTransfer(iTkin, iTransfer, position);
184
185 // G4cout<<"t = "<<t<<G4endl;
186
187
188 return result;
189}
G4double GetTransfer(G4int iTkin, G4int iTransfer, G4double position)

Referenced by ApplyYourself().

◆ SetCutEnergy()

void G4NeutronElectronElModel::SetCutEnergy ( G4double ec)
inline

Definition at line 79 of file G4NeutronElectronElModel.hh.

79{fCutEnergy=ec;};

◆ XscIntegrand()

G4double G4NeutronElectronElModel::XscIntegrand ( G4double x)

Definition at line 239 of file G4NeutronElectronElModel.cc.

240{
241 G4double result = 1., q2, znq2, znf, znf2, znf4;
242
243 znq2 = 1. + 2.*fee*x/fM;
244
245 q2 = 4.*fee2*x/znq2;
246
247 znf = 1 + q2/fMv2;
248 znf2 = znf*znf;
249 znf4 = znf2*znf2;
250
251 result /= ( x + fAm )*znq2*znq2*znf4;
252
253 result *= ( 1 - x )/( 1 + q2/4./fM2 ) + 2.*x;
254
255 return result;
256}

Referenced by Initialise().


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