G4PreCompoundDeexcitation Class Reference

#include <G4PreCompoundDeexcitation.hh>

Inheritance diagram for G4PreCompoundDeexcitation:

G4VCascadeDeexcitation G4CascadeColliderBase G4VCascadeCollider

Public Member Functions

 G4PreCompoundDeexcitation ()
virtual ~G4PreCompoundDeexcitation ()
void collide (G4InuclParticle *, G4InuclParticle *target, G4CollisionOutput &globalOutput)
virtual void deExcite (G4Fragment *fragment, G4CollisionOutput &globalOutput)

Detailed Description

Definition at line 46 of file G4PreCompoundDeexcitation.hh.


Constructor & Destructor Documentation

G4PreCompoundDeexcitation::G4PreCompoundDeexcitation (  ) 

Definition at line 56 of file G4PreCompoundDeexcitation.cc.

00057   : G4VCascadeDeexcitation("G4PreCompoundDeexcitation"),
00058     theExcitationHandler(new G4ExcitationHandler),
00059     theDeExcitation(new G4PreCompoundModel(theExcitationHandler)) {}

G4PreCompoundDeexcitation::~G4PreCompoundDeexcitation (  )  [virtual]

Definition at line 61 of file G4PreCompoundDeexcitation.cc.

00061                                                       {
00062   // we need to delete here because G4PreComp does NOT delete it
00063   // all objects following G4HadronicInteraction interface are
00064   // deleted 
00065   //delete theExcitationHandler;
00066   //delete theDeExcitation;
00067 }


Member Function Documentation

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

Implements G4VCascadeDeexcitation.

Definition at line 71 of file G4PreCompoundDeexcitation.cc.

References G4CollisionOutput::add(), G4CollisionOutput::addOutgoingParticle(), deExcite(), G4cerr, G4cout, G4endl, G4InuclNuclei::getA(), G4InuclParticle::getMomentum(), G4InuclNuclei::getZ(), neutron, G4VCascadeDeexcitation::output, G4InuclParticle::PreCompound, G4InuclParticleNames::proton, G4CollisionOutput::reset(), G4CascadeColliderBase::validateOutput(), and G4VCascadeCollider::verboseLevel.

00073                                                                          {
00074   if (verboseLevel)
00075     G4cout << " >>> G4PreCompoundDeexcitation::collide" << G4endl;
00076   
00077   // Ensure that input state is sensible
00078   G4InuclNuclei* ntarget = dynamic_cast<G4InuclNuclei*>(target);
00079   if (!ntarget) {
00080     G4cerr << " G4PreCompoundDeexcitation ERROR:  residual fragment must be G4InuclNuclei"
00081            << G4endl;
00082     return;
00083   }
00084 
00085   // NOTE:  Should not get this case, as G4IntraNucleiCascade should catch it
00086   if (ntarget->getA() == 1) {           // Just a nucleon; move to output list
00087     G4int type = (ntarget->getZ() == 0) ? neutron : proton;
00088     G4InuclElementaryParticle ptarget(target->getMomentum(), type, 
00089                                       G4InuclParticle::PreCompound);
00090 
00091     globalOutput.addOutgoingParticle(ptarget);
00092     return;
00093   }
00094 
00095   G4Fragment frag(*ntarget);
00096 
00097   output.reset();               // Use temporary buffer for conservation checks
00098   deExcite(&frag, output);
00099   validateOutput(0, target, output);
00100 
00101   globalOutput.add(output);     // Return results
00102 }

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

Implements G4VCascadeDeexcitation.

Definition at line 104 of file G4PreCompoundDeexcitation.cc.

References G4CollisionOutput::addOutgoingParticles(), G4ExcitationHandler::BreakItUp(), G4VPreCompoundModel::DeExcite(), G4CascadeColliderBase::explosion(), G4cerr, G4cout, G4endl, G4CollisionOutput::setVerboseLevel(), and G4VCascadeCollider::verboseLevel.

Referenced by collide().

00105                                                                           {
00106   if (verboseLevel)
00107     G4cout << " >>> G4PreCompoundDeexcitation::deExcite" << G4endl;
00108 
00109   if (!fragment) {
00110     if (verboseLevel > 1) G4cerr << " NULL pointer fragment" << G4endl;
00111     return;
00112   }
00113 
00114   if (verboseLevel > 1) G4cout << *fragment << G4endl;
00115 
00116   G4ReactionProductVector* precompoundProducts = 0;
00117 
00118   // FIXME: in principle, the explosion(...) stuff should also 
00119   //        handle properly the case of Z=0 (neutron blob) 
00120   if (explosion(fragment) && theExcitationHandler) {
00121     if (verboseLevel) G4cout << " calling BreakItUp" << G4endl;
00122     precompoundProducts = theExcitationHandler->BreakItUp(*fragment);
00123   } else {
00124     if (verboseLevel) G4cout << " calling DeExcite" << G4endl;
00125     precompoundProducts = theDeExcitation->DeExcite(*fragment);
00126   }
00127 
00128   // Transfer output of de-excitation back into Bertini objects
00129   if (precompoundProducts) {
00130     if (verboseLevel>1) {
00131       G4cout << " Got " << precompoundProducts->size()
00132              << " secondaries back from PreCompound:" << G4endl;
00133     }
00134 
00135     globalOutput.setVerboseLevel(verboseLevel); // For debugging
00136     globalOutput.addOutgoingParticles(precompoundProducts);
00137     globalOutput.setVerboseLevel(0);
00138 
00139     precompoundProducts->clear();
00140     delete precompoundProducts;
00141   }
00142 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:58 2013 for Geant4 by  doxygen 1.4.7