Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4InuclParamMomDst Class Reference

#include <G4InuclParamMomDst.hh>

Inheritance diagram for G4InuclParamMomDst:
Collaboration 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 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 42 of file G4InuclParamMomDst.hh.

Constructor & Destructor Documentation

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

Definition at line 45 of file G4InuclParamMomDst.hh.

49  : G4VMultiBodyMomDst(name, verbose), coeffPR(pqprC), coeffPS(psC) {;}
G4VMultiBodyMomDst(const G4String &name, G4int verbose=0)
const G4double(& coeffPR)[2][4][4]
const G4double(& coeffPS)[2][3]
virtual G4InuclParamMomDst::~G4InuclParamMomDst ( )
inlinevirtual

Definition at line 51 of file G4InuclParamMomDst.hh.

51 {;}

Member Function Documentation

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

Implements G4VMultiBodyMomDst.

Definition at line 49 of file G4InuclParamMomDst.cc.

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

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 56 of file G4InuclParamMomDst.hh.

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

Definition at line 57 of file G4InuclParamMomDst.hh.


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