Geant4-11
Public Member Functions | Protected Attributes
G4InuclParamAngDst Class Reference

#include <G4InuclParamAngDst.hh>

Inheritance diagram for G4InuclParamAngDst:
G4VThreeBodyAngDst G4VTwoBodyAngDst G4HadNucl3BodyAngDst G4NuclNucl3BodyAngDst

Public Member Functions

 G4InuclParamAngDst (const G4String &name, const G4double(&abnC)[2][4][4], G4int verbose=0)
 
virtual G4double GetCosTheta (const G4double &ekin, const G4double &pcm) const
 
virtual G4double GetCosTheta (G4int ptype, G4double ekin) const
 
virtual const G4StringGetName () const
 
virtual void setVerboseLevel (G4int verbose=0)
 
virtual ~G4InuclParamAngDst ()
 

Protected Attributes

const G4double(& coeffAB )[2][4][4]
 
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 41 of file G4InuclParamAngDst.hh.

Constructor & Destructor Documentation

◆ G4InuclParamAngDst()

G4InuclParamAngDst::G4InuclParamAngDst ( const G4String name,
const G4double(&)  abnC[2][4][4],
G4int  verbose = 0 
)
inline

Definition at line 44 of file G4InuclParamAngDst.hh.

47 : G4VThreeBodyAngDst(name, verbose), coeffAB(abnC) {;}
const G4double(& coeffAB)[2][4][4]
G4VThreeBodyAngDst(const G4String &name, G4int verbose=0)
const char * name(G4int ptype)

◆ ~G4InuclParamAngDst()

virtual G4InuclParamAngDst::~G4InuclParamAngDst ( )
inlinevirtual

Definition at line 49 of file G4InuclParamAngDst.hh.

49{;}

Member Function Documentation

◆ GetCosTheta() [1/2]

virtual G4double G4InuclParamAngDst::GetCosTheta ( const G4double ekin,
const G4double pcm 
) const
inlinevirtual

Reimplemented from G4VThreeBodyAngDst.

Definition at line 55 of file G4InuclParamAngDst.hh.

55 {
56 return G4VThreeBodyAngDst::GetCosTheta(ekin, pcm);
57 }
virtual G4double GetCosTheta(G4int ptype, G4double ekin) const =0

References G4VThreeBodyAngDst::GetCosTheta().

◆ GetCosTheta() [2/2]

G4double G4InuclParamAngDst::GetCosTheta ( G4int  ptype,
G4double  ekin 
) const
virtual

Implements G4VThreeBodyAngDst.

Definition at line 44 of file G4InuclParamAngDst.cc.

44 {
45 if (verboseLevel>3) {
46 G4cout << theName << "::GetCosTheta: ptype " << ptype << " ekin " << ekin
47 << G4endl;
48 }
49
50 G4int J = (ptype==pro || ptype==neu) ? 0 : 1; // nucleon vs. other
51 if (verboseLevel > 3) G4cout << " J " << J << G4endl;
52
53 const G4int itry_max = 100; // Parametrizations aren't properly bounded
54
55 G4double Spow = -999.;
56 G4int itry = 0;
57
58 /* Loop checking 08.06.2015 MHK */
59 while ((Spow < 0. || Spow > 1.) && itry < itry_max) {
60 itry++;
61 Spow = randomInuclPowers(ekin, coeffAB[J]);
62 }
63
64 if (itry == itry_max) { // No success, just throw flat distribution
65 if (verboseLevel > 2) {
66 G4cout << theName << "::GetCosTheta -> itry = itry_max " << itry
67 << G4endl;
68 }
69
70 Spow = inuclRndm();
71 }
72
73 return 2.0*Spow - 1.0; // Convert generated [0..1] to [-1..1]
74}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4double randomInuclPowers(G4double ekin, const G4double(&coeff)[4][4])

References coeffAB, G4cout, G4endl, G4InuclSpecialFunctions::inuclRndm(), G4InuclParticleNames::neu, G4InuclParticleNames::pro, G4InuclSpecialFunctions::randomInuclPowers(), G4VTwoBodyAngDst::theName, and G4VTwoBodyAngDst::verboseLevel.

◆ GetName()

virtual const G4String & G4VTwoBodyAngDst::GetName ( ) const
inlinevirtualinherited

Definition at line 49 of file G4VTwoBodyAngDst.hh.

49{ return theName; }

References G4VTwoBodyAngDst::theName.

Referenced by G4CascadeFinalStateAlgorithm::ChooseGenerators().

◆ setVerboseLevel()

virtual void G4VTwoBodyAngDst::setVerboseLevel ( G4int  verbose = 0)
inlinevirtualinherited

Definition at line 48 of file G4VTwoBodyAngDst.hh.

48{ verboseLevel = verbose; }

References G4VTwoBodyAngDst::verboseLevel.

Referenced by G4TwoBodyAngularDist::passVerbose().

Field Documentation

◆ coeffAB

const G4double(& G4InuclParamAngDst::coeffAB)[2][4][4]
protected

Definition at line 60 of file G4InuclParamAngDst.hh.

Referenced by GetCosTheta().

◆ theName

G4String G4VTwoBodyAngDst::theName
protectedinherited

◆ verboseLevel

G4int G4VTwoBodyAngDst::verboseLevel
protectedinherited

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