Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
G4PhaseSpaceDecayChannel Class Reference

#include <G4PhaseSpaceDecayChannel.hh>

Inheritance diagram for G4PhaseSpaceDecayChannel:
G4VDecayChannel

Public Member Functions

 G4PhaseSpaceDecayChannel (G4int Verbose=1)
 
 G4PhaseSpaceDecayChannel (const G4String &theParentName, G4double theBR, G4int theNumberOfDaughters, const G4String &theDaughterName1, const G4String &theDaughterName2="", const G4String &theDaughterName3="", const G4String &theDaughterName4="")
 
virtual ~G4PhaseSpaceDecayChannel ()
 
virtual G4DecayProductsDecayIt (G4double)
 
- Public Member Functions inherited from G4VDecayChannel
 G4VDecayChannel (const G4String &aName, G4int Verbose=1)
 
 G4VDecayChannel (const G4String &aName, const G4String &theParentName, G4double theBR, G4int theNumberOfDaughters, const G4String &theDaughterName1, const G4String &theDaughterName2="", const G4String &theDaughterName3="", const G4String &theDaughterName4="")
 
virtual ~G4VDecayChannel ()
 
G4int operator== (const G4VDecayChannel &right) const
 
G4int operator!= (const G4VDecayChannel &right) const
 
G4int operator< (const G4VDecayChannel &right) const
 
const G4StringGetKinematicsName () const
 
G4double GetBR () const
 
G4int GetNumberOfDaughters () const
 
G4ParticleDefinitionGetParent ()
 
G4ParticleDefinitionGetDaughter (G4int anIndex)
 
G4int GetAngularMomentum ()
 
const G4StringGetParentName () const
 
const G4StringGetDaughterName (G4int anIndex) const
 
G4double GetParentMass () const
 
G4double GetDaughterMass (G4int anIndex) const
 
void SetParent (const G4ParticleDefinition *particle_type)
 
void SetParent (const G4String &particle_name)
 
void SetBR (G4double value)
 
void SetNumberOfDaughters (G4int value)
 
void SetDaughter (G4int anIndex, const G4ParticleDefinition *particle_type)
 
void SetDaughter (G4int anIndex, const G4String &particle_name)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
void DumpInfo ()
 

Static Public Member Functions

static G4double Pmx (G4double e, G4double p1, G4double p2)
 

Additional Inherited Members

- Protected Member Functions inherited from G4VDecayChannel
void ClearDaughtersName ()
 
void FillDaughters ()
 
void FillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4Stringparent_name
 
G4String ** daughters_name
 
G4ParticleTableparticletable
 
G4int verboseLevel
 
G4ParticleDefinitionG4MT_parent
 
G4ParticleDefinition ** G4MT_daughters
 
G4double G4MT_parent_mass
 
G4doubleG4MT_daughters_mass
 
- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 45 of file G4PhaseSpaceDecayChannel.hh.

Constructor & Destructor Documentation

G4PhaseSpaceDecayChannel::G4PhaseSpaceDecayChannel ( G4int  Verbose = 1)

Definition at line 51 of file G4PhaseSpaceDecayChannel.cc.

52  :G4VDecayChannel("Phase Space", Verbose)
53 {
54 
55 }
G4PhaseSpaceDecayChannel::G4PhaseSpaceDecayChannel ( const G4String theParentName,
G4double  theBR,
G4int  theNumberOfDaughters,
const G4String theDaughterName1,
const G4String theDaughterName2 = "",
const G4String theDaughterName3 = "",
const G4String theDaughterName4 = "" 
)

Definition at line 57 of file G4PhaseSpaceDecayChannel.cc.

65  :G4VDecayChannel("Phase Space",
66  theParentName,theBR,
67  theNumberOfDaughters,
68  theDaughterName1,
69  theDaughterName2,
70  theDaughterName3,
71  theDaughterName4)
72 {
73 
74 }
G4PhaseSpaceDecayChannel::~G4PhaseSpaceDecayChannel ( )
virtual

Definition at line 76 of file G4PhaseSpaceDecayChannel.cc.

77 {
78 }

Member Function Documentation

G4DecayProducts * G4PhaseSpaceDecayChannel::DecayIt ( G4double  parentMass)
virtual

Implements G4VDecayChannel.

Definition at line 80 of file G4PhaseSpaceDecayChannel.cc.

References G4VDecayChannel::DumpInfo(), G4VDecayChannel::FillDaughters(), G4VDecayChannel::FillParent(), G4cout, G4endl, G4VDecayChannel::G4MT_daughters, G4VDecayChannel::G4MT_parent, G4VDecayChannel::G4MT_parent_mass, G4VDecayChannel::GetVerboseLevel(), G4VDecayChannel::numberOfDaughters, and G4VDecayChannel::parent_name.

81 {
82 #ifdef G4VERBOSE
83  if (GetVerboseLevel()>1) G4cout << "G4PhaseSpaceDecayChannel::DecayIt ";
84 #endif
85 
86  G4DecayProducts * products = 0;
87 
88  if (G4MT_parent == 0) FillParent();
89  if (G4MT_daughters == 0) FillDaughters();
90 
91  if (parentMass >0.0) current_parent_mass = parentMass;
92  else current_parent_mass = G4MT_parent_mass;
93 
94  switch (numberOfDaughters){
95  case 0:
96 #ifdef G4VERBOSE
97  if (GetVerboseLevel()>0) {
98  G4cout << "G4PhaseSpaceDecayChannel::DecayIt ";
99  G4cout << " daughters not defined " <<G4endl;
100  }
101 #endif
102  break;
103  case 1:
104  products = OneBodyDecayIt();
105  break;
106  case 2:
107  products = TwoBodyDecayIt();
108  break;
109  case 3:
110  products = ThreeBodyDecayIt();
111  break;
112  default:
113  products = ManyBodyDecayIt();
114  break;
115  }
116 #ifdef G4VERBOSE
117  if ((products == 0) && (GetVerboseLevel()>0)) {
118  G4cout << "G4PhaseSpaceDecayChannel::DecayIt ";
119  G4cout << *parent_name << " can not decay " << G4endl;
120  DumpInfo();
121  }
122 #endif
123  return products;
124 }
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
G4double G4MT_parent_mass
G4GLOB_DLL std::ostream G4cout
G4String * parent_name
G4int GetVerboseLevel() const
#define G4endl
Definition: G4ios.hh:61
G4double G4PhaseSpaceDecayChannel::Pmx ( G4double  e,
G4double  p1,
G4double  p2 
)
static

Definition at line 563 of file G4PhaseSpaceDecayChannel.cc.

Referenced by G4DalitzDecayChannel::DecayIt().

564 {
565  // calcurate momentum of daughter particles in two-body decay
566  G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
567  if (ppp>0) return std::sqrt(ppp);
568  else return -1.;
569 }
double G4double
Definition: G4Types.hh:76

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