Geant4 11.1.1
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 ()
 
virtual void setVerboseLevel (G4int verbose)
 
virtual void deExcite (const G4Fragment &fragment, G4CollisionOutput &globalOutput)
 
- Public Member Functions inherited from G4CascadeDeexciteBase
 G4CascadeDeexciteBase (const char *name)
 
virtual ~G4CascadeDeexciteBase ()
 
virtual void setVerboseLevel (G4int verbose=0)
 
- Public Member Functions inherited from G4VCascadeDeexcitation
 G4VCascadeDeexcitation (const G4String &name)
 
virtual ~G4VCascadeDeexcitation ()
 
virtual void collide (G4InuclParticle *bullet, G4InuclParticle *target, G4CollisionOutput &globalOutput)
 
virtual void deExcite (const G4Fragment &fragment, G4CollisionOutput &output)=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
 
virtual void setVerboseLevel (G4int verbose=0)
 

Additional Inherited Members

- Protected Member Functions inherited from G4CascadeDeexciteBase
virtual G4bool explosion (const G4Fragment &target) const
 
virtual G4bool explosion (G4int A, G4int Z, G4double excitation) const
 
virtual G4bool validateOutput (const G4Fragment &target, G4CollisionOutput &output)
 
virtual G4bool validateOutput (const G4Fragment &target, const std::vector< G4InuclElementaryParticle > &particles)
 
virtual G4bool validateOutput (const G4Fragment &target, const std::vector< G4InuclNuclei > &fragments)
 
void getTargetData (const G4Fragment &target)
 
const G4FragmentmakeFragment (G4LorentzVector mom, G4int A, G4int Z, G4double EX=0.)
 
const G4FragmentmakeFragment (G4int A, G4int Z, G4double EX=0.)
 
- Protected Member Functions inherited from G4VCascadeCollider
virtual void setName (const G4String &name)
 
- Protected Attributes inherited from G4CascadeDeexciteBase
G4CascadeCheckBalancebalance
 
G4int A
 
G4int Z
 
G4LorentzVector PEX
 
G4double EEXS
 
G4Fragment aFragment
 
- Protected Attributes inherited from G4VCascadeCollider
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 50 of file G4PreCompoundDeexcitation.hh.

Constructor & Destructor Documentation

◆ G4PreCompoundDeexcitation()

G4PreCompoundDeexcitation::G4PreCompoundDeexcitation ( )

Definition at line 60 of file G4PreCompoundDeexcitation.cc.

61 : G4CascadeDeexciteBase("G4PreCompoundDeexcitation"),
62 theExcitationHandler(0), theDeExcitation(0) {
63 // Access common instance of PreCompound instead of creating new one
66
67 // If not found, or cast fails, create a local instance
68 theDeExcitation = static_cast<G4PreCompoundModel*>(p);
69 if (!theDeExcitation) {
70 theExcitationHandler = new G4ExcitationHandler;
71 theDeExcitation = new G4PreCompoundModel(theExcitationHandler);
72 }
73}
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()

◆ ~G4PreCompoundDeexcitation()

G4PreCompoundDeexcitation::~G4PreCompoundDeexcitation ( )
virtual

Definition at line 75 of file G4PreCompoundDeexcitation.cc.

75 {
76 // Per V.I. -- do not delete locally; handled in hadronic registry
77 //delete theExcitationHandler;
78 //delete theDeExcitation;
79}

Member Function Documentation

◆ deExcite()

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

Implements G4VCascadeDeexcitation.

Definition at line 90 of file G4PreCompoundDeexcitation.cc.

91 {
92 if (verboseLevel)
93 G4cout << " >>> G4PreCompoundDeexcitation::deExcite" << G4endl;
94
95 if (verboseLevel > 1)
96 G4cout << fragment << G4endl;
97
98 G4ReactionProductVector* precompoundProducts = 0;
99
100 if (explosion(fragment) && theExcitationHandler) {
101 // FIXME: in principle, the explosion(...) stuff should also
102 // handle properly the case of Z=0 (neutron blob)
103 if (verboseLevel) G4cout << " calling BreakItUp" << G4endl;
104 precompoundProducts = theExcitationHandler->BreakItUp(fragment);
105
106 } else {
107 if (verboseLevel) G4cout << " calling DeExcite" << G4endl;
108 // NOTE: DeExcite() interface takes a *non-const* reference
109 // Make a non-const copy of original G4Fragment; otherwise it may be
110 // changed by DeExcite()
111 G4Fragment originalFragment(fragment);
112 precompoundProducts =
113 theDeExcitation->DeExcite(originalFragment);
114 }
115
116 // Transfer output of de-excitation back into Bertini objects
117 if (precompoundProducts) {
118 if (verboseLevel>1) {
119 G4cout << " Got " << precompoundProducts->size()
120 << " secondaries back from PreCompound:" << G4endl;
121 }
122
123 globalOutput.setVerboseLevel(verboseLevel); // For debugging
124 globalOutput.addOutgoingParticles(precompoundProducts);
125 globalOutput.setVerboseLevel(0);
126
127 for ( size_t i = 0; i < precompoundProducts->size(); i++ ) {
128 if ( (*precompoundProducts)[ i ] ) {
129 delete (*precompoundProducts)[ i ];
130 (*precompoundProducts)[ i ] = 0;
131 }
132 }
133 precompoundProducts->clear();
134 delete precompoundProducts;
135 }
136}
std::vector< G4ReactionProduct * > G4ReactionProductVector
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual G4bool explosion(const G4Fragment &target) const
void setVerboseLevel(G4int verbose)
void addOutgoingParticles(const std::vector< G4InuclElementaryParticle > &particles)
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0

◆ setVerboseLevel()

void G4PreCompoundDeexcitation::setVerboseLevel ( G4int  verbose)
virtual

Reimplemented from G4CascadeDeexciteBase.

Definition at line 81 of file G4PreCompoundDeexcitation.cc.

81 {
83 theDeExcitation->SetVerboseLevel(verbose);
84 // NOTE: G4ExcitationHandler doesn't have verbosity
85}
virtual void setVerboseLevel(G4int verbose=0)
void SetVerboseLevel(G4int value)

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