Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ~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 44 of file G4InuclParamAngDst.cc.

References G4cout, G4endl, G4InuclSpecialFunctions::inuclRndm(), G4InuclParticleNames::neu, G4InuclParticleNames::pro, and G4InuclSpecialFunctions::randomInuclPowers().

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  while ((Spow < 0. || Spow > 1.) && itry < itry_max) {
58  itry++;
59  Spow = randomInuclPowers(ekin, coeffAB[J]);
60  }
61 
62  if (itry == itry_max) { // No success, just throw flat distribution
63  if (verboseLevel > 2) {
64  G4cout << theName << "::GetCosTheta -> itry = itry_max " << itry
65  << G4endl;
66  }
67 
68  Spow = inuclRndm();
69  }
70 
71  return 2.0*Spow - 1.0; // Convert generated [0..1] to [-1..1]
72 }
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
virtual G4double G4InuclParamAngDst::GetCosTheta ( const G4double ekin,
const G4double pcm 
) const
inlinevirtual

Reimplemented from G4VThreeBodyAngDst.

Definition at line 56 of file G4InuclParamAngDst.hh.

References G4VThreeBodyAngDst::GetCosTheta().

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

Field 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: