Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4CascadeColliderBase Class Reference

#include <G4CascadeColliderBase.hh>

Inheritance diagram for G4CascadeColliderBase:
Collaboration diagram for G4CascadeColliderBase:

Public Member Functions

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

Protected Member Functions

virtual G4bool useEPCollider (G4InuclParticle *bullet, G4InuclParticle *target) const
 
virtual G4bool inelasticInteractionPossible (G4InuclParticle *bullet, G4InuclParticle *target, G4double ekin) const
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
 
virtual G4bool validateOutput (const G4Fragment &fragment, G4CollisionOutput &output)
 
virtual G4bool validateOutput (G4InuclParticle *bullet, G4InuclParticle *target, const std::vector< G4InuclElementaryParticle > &particles)
 
- Protected Member Functions inherited from G4VCascadeCollider
virtual void setName (const G4String &name)
 

Protected Attributes

G4InteractionCase interCase
 
G4CascadeCheckBalancebalance
 
- Protected Attributes inherited from G4VCascadeCollider
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 63 of file G4CascadeColliderBase.hh.

Constructor & Destructor Documentation

G4CascadeColliderBase::G4CascadeColliderBase ( const G4String name,
G4int  verbose = 0 
)

Definition at line 58 of file G4CascadeColliderBase.cc.

59  : G4VCascadeCollider(name, verbose), balance(0) {
61  balance = new G4CascadeCheckBalance(name);
62 }
G4VCascadeCollider(const G4String &name, G4int verbose=0)
G4CascadeCheckBalance * balance
static G4bool checkConservation()

Here is the call graph for this function:

G4CascadeColliderBase::~G4CascadeColliderBase ( )
virtual

Definition at line 64 of file G4CascadeColliderBase.cc.

64  {
65  delete balance;
66 }
G4CascadeCheckBalance * balance

Member Function Documentation

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

Definition at line 86 of file G4CascadeColliderBase.cc.

88  {
89  if (verboseLevel) {
90  G4cout << " >>> " << theName << "::inelasticInteractionPossible" << G4endl;
91  }
92 
93  // If hadron-hadron collision, defer to ElementaryParticleCollider
94  if (useEPCollider(bullet, target)) return true;
95 
96  // See which one of the two (or both) is a nucleus, get properties
97  // FIXME: Should set a = baryon() for both, but that's not in base
98  G4InuclNuclei* nuclei_bullet = dynamic_cast<G4InuclNuclei*>(bullet);
99  G4double ab = nuclei_bullet ? nuclei_bullet->getA() : 1; // FIXME
100  G4double zb = nuclei_bullet ? nuclei_bullet->getZ() : bullet->getCharge();
101 
102  G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target);
103  G4double at = nuclei_target ? nuclei_target->getA() : 1; // FIXME
104  G4double zt = nuclei_target ? nuclei_target->getZ() : target->getCharge();
105 
106  // VCOL (Coulomb barrier) used for testing if elastic collision necessary
107  const G4double coeff = 0.001 * 1.2;
108 
109  G4double VCOL = coeff * zt * zb / (G4cbrt(at) + G4cbrt(ab));
110 
111  G4bool possible = true; // Force inelastic; should be (ekin >= VCOL)
112 
113  if (verboseLevel > 3) {
114  G4cout << " VCOL: " << VCOL << " ekin: " << ekin << " inelastic possible: "
115  << possible << G4endl;
116  }
117 
118  return possible;
119 }
G4int getZ() const
const XML_Char * target
Definition: expat.h:268
virtual G4bool useEPCollider(G4InuclParticle *bullet, G4InuclParticle *target) const
G4GLOB_DLL std::ostream G4cout
G4int getA() const
bool G4bool
Definition: G4Types.hh:79
static const G4double ab
G4double getCharge() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in G4IntraNucleiCascader, and G4InuclCollider.

Definition at line 69 of file G4CascadeColliderBase.hh.

72  { ; }
void G4CascadeColliderBase::setVerboseLevel ( G4int  verbose = 0)
virtual

Reimplemented from G4VCascadeCollider.

Reimplemented in G4IntraNucleiCascader, and G4InuclCollider.

Definition at line 68 of file G4CascadeColliderBase.cc.

68  {
70  if (balance) balance->setVerboseLevel(verbose);
71 }
G4CascadeCheckBalance * balance
virtual void setVerboseLevel(G4int verbose=0)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 76 of file G4CascadeColliderBase.cc.

77  {
78  return (dynamic_cast<G4InuclElementaryParticle*>(bullet) &&
79  dynamic_cast<G4InuclElementaryParticle*>(target));
80 }

Here is the caller graph for this function:

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

Definition at line 124 of file G4CascadeColliderBase.cc.

126  {
127  if (!balance) return true; // Skip checks unless requested
128 
129  if (verboseLevel > 1)
130  G4cout << " >>> " << theName << "::validateOutput" << G4endl;
131 
132  // Show final state particles
133  if (verboseLevel > 2) output.printCollisionOutput();
134 
136  balance->collide(bullet, target, output);
137  return balance->okay(); // Returns false if violations
138 }
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4CascadeCheckBalance * balance
void printCollisionOutput(std::ostream &os=G4cout) const
virtual void setVerboseLevel(G4int verbose=0)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4CascadeColliderBase::validateOutput ( const G4Fragment fragment,
G4CollisionOutput output 
)
protectedvirtual

Definition at line 140 of file G4CascadeColliderBase.cc.

141  {
142  if (!balance) return true; // Skip checks unless requested
143 
144  if (verboseLevel > 1)
145  G4cout << " >>> " << theName << "::validateOutput" << G4endl;
146 
148  balance->collide(fragment, output);
149  return balance->okay(); // Returns false if violations
150 }
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4CascadeCheckBalance * balance
virtual void setVerboseLevel(G4int verbose=0)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

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

Definition at line 152 of file G4CascadeColliderBase.cc.

154  {
155  if (!balance) return true; // Skip checks unless requested
156 
157  if (verboseLevel > 1)
158  G4cout << " >>> " << theName << "::validateOutput" << G4endl;
159 
161  balance->collide(bullet, target, particles);
162  return balance->okay(); // Returns false if violations
163 }
void collide(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
G4CascadeCheckBalance * balance
virtual void setVerboseLevel(G4int verbose=0)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Member Data Documentation

G4CascadeCheckBalance* G4CascadeColliderBase::balance
protected

Definition at line 89 of file G4CascadeColliderBase.hh.

G4InteractionCase G4CascadeColliderBase::interCase
protected

Definition at line 77 of file G4CascadeColliderBase.hh.


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