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

#include <G4LENDCapture.hh>

+ Inheritance diagram for G4LENDCapture:

Public Member Functions

 G4LENDCapture (G4ParticleDefinition *pd)
 
 ~G4LENDCapture ()
 
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
 
- Public Member Functions inherited from G4LENDModel
 G4LENDModel (G4String name="LENDModel")
 
 ~G4LENDModel ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
 
void ChangeDefaultEvaluation (G4String name)
 
void AllowNaturalAbundanceTarget ()
 
void AllowAnyCandidateTarget ()
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
const G4HadronicInteractionGetMyPointer () const
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4LENDModel
void create_used_target_map ()
 
void recreate_used_target_map ()
 
- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 
- Protected Attributes inherited from G4LENDModel
G4ParticleDefinitionproj
 
G4LENDManagerlend_manager
 
std::map< G4int, G4LENDUsedTarget * > usedTarget_map
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 44 of file G4LENDCapture.hh.

Constructor & Destructor Documentation

◆ G4LENDCapture()

G4LENDCapture::G4LENDCapture ( G4ParticleDefinition pd)
inline

Definition at line 49 of file G4LENDCapture.hh.

50 :G4LENDModel( "LENDCapture" )
51 {
52 proj = pd;
53
54// theModelName = "LENDCapture for ";
55// theModelName += proj->GetParticleName();
57 };
void create_used_target_map()
Definition: G4LENDModel.cc:86
G4ParticleDefinition * proj
Definition: G4LENDModel.hh:77

◆ ~G4LENDCapture()

G4LENDCapture::~G4LENDCapture ( )
inline

Definition at line 59 of file G4LENDCapture.hh.

59{;};

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4LENDCapture::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus aTargetNucleus 
)
virtual

Reimplemented from G4LENDModel.

Definition at line 32 of file G4LENDCapture.cc.

33{
34
35 G4double temp = aTrack.GetMaterial()->GetTemperature();
36
37 //G4int iZ = int ( aTarg.GetZ() );
38 //G4int iA = int ( aTarg.GetN() );
39 //migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this)
40 G4int iZ = aTarg.GetZ_asInt();
41 G4int iA = aTarg.GetA_asInt();
42
43 G4double ke = aTrack.GetKineticEnergy();
44
46 theResult->Clear();
47
48 G4GIDI_target* aTarget = usedTarget_map.find( lend_manager->GetNucleusEncoding( iZ , iA ) )->second->GetTarget();
49 std::vector<G4GIDI_Product>* products = aTarget->getCaptureFinalState( ke*MeV, temp, NULL, NULL );
50
51
52 if ( products != NULL )
53 {
54
55 G4ThreeVector p(0,0,0);
56 G4int totN = 0;
57
58 for ( G4int j = 0; j < int( products->size() ); j++ )
59 {
60 G4int jZ = (*products)[j].Z;
61 G4int jA = (*products)[j].A;
62
63 //G4cout << "ZA = " << 1000 * (*products)[j].Z + (*products)[j].A << " EK = "
64 // << (*products)[j].kineticEnergy
65 // << " px " << (*products)[j].px
66 // << " py " << (*products)[j].py
67 // << " pz " << (*products)[j].pz
68 // << G4endl;
69
70 G4ThreeVector dp((*products)[j].px,(*products)[j].py,(*products)[j].pz);
71 p += dp;
72
74
75 if ( jA == 1 && jZ == 1 )
76 {
78 totN += 1;
79 }
80 else if ( jA == 1 && jZ == 0 )
81 {
83 totN += 1;
84 }
85 else if ( jZ > 0 )
86 {
87 if ( jA != 0 )
88 {
89 theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ , jA , 0 , 0 ) );
90 totN += jA;
91 }
92 else
93 {
94 theSec->SetDefinition( G4ParticleTable::GetParticleTable()->FindIon( jZ , iA+1-totN , 0 , 0 ) );
95 }
96 }
97 else
98 {
99 theSec->SetDefinition( G4Gamma::Gamma() );
100 }
101
102 theSec->SetMomentum( G4ThreeVector( (*products)[j].px*MeV , (*products)[j].py*MeV , (*products)[j].pz*MeV ) );
103
104 if ( dp.mag() == 0 )
105 {
106 theSec->SetMomentum( -p*MeV );
107 }
108
109 theResult->AddSecondary( theSec );
110 }
111 }
112 delete products;
113
114 theResult->SetStatusChange( stopAndKill );
115
116 return theResult;
117
118}
@ stopAndKill
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
std::vector< G4GIDI_Product > * getCaptureFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP)
const G4Material * GetMaterial() const
G4double GetKineticEnergy() const
G4int GetNucleusEncoding(G4int iZ, G4int iA)
std::map< G4int, G4LENDUsedTarget * > usedTarget_map
Definition: G4LENDModel.hh:79
G4LENDManager * lend_manager
Definition: G4LENDModel.hh:78
G4double GetTemperature() const
Definition: G4Material.hh:181
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4ParticleTable * GetParticleTable()
static G4Proton * Proton()
Definition: G4Proton.cc:93

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