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

#include <G4PreCompoundDeexcitation.hh>

+ Inheritance diagram for G4PreCompoundDeexcitation:

Public Member Functions

 G4PreCompoundDeexcitation ()
 
virtual ~G4PreCompoundDeexcitation ()
 
void collide (G4InuclParticle *, G4InuclParticle *target, G4CollisionOutput &globalOutput)
 
virtual void deExcite (G4Fragment *fragment, G4CollisionOutput &globalOutput)
 
- Public Member Functions inherited from G4VCascadeDeexcitation
 G4VCascadeDeexcitation (const char *name)
 
virtual ~G4VCascadeDeexcitation ()
 
virtual void collide (G4InuclParticle *, G4InuclParticle *target, G4CollisionOutput &globalOutput)=0
 
virtual void deExcite (G4Fragment *fragment, G4CollisionOutput &globalOutput)=0
 
- Public Member Functions inherited from G4CascadeColliderBase
 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)
 

Additional Inherited Members

- Protected Member Functions inherited from G4CascadeColliderBase
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 inherited from G4VCascadeDeexcitation
G4CollisionOutput output
 
- Protected Attributes inherited from G4CascadeColliderBase
G4InteractionCase interCase
 
G4bool doConservationChecks
 
G4CascadeCheckBalancebalance
 
- Protected Attributes inherited from G4VCascadeCollider
const char * theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 46 of file G4PreCompoundDeexcitation.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundDeexcitation()

G4PreCompoundDeexcitation::G4PreCompoundDeexcitation ( )

Definition at line 56 of file G4PreCompoundDeexcitation.cc.

57 : G4VCascadeDeexcitation("G4PreCompoundDeexcitation"),
58 theExcitationHandler(new G4ExcitationHandler),
59 theDeExcitation(new G4PreCompoundModel(theExcitationHandler)) {}

◆ ~G4PreCompoundDeexcitation()

G4PreCompoundDeexcitation::~G4PreCompoundDeexcitation ( )
virtual

Definition at line 61 of file G4PreCompoundDeexcitation.cc.

61 {
62 // we need to delete here because G4PreComp does NOT delete it
63 // all objects following G4HadronicInteraction interface are
64 // deleted
65 //delete theExcitationHandler;
66 //delete theDeExcitation;
67}

Member Function Documentation

◆ collide()

void G4PreCompoundDeexcitation::collide ( G4InuclParticle ,
G4InuclParticle target,
G4CollisionOutput globalOutput 
)
virtual

Implements G4VCascadeDeexcitation.

Definition at line 71 of file G4PreCompoundDeexcitation.cc.

73 {
74 if (verboseLevel)
75 G4cout << " >>> G4PreCompoundDeexcitation::collide" << G4endl;
76
77 // Ensure that input state is sensible
78 G4InuclNuclei* ntarget = dynamic_cast<G4InuclNuclei*>(target);
79 if (!ntarget) {
80 G4cerr << " G4PreCompoundDeexcitation ERROR: residual fragment must be G4InuclNuclei"
81 << G4endl;
82 return;
83 }
84
85 // NOTE: Should not get this case, as G4IntraNucleiCascade should catch it
86 if (ntarget->getA() == 1) { // Just a nucleon; move to output list
87 G4int type = (ntarget->getZ() == 0) ? neutron : proton;
88 G4InuclElementaryParticle ptarget(target->getMomentum(), type,
90
91 globalOutput.addOutgoingParticle(ptarget);
92 return;
93 }
94
95 G4Fragment frag(*ntarget);
96
97 output.reset(); // Use temporary buffer for conservation checks
98 deExcite(&frag, output);
99 validateOutput(0, target, output);
100
101 globalOutput.add(output); // Return results
102}
@ neutron
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cerr
G4DLLIMPORT std::ostream G4cout
virtual G4bool validateOutput(G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &output)
void addOutgoingParticle(const G4InuclElementaryParticle &particle)
void add(const G4CollisionOutput &right)
G4int getZ() const
G4int getA() const
G4LorentzVector getMomentum() const
virtual void deExcite(G4Fragment *fragment, G4CollisionOutput &globalOutput)

◆ deExcite()

void G4PreCompoundDeexcitation::deExcite ( G4Fragment fragment,
G4CollisionOutput globalOutput 
)
virtual

Implements G4VCascadeDeexcitation.

Definition at line 104 of file G4PreCompoundDeexcitation.cc.

105 {
106 if (verboseLevel)
107 G4cout << " >>> G4PreCompoundDeexcitation::deExcite" << G4endl;
108
109 if (!fragment) {
110 if (verboseLevel > 1) G4cerr << " NULL pointer fragment" << G4endl;
111 return;
112 }
113
114 if (verboseLevel > 1) G4cout << *fragment << G4endl;
115
116 G4ReactionProductVector* precompoundProducts = 0;
117
118 // FIXME: in principle, the explosion(...) stuff should also
119 // handle properly the case of Z=0 (neutron blob)
120 if (explosion(fragment) && theExcitationHandler) {
121 if (verboseLevel) G4cout << " calling BreakItUp" << G4endl;
122 precompoundProducts = theExcitationHandler->BreakItUp(*fragment);
123 } else {
124 if (verboseLevel) G4cout << " calling DeExcite" << G4endl;
125 precompoundProducts = theDeExcitation->DeExcite(*fragment);
126 }
127
128 // Transfer output of de-excitation back into Bertini objects
129 if (precompoundProducts) {
130 if (verboseLevel>1) {
131 G4cout << " Got " << precompoundProducts->size()
132 << " secondaries back from PreCompound:" << G4endl;
133 }
134
135 globalOutput.setVerboseLevel(verboseLevel); // For debugging
136 globalOutput.addOutgoingParticles(precompoundProducts);
137 globalOutput.setVerboseLevel(0);
138
139 precompoundProducts->clear();
140 delete precompoundProducts;
141 }
142}
std::vector< G4ReactionProduct * > G4ReactionProductVector
virtual G4bool explosion(G4InuclNuclei *target) const
void setVerboseLevel(G4int verbose)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState) const
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0

Referenced by collide().


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