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

#include <G4HadronElastic.hh>

+ Inheritance diagram for G4HadronElastic:

Public Member Functions

 G4HadronElastic (const G4String &name="hElasticLHEP")
 
virtual ~G4HadronElastic ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
void SetLowestEnergyLimit (G4double value)
 
G4double LowestEnergyLimit () const
 
G4double ComputeMomentumCMS (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual void Description () const
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
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)
 
const G4HadronicInteractionGetMyPointer () const
 
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
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 

Additional Inherited Members

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

Detailed Description

Definition at line 50 of file G4HadronElastic.hh.

Constructor & Destructor Documentation

◆ G4HadronElastic()

G4HadronElastic::G4HadronElastic ( const G4String name = "hElasticLHEP")

Definition at line 45 of file G4HadronElastic.cc.

47{
48 SetMinEnergy( 0.0*GeV );
49 SetMaxEnergy( 100.*TeV );
50 lowestEnergyLimit= 1.e-6*eV;
51
52 theProton = G4Proton::Proton();
53 theNeutron = G4Neutron::Neutron();
54 theDeuteron = G4Deuteron::Deuteron();
55 theAlpha = G4Alpha::Alpha();
56 //Description();
57}
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Proton * Proton()
Definition: G4Proton.cc:93

◆ ~G4HadronElastic()

G4HadronElastic::~G4HadronElastic ( )
virtual

Definition at line 60 of file G4HadronElastic.cc.

61{}

Member Function Documentation

◆ ApplyYourself()

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

Implements G4HadronicInteraction.

Definition at line 93 of file G4HadronElastic.cc.

95{
97
98 const G4HadProjectile* aParticle = &aTrack;
99 G4double ekin = aParticle->GetKineticEnergy();
100 if(ekin <= lowestEnergyLimit) {
103 return &theParticleChange;
104 }
105
106 G4int A = targetNucleus.GetA_asInt();
107 G4int Z = targetNucleus.GetZ_asInt();
108
109 G4double plab = aParticle->GetTotalMomentum();
110
111 // Scattered particle referred to axis of incident particle
112 const G4ParticleDefinition* theParticle = aParticle->GetDefinition();
113 G4double m1 = theParticle->GetPDGMass();
114
115 if (verboseLevel>1) {
116 G4cout << "G4HadronElastic: "
117 << aParticle->GetDefinition()->GetParticleName()
118 << " Plab(GeV/c)= " << plab/GeV
119 << " Ekin(MeV) = " << ekin/MeV
120 << " scattered off Z= " << Z
121 << " A= " << A
122 << G4endl;
123 }
124
126 G4LorentzVector lv1 = aParticle->Get4Momentum();
127 G4LorentzVector lv(0.0,0.0,0.0,mass2);
128 lv += lv1;
129
130 G4ThreeVector bst = lv.boostVector();
131 lv1.boost(-bst);
132
133 G4ThreeVector p1 = lv1.vect();
134 G4double momentumCMS = p1.mag();
135 G4double tmax = 4.0*momentumCMS*momentumCMS;
136
137 // Sampling in CM system
138 G4double t = SampleInvariantT(theParticle, plab, Z, A);
139 G4double phi = G4UniformRand()*CLHEP::twopi;
140 G4double cost = 1. - 2.0*t/tmax;
141 G4double sint;
142
143 // problem in sampling
144 if(cost > 1.0 || cost < -1.0) {
145 //if(verboseLevel > 0) {
146 G4cout << "G4HadronElastic WARNING (1 - cost)= " << 1 - cost
147 << " after scattering of "
148 << aParticle->GetDefinition()->GetParticleName()
149 << " p(GeV/c)= " << plab/GeV
150 << " on an ion Z= " << Z << " A= " << A
151 << G4endl;
152 //}
153 cost = 1.0;
154 sint = 0.0;
155
156 // normal situation
157 } else {
158 sint = std::sqrt((1.0-cost)*(1.0+cost));
159 }
160 if (verboseLevel>1) {
161 G4cout << " t= " << t << " tmax(GeV^2)= " << tmax/(GeV*GeV)
162 << " Pcms(GeV)= " << momentumCMS/GeV << " cos(t)=" << cost
163 << " sin(t)=" << sint << G4endl;
164 }
165 G4ThreeVector v1(sint*std::cos(phi),sint*std::sin(phi),cost);
166 v1 *= momentumCMS;
167 G4LorentzVector nlv1(v1.x(),v1.y(),v1.z(),
168 std::sqrt(momentumCMS*momentumCMS + m1*m1));
169
170 nlv1.boost(bst);
171
172 G4double eFinal = nlv1.e() - m1;
173 if (verboseLevel > 1) {
174 G4cout <<" m= " << m1 << " Efin(MeV)= " << eFinal
175 << " Proj: 4-mom " << lv1 << " Final: " << nlv1
176 << G4endl;
177 }
178 if(eFinal <= lowestEnergyLimit) {
179 if(eFinal < 0.0 && verboseLevel > 0) {
180 G4cout << "G4HadronElastic WARNING Efinal= " << eFinal
181 << " after scattering of "
182 << aParticle->GetDefinition()->GetParticleName()
183 << " p(GeV/c)= " << plab/GeV
184 << " on an ion Z= " << Z << " A= " << A
185 << G4endl;
186 }
188 nlv1 = G4LorentzVector(0.0,0.0,0.0,m1);
189
190 } else {
191 theParticleChange.SetMomentumChange(nlv1.vect().unit());
193 }
194
195 lv -= nlv1;
196 G4double erec = lv.e() - mass2;
197 if (verboseLevel > 1) {
198 G4cout << "Recoil: " <<" m= " << mass2 << " Erec(MeV)= " << erec
199 << " 4-mom: " << lv
200 << G4endl;
201 }
202
203 if(erec > GetRecoilEnergyThreshold()) {
204 G4ParticleDefinition * theDef = 0;
205 if(Z == 1 && A == 1) { theDef = theProton; }
206 else if (Z == 1 && A == 2) { theDef = theDeuteron; }
207 else if (Z == 1 && A == 3) { theDef = G4Triton::Triton(); }
208 else if (Z == 2 && A == 3) { theDef = G4He3::He3(); }
209 else if (Z == 2 && A == 4) { theDef = theAlpha; }
210 else {
211 theDef =
213 }
214 G4DynamicParticle * aSec = new G4DynamicParticle(theDef, lv);
216 } else if(erec > 0.0) {
218 }
219
220 return &theParticleChange;
221}
CLHEP::HepLorentzVector G4LorentzVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:53
Hep3Vector unit() const
double mag() const
HepLorentzVector & boost(double, double, double)
Hep3Vector vect() const
void AddSecondary(G4DynamicParticle *aP)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
void SetLocalEnergyDeposit(G4double aE)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
virtual G4double SampleInvariantT(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
G4double GetRecoilEnergyThreshold() const
static G4He3 * He3()
Definition: G4He3.cc:94
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int J=0)
Definition: G4IonTable.cc:267
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
const G4String & GetParticleName() const
static G4ParticleTable * GetParticleTable()
G4IonTable * GetIonTable()
static G4Triton * Triton()
Definition: G4Triton.cc:95

◆ ComputeMomentumCMS()

G4double G4HadronElastic::ComputeMomentumCMS ( const G4ParticleDefinition p,
G4double  plab,
G4int  Z,
G4int  A 
)
inline

Definition at line 98 of file G4HadronElastic.hh.

100{
101 G4double m1 = p->GetPDGMass();
102 G4double m12= m1*m1;
104 return plab*mass2/std::sqrt(m12 + mass2*mass2 + 2.*mass2*std::sqrt(m12 + plab*plab));
105}

Referenced by SampleInvariantT().

◆ Description()

void G4HadronElastic::Description ( ) const
virtual

Reimplemented in G4CHIPSElastic, G4ChipsElasticModel, and G4ElasticHadrNucleusHE.

Definition at line 64 of file G4HadronElastic.cc.

65{
66 char* dirName = getenv("G4PhysListDocDir");
67 if (dirName) {
68 std::ofstream outFile;
69 G4String outFileName = GetModelName() + ".html";
70 G4String pathName = G4String(dirName) + "/" + outFileName;
71 outFile.open(pathName);
72 outFile << "<html>\n";
73 outFile << "<head>\n";
74
75 outFile << "<title>Description of G4HadronElastic Model</title>\n";
76 outFile << "</head>\n";
77 outFile << "<body>\n";
78
79 outFile << "G4HadronElastic is a hadron-nucleus elastic scattering\n"
80 << "model which uses the Gheisha two-exponential momentum\n"
81 << "transfer parameterization. The model is fully relativistic\n"
82 << "as opposed to the original Gheisha model which was not.\n"
83 << "This model may be used for all long-lived hadrons at all\n"
84 << "incident energies.\n";
85
86 outFile << "</body>\n";
87 outFile << "</html>\n";
88 outFile.close();
89 }
90}
const G4String & GetModelName() const

◆ LowestEnergyLimit()

G4double G4HadronElastic::LowestEnergyLimit ( ) const
inline

Definition at line 92 of file G4HadronElastic.hh.

93{
94 return lowestEnergyLimit;
95}

◆ SampleInvariantT()

G4double G4HadronElastic::SampleInvariantT ( const G4ParticleDefinition p,
G4double  plab,
G4int  Z,
G4int  A 
)
virtual

Reimplemented from G4HadronicInteraction.

Reimplemented in G4AntiNuclElastic, G4CHIPSElastic, G4ChipsElasticModel, G4DiffuseElastic, G4ElasticHadrNucleusHE, and G4NuclNuclDiffuseElastic.

Definition at line 225 of file G4HadronElastic.cc.

228{
229 static const G4double GeV2 = GeV*GeV;
230 G4double momentumCMS = ComputeMomentumCMS(p,plab,Z,A);
231 G4double tmax = 4.0*momentumCMS*momentumCMS/GeV2;
232 G4double aa, bb, cc;
233 G4double dd = 10.;
234 G4Pow* g4pow = G4Pow::GetInstance();
235 if (A <= 62) {
236 bb = 14.5*g4pow->Z23(A);
237 aa = g4pow->powZ(A, 1.63)/bb;
238 cc = 1.4*g4pow->Z13(A)/dd;
239 } else {
240 bb = 60.*g4pow->Z13(A);
241 aa = g4pow->powZ(A, 1.33)/bb;
242 cc = 0.4*g4pow->powZ(A, 0.4)/dd;
243 }
244 G4double q1 = 1.0 - std::exp(-bb*tmax);
245 G4double q2 = 1.0 - std::exp(-dd*tmax);
246 G4double s1 = q1*aa;
247 G4double s2 = q2*cc;
248 if((s1 + s2)*G4UniformRand() < s2) {
249 q1 = q2;
250 bb = dd;
251 }
252 return -GeV2*std::log(1.0 - G4UniformRand()*q1)/bb;
253}
G4double ComputeMomentumCMS(const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
Definition: G4Pow.hh:54
static G4Pow * GetInstance()
Definition: G4Pow.cc:50
G4double Z23(G4int Z)
Definition: G4Pow.hh:134
G4double Z13(G4int Z)
Definition: G4Pow.hh:110
G4double powZ(G4int Z, G4double y)
Definition: G4Pow.hh:180

Referenced by ApplyYourself(), G4CHIPSElastic::SampleInvariantT(), and G4ChipsElasticModel::SampleInvariantT().

◆ SetLowestEnergyLimit()

void G4HadronElastic::SetLowestEnergyLimit ( G4double  value)
inline

Definition at line 87 of file G4HadronElastic.hh.

88{
89 lowestEnergyLimit = value;
90}

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