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

#include <G4VHadPhaseSpaceAlgorithm.hh>

Inheritance diagram for G4VHadPhaseSpaceAlgorithm:
Collaboration diagram for G4VHadPhaseSpaceAlgorithm:

Public Member Functions

 G4VHadPhaseSpaceAlgorithm (const G4String &algName, G4int verbose=0)
 
virtual ~G4VHadPhaseSpaceAlgorithm ()
 
- Public Member Functions inherited from G4VHadDecayAlgorithm
 G4VHadDecayAlgorithm (const G4String &algName, G4int verbose=0)
 
virtual ~G4VHadDecayAlgorithm ()
 
void Generate (G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
 
virtual void SetVerboseLevel (G4int verbose)
 
G4int GetVerboseLevel () const
 
const G4StringGetName () const
 

Protected Member Functions

virtual void GenerateTwoBody (G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)
 
G4ThreeVector UniformVector (G4double mag=1.) const
 
- Protected Member Functions inherited from G4VHadDecayAlgorithm
virtual void GenerateMultiBody (G4double initialMass, const std::vector< G4double > &masses, std::vector< G4LorentzVector > &finalState)=0
 
virtual G4bool IsDecayAllowed (G4double initialMass, const std::vector< G4double > &masses) const
 
G4double TwoBodyMomentum (G4double M0, G4double M1, G4double M2) const
 
G4double UniformTheta () const
 
G4double UniformPhi () const
 
void PrintVector (const std::vector< G4double > &v, const G4String &name, std::ostream &os) const
 

Detailed Description

Definition at line 44 of file G4VHadPhaseSpaceAlgorithm.hh.

Constructor & Destructor Documentation

G4VHadPhaseSpaceAlgorithm::G4VHadPhaseSpaceAlgorithm ( const G4String algName,
G4int  verbose = 0 
)
inline

Definition at line 46 of file G4VHadPhaseSpaceAlgorithm.hh.

47  : G4VHadDecayAlgorithm(algName, verbose) {;}
G4VHadDecayAlgorithm(const G4String &algName, G4int verbose=0)
virtual G4VHadPhaseSpaceAlgorithm::~G4VHadPhaseSpaceAlgorithm ( )
inlinevirtual

Definition at line 48 of file G4VHadPhaseSpaceAlgorithm.hh.

48 {;}

Member Function Documentation

void G4VHadPhaseSpaceAlgorithm::GenerateTwoBody ( G4double  initialMass,
const std::vector< G4double > &  masses,
std::vector< G4LorentzVector > &  finalState 
)
protectedvirtual

Implements G4VHadDecayAlgorithm.

Definition at line 52 of file G4VHadPhaseSpaceAlgorithm.cc.

54  {
55  if (GetVerboseLevel()>1)
56  G4cout << " >>> G4HadDecayGenerator::FillTwoBody" << G4endl;
57 
58  // Initialization and sanity check
59  finalState.clear();
60  if (masses.size() != 2U) return; // Should not have been called
61 
62  // Momentum of final state (energy balance has already been checked)
63  G4double p = TwoBodyMomentum(initialMass,masses[0],masses[1]);
64  if (GetVerboseLevel()>2) G4cout << " finalState momentum = " << p << G4endl;
65 
66  finalState.resize(2); // Allows filling by index
67  finalState[0].setVectM(UniformVector(p), masses[0]);
68  finalState[1].setVectM(-finalState[0].vect(), masses[1]);
69 }
const char * p
Definition: xmltok.h:285
G4int GetVerboseLevel() const
G4GLOB_DLL std::ostream G4cout
G4double TwoBodyMomentum(G4double M0, G4double M1, G4double M2) const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4ThreeVector UniformVector(G4double mag=1.) const

Here is the call graph for this function:

G4ThreeVector G4VHadPhaseSpaceAlgorithm::UniformVector ( G4double  mag = 1.) const
protected

Definition at line 74 of file G4VHadPhaseSpaceAlgorithm.cc.

74  {
75  // FIXME: Should this be made a static thread-local buffer?
76  G4ThreeVector v;
78  return v;
79 }
G4double UniformTheta() const
void setRThetaPhi(double r, double theta, double phi)
G4double UniformPhi() const

Here is the call graph for this function:

Here is the caller graph for this function:


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