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

#include <G4PhaseSpaceDecayChannel.hh>

Inheritance diagram for G4PhaseSpaceDecayChannel:
Collaboration diagram for G4PhaseSpaceDecayChannel:

Public Types

enum  { MAX_N_DAUGHTERS =4 }
 

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="")
 
G4bool SetDaughterMasses (G4double masses[])
 
G4bool SampleDaughterMasses ()
 
virtual ~G4PhaseSpaceDecayChannel ()
 
virtual G4DecayProducts * DecayIt (G4double)
 
G4bool IsOKWithParentMass (G4double parentMass)
 
- 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 G4String & GetKinematicsName () const
 
G4double GetBR () const
 
G4int GetNumberOfDaughters () const
 
G4ParticleDefinition * GetParent ()
 
G4ParticleDefinition * GetDaughter (G4int anIndex)
 
G4int GetAngularMomentum ()
 
const G4String & GetParentName () const
 
const G4String & GetDaughterName (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 ()
 
G4double GetRangeMass () const
 
void SetRangeMass (G4double val)
 
void SetPolarization (const G4ThreeVector &)
 
const G4ThreeVector & GetPolarization () const
 

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 CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChannel & operator= (const G4VDecayChannel &)
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=+1.) const
 
- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4String * parent_name
 
G4String ** daughters_name
 
G4double rangeMass
 
G4ThreeVector parent_polarization
 
G4ParticleTable * particletable
 
G4int verboseLevel
 
G4ParticleDefinition * G4MT_parent
 
G4ParticleDefinition ** G4MT_daughters
 
G4double G4MT_parent_mass
 
G4double * G4MT_daughters_mass
 
G4double * G4MT_daughters_width
 
G4Mutex daughtersMutex
 
G4Mutex parentMutex
 
- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 46 of file G4PhaseSpaceDecayChannel.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_N_DAUGHTERS 

Definition at line 49 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  useGivenDaughterMass(false)
54 {
55 
56 }
G4PhaseSpaceDecayChannel::G4PhaseSpaceDecayChannel ( const G4String &  theParentName,
G4double  theBR,
G4int  theNumberOfDaughters,
const G4String &  theDaughterName1,
const G4String &  theDaughterName2 = "",
const G4String &  theDaughterName3 = "",
const G4String &  theDaughterName4 = "" 
)

Definition at line 58 of file G4PhaseSpaceDecayChannel.cc.

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

Definition at line 78 of file G4PhaseSpaceDecayChannel.cc.

79 {
80 }

Member Function Documentation

G4DecayProducts * G4PhaseSpaceDecayChannel::DecayIt ( G4double  parentMass)
virtual

Implements G4VDecayChannel.

Definition at line 82 of file G4PhaseSpaceDecayChannel.cc.

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

Here is the call graph for this function:

G4bool G4PhaseSpaceDecayChannel::IsOKWithParentMass ( G4double  parentMass)
virtual

Reimplemented from G4VDecayChannel.

Definition at line 726 of file G4PhaseSpaceDecayChannel.cc.

726  {
727  if (!useGivenDaughterMass) return G4VDecayChannel::IsOKWithParentMass(parentMass);
728 
731 
732  G4double sumOfDaughterMassMin=0.0;
733  for (G4int index=0; index < numberOfDaughters; index++) {
734  sumOfDaughterMassMin += givenDaughterMasses[index];
735  }
736  return (parentMass >= sumOfDaughterMassMin);
737 }
void CheckAndFillDaughters()
virtual G4bool IsOKWithParentMass(G4double parentMass)
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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

Definition at line 739 of file G4PhaseSpaceDecayChannel.cc.

740 {
741  // calcurate momentum of daughter particles in two-body decay
742  G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
743  if (ppp>0) return std::sqrt(ppp);
744  else return -1.;
745 }
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4bool G4PhaseSpaceDecayChannel::SampleDaughterMasses ( )

Definition at line 720 of file G4PhaseSpaceDecayChannel.cc.

721 {
722  useGivenDaughterMass = false;
723  return useGivenDaughterMass;
724 }
G4bool G4PhaseSpaceDecayChannel::SetDaughterMasses ( G4double  masses[])

Definition at line 711 of file G4PhaseSpaceDecayChannel.cc.

712 {
713  for (G4int idx=0; idx<numberOfDaughters; idx++){
714  givenDaughterMasses[idx] = masses[idx];
715  }
716  useGivenDaughterMass = true;
717  return useGivenDaughterMass;
718 }
int G4int
Definition: G4Types.hh:78

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