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

#include <G4CascadeColliderBase.hh>

+ Inheritance diagram for G4CascadeColliderBase:

Public Member Functions

 G4CascadeColliderBase (const char *name, G4int verbose=0)
 
virtual ~G4CascadeColliderBase ()
 
virtual void rescatter (G4InuclParticle *, G4KineticTrackVector *, G4V3DNucleus *, G4CollisionOutput &)
 
virtual void setVerboseLevel (G4int verbose=0)
 
virtual void setConservationChecks (G4bool doBalance=true)
 
- Public Member Functions inherited from G4VCascadeCollider
 G4VCascadeCollider (const char *name, G4int verbose=0)
 
virtual ~G4VCascadeCollider ()
 
virtual void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)=0
 
virtual void setVerboseLevel (G4int verbose=0)
 

Protected Member Functions

virtual G4bool useEPCollider (G4InuclParticle *bullet, G4InuclParticle *target) const
 
virtual G4bool explosion (G4InuclNuclei *target) const
 
virtual G4bool explosion (G4Fragment *target) const
 
virtual G4bool explosion (G4int A, G4int Z, G4double excitation) const
 
virtual G4bool inelasticInteractionPossible (G4InuclParticle *bullet, G4InuclParticle *target, G4double ekin) const
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, const std::vector< G4InuclElementaryParticle > &particles)
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, const std::vector< G4InuclNuclei > &fragments)
 
- Protected Member Functions inherited from G4VCascadeCollider
virtual void setName (const char *name)
 

Protected Attributes

G4InteractionCase interCase
 
G4bool doConservationChecks
 
G4CascadeCheckBalancebalance
 
- Protected Attributes inherited from G4VCascadeCollider
const char * theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 58 of file G4CascadeColliderBase.hh.

Constructor & Destructor Documentation

◆ G4CascadeColliderBase()

G4CascadeColliderBase::G4CascadeColliderBase ( const char *  name,
G4int  verbose = 0 
)

Definition at line 53 of file G4CascadeColliderBase.cc.

54 : G4VCascadeCollider(name, verbose),
55#ifdef G4CASCADE_CHECK_ECONS
57#else
59#endif
60 balance(new G4CascadeCheckBalance(0.001, 0.001, name)) {}
G4CascadeCheckBalance * balance

◆ ~G4CascadeColliderBase()

G4CascadeColliderBase::~G4CascadeColliderBase ( )
virtual

Definition at line 62 of file G4CascadeColliderBase.cc.

62 {
63 delete balance;
64}

Member Function Documentation

◆ explosion() [1/3]

G4bool G4CascadeColliderBase::explosion ( G4Fragment target) const
protectedvirtual

Definition at line 88 of file G4CascadeColliderBase.cc.

88 {
89 return fragment && explosion(fragment->GetA_asInt(), fragment->GetZ_asInt(),
90 fragment->GetExcitationEnergy()); // in MeV
91}
virtual G4bool explosion(G4InuclNuclei *target) const

◆ explosion() [2/3]

G4bool G4CascadeColliderBase::explosion ( G4int  A,
G4int  Z,
G4double  excitation 
) const
protectedvirtual

Definition at line 94 of file G4CascadeColliderBase.cc.

95 {
96 if (verboseLevel) G4cout << " >>> " << theName << "::explosion ?" << G4endl;
97
98 const G4int a_cut = 20;
99 const G4double be_cut = 3.0;
100
101 // Neutron balls, or small fragments with high excitations can explode
102 return ((A <= a_cut || Z==0) &&
103 (excitation >= be_cut * bindingEnergy(A,Z))
104 );
105}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4double bindingEnergy(G4int A, G4int Z)

◆ explosion() [3/3]

G4bool G4CascadeColliderBase::explosion ( G4InuclNuclei target) const
protectedvirtual

Definition at line 83 of file G4CascadeColliderBase.cc.

83 {
84 return target && explosion(target->getA(), target->getZ(),
85 target->getExitationEnergy()); // in MeV
86}
G4int getZ() const
G4double getExitationEnergy() const
G4int getA() const

Referenced by G4CascadeDeexcitation::collide(), G4PreCompoundDeexcitation::deExcite(), and explosion().

◆ inelasticInteractionPossible()

G4bool G4CascadeColliderBase::inelasticInteractionPossible ( G4InuclParticle bullet,
G4InuclParticle target,
G4double  ekin 
) const
protectedvirtual

Definition at line 111 of file G4CascadeColliderBase.cc.

113 {
114 if (verboseLevel) {
115 G4cout << " >>> " << theName << "::inelasticInteractionPossible" << G4endl;
116 }
117
118 // If hadron-hadron collision, defer to ElementaryParticleCollider
119 if (useEPCollider(bullet, target)) return true;
120
121 // See which one of the two (or both) is a nucleus, get properties
122 // FIXME: Should set a = baryon() for both, but that's not in base
123 G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet);
124 G4double ab = nuclei_bullet ? nuclei_bullet->getA() : 1; // FIXME
125 G4double zb = nuclei_bullet ? nuclei_bullet->getZ() : bullet->getCharge();
126
127 G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target);
128 G4double at = nuclei_target ? nuclei_target->getA() : 1; // FIXME
129 G4double zt = nuclei_target ? nuclei_target->getZ() : target->getCharge();
130
131 // VCOL (Coulomb barrier) used for testing if elastic collision necessary
132 const G4double coeff = 0.001 * 1.2;
133
134 G4double VCOL = coeff * zt * zb / (G4cbrt(at) + G4cbrt(ab));
135
136 G4bool possible = true; // Force inelastic; should be (ekin >= VCOL)
137
138 if (verboseLevel > 3) {
139 G4cout << " VCOL: " << VCOL << " ekin: " << ekin << " inelastic possible: "
140 << possible << G4endl;
141 }
142
143 return possible;
144}
bool G4bool
Definition: G4Types.hh:67
virtual G4bool useEPCollider(G4InuclParticle *bullet, G4InuclParticle *target) const
G4double getCharge() const

Referenced by G4InuclCollider::collide().

◆ rescatter()

virtual void G4CascadeColliderBase::rescatter ( G4InuclParticle ,
G4KineticTrackVector ,
G4V3DNucleus ,
G4CollisionOutput  
)
inlinevirtual

Reimplemented in G4IntraNucleiCascader, and G4InuclCollider.

Definition at line 64 of file G4CascadeColliderBase.hh.

67 { ; }

◆ setConservationChecks()

virtual void G4CascadeColliderBase::setConservationChecks ( G4bool  doBalance = true)
inlinevirtual

Definition at line 71 of file G4CascadeColliderBase.hh.

71 {
72 doConservationChecks = doBalance;
73 }

Referenced by G4EquilibriumEvaporator::collide().

◆ setVerboseLevel()

◆ useEPCollider()

G4bool G4CascadeColliderBase::useEPCollider ( G4InuclParticle bullet,
G4InuclParticle target 
) const
protectedvirtual

◆ validateOutput() [1/3]

G4bool G4CascadeColliderBase::validateOutput ( G4InuclParticle bullet,
G4InuclParticle target,
const std::vector< G4InuclElementaryParticle > &  particles 
)
protectedvirtual

Definition at line 165 of file G4CascadeColliderBase.cc.

167 {
168 if (!doConservationChecks) return true; // Skip checks if requested
169
170 if (verboseLevel > 1)
171 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
172
174 balance->collide(bullet, target, particles);
175 return balance->okay(); // Returns false if violations
176}
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)

◆ validateOutput() [2/3]

G4bool G4CascadeColliderBase::validateOutput ( G4InuclParticle bullet,
G4InuclParticle target,
const std::vector< G4InuclNuclei > &  fragments 
)
protectedvirtual

Definition at line 178 of file G4CascadeColliderBase.cc.

180 {
181 if (!doConservationChecks) return true; // Skip checks if requested
182
183 if (verboseLevel > 1)
184 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
185
187 balance->collide(bullet, target, fragments);
188 return balance->okay(); // Returns false if violations
189}

◆ validateOutput() [3/3]

G4bool G4CascadeColliderBase::validateOutput ( G4InuclParticle bullet,
G4InuclParticle target,
G4CollisionOutput output 
)
protectedvirtual

Definition at line 149 of file G4CascadeColliderBase.cc.

151 {
152 if (!doConservationChecks) return true; // Skip checks if requested
153
154 if (verboseLevel > 1)
155 G4cout << " >>> " << theName << "::validateOutput" << G4endl;
156
157 // Show final state particles
158 if (verboseLevel > 2) output.printCollisionOutput();
159
161 balance->collide(bullet, target, output);
162 return balance->okay(); // Returns false if violations
163}
void printCollisionOutput(std::ostream &os=G4cout) const

Referenced by G4PreCompoundDeexcitation::collide(), G4BigBanger::collide(), G4ElementaryParticleCollider::collide(), G4EquilibriumEvaporator::collide(), G4Fissioner::collide(), G4NonEquilibriumEvaporator::collide(), and G4InuclCollider::deexcite().

Member Data Documentation

◆ balance

G4CascadeCheckBalance* G4CascadeColliderBase::balance
protected

◆ doConservationChecks

G4bool G4CascadeColliderBase::doConservationChecks
protected

◆ interCase


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