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

#include <G4InuclParamMomDst.hh>

+ Inheritance diagram for G4InuclParamMomDst:

Public Member Functions

 G4InuclParamMomDst (const G4String &name, const G4double(&pqprC)[2][4][4], const G4double(&psC)[2][3], G4int verbose=0)
 
virtual ~G4InuclParamMomDst ()
 
virtual G4double GetMomentum (G4int ptype, const G4double &ekin) const
 
- Public Member Functions inherited from G4VMultiBodyMomDst
 G4VMultiBodyMomDst (const G4String &name, G4int verbose=0)
 
virtual ~G4VMultiBodyMomDst ()
 
virtual G4double GetMomentum (G4int ptype, const G4double &ekin) const =0
 
virtual void setVerboseLevel (G4int verbose=0)
 
virtual const G4StringGetName () const
 

Protected Attributes

const G4double(& coeffPR )[2][4][4]
 
const G4double(& coeffPS )[2][3]
 
- Protected Attributes inherited from G4VMultiBodyMomDst
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 41 of file G4InuclParamMomDst.hh.

Constructor & Destructor Documentation

◆ G4InuclParamMomDst()

G4InuclParamMomDst::G4InuclParamMomDst ( const G4String name,
const G4double(&)  pqprC[2][4][4],
const G4double(&)  psC[2][3],
G4int  verbose = 0 
)
inline

Definition at line 44 of file G4InuclParamMomDst.hh.

48 : G4VMultiBodyMomDst(name, verbose), coeffPR(pqprC), coeffPS(psC) {;}
const G4double(& coeffPS)[2][3]
const G4double(& coeffPR)[2][4][4]

◆ ~G4InuclParamMomDst()

virtual G4InuclParamMomDst::~G4InuclParamMomDst ( )
inlinevirtual

Definition at line 50 of file G4InuclParamMomDst.hh.

50{;}

Member Function Documentation

◆ GetMomentum()

G4double G4InuclParamMomDst::GetMomentum ( G4int  ptype,
const G4double ekin 
) const
virtual

Implements G4VMultiBodyMomDst.

Definition at line 48 of file G4InuclParamMomDst.cc.

48 {
49 if (verboseLevel>3) {
50 G4cout << theName << "::GetMomentum: ptype " << ptype << " ekin " << ekin
51 << G4endl;
52 }
53
54 G4int JK = (ptype==pro || ptype==neu) ? 0 : 1; // nucleon vs. other
55
56 if (verboseLevel > 3) G4cout << " JK " << JK << G4endl;
57
58 G4Pow* theG4Pow = G4Pow::GetInstance(); // For convenience
59
60 G4double Spow = randomInuclPowers(ekin, coeffPR[JK]);
61
62 G4double C=0., PS=0.;
63 for(G4int im = 0; im < 3; im++) {
64 C = coeffPS[JK][im];
65 PS += C * theG4Pow->powN(ekin, im);
66
67 if (verboseLevel >3) {
68 G4cout << " im " << im << " : coeffPS[JK][im] " << C
69 << " ekin^im " << theG4Pow->powN(ekin, im) << G4endl;
70 }
71 }
72
73 G4double PRA = PS * Spow;
74
75 if (verboseLevel > 3)
76 G4cout << " PS " << PS << " Spow = sqrt(S)*(PR+(1-PQ)*S^4) " << Spow
77 << " PRA = PS*Spow " << PRA << G4endl;
78
79 return std::fabs(PRA);
80}
double C(double temp)
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
Definition: G4Pow.hh:49
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:166
G4double randomInuclPowers(G4double ekin, const G4double(&coeff)[4][4])

Member Data Documentation

◆ coeffPR

const G4double(& G4InuclParamMomDst::coeffPR)[2][4][4]
protected

Definition at line 55 of file G4InuclParamMomDst.hh.

Referenced by GetMomentum().

◆ coeffPS

const G4double(& G4InuclParamMomDst::coeffPS)[2][3]
protected

Definition at line 56 of file G4InuclParamMomDst.hh.

Referenced by GetMomentum().


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