Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4InuclParamAngDst Class Reference

#include <G4InuclParamAngDst.hh>

Inheritance diagram for G4InuclParamAngDst:
Collaboration diagram for G4InuclParamAngDst:

Public Member Functions

 G4InuclParamAngDst (const G4String &name, const G4double(&abnC)[2][4][4], G4int verbose=0)
 
virtual ~G4InuclParamAngDst ()
 
virtual G4double GetCosTheta (G4int ptype, G4double ekin) const
 
virtual G4double GetCosTheta (const G4double &ekin, const G4double &pcm) const
 
- Public Member Functions inherited from G4VThreeBodyAngDst
 G4VThreeBodyAngDst (const G4String &name, G4int verbose=0)
 
virtual ~G4VThreeBodyAngDst ()
 
- Public Member Functions inherited from G4VTwoBodyAngDst
 G4VTwoBodyAngDst (const G4String &name, G4int verbose=0)
 
virtual ~G4VTwoBodyAngDst ()
 
virtual void setVerboseLevel (G4int verbose=0)
 
virtual const G4StringGetName () const
 

Protected Attributes

const G4double(& coeffAB )[2][4][4]
 
- Protected Attributes inherited from G4VTwoBodyAngDst
G4String theName
 
G4int verboseLevel
 

Detailed Description

Definition at line 42 of file G4InuclParamAngDst.hh.

Constructor & Destructor Documentation

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

Definition at line 45 of file G4InuclParamAngDst.hh.

48  : G4VThreeBodyAngDst(name, verbose), coeffAB(abnC) {;}
const G4double(& coeffAB)[2][4][4]
G4VThreeBodyAngDst(const G4String &name, G4int verbose=0)
virtual G4InuclParamAngDst::~G4InuclParamAngDst ( )
inlinevirtual

Definition at line 50 of file G4InuclParamAngDst.hh.

50 {;}

Member Function Documentation

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

Implements G4VThreeBodyAngDst.

Definition at line 45 of file G4InuclParamAngDst.cc.

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

Here is the call graph for this function:

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

Reimplemented from G4VThreeBodyAngDst.

Definition at line 56 of file G4InuclParamAngDst.hh.

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

Here is the call graph for this function:

Member Data Documentation

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

Definition at line 61 of file G4InuclParamAngDst.hh.


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