Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhaseSpaceDecayChannel Class Reference

#include <G4PhaseSpaceDecayChannel.hh>

+ Inheritance 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="")
 
virtual ~G4PhaseSpaceDecayChannel ()
 
G4bool SetDaughterMasses (G4double masses[])
 
G4bool SampleDaughterMasses ()
 
virtual G4DecayProductsDecayIt (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 ()
 
G4bool operator== (const G4VDecayChannel &r) const
 
G4bool operator!= (const G4VDecayChannel &r) const
 
G4bool operator< (const G4VDecayChannel &right) const
 
virtual G4DecayProductsDecayIt (G4double parentMass=-1.0)=0
 
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 ()
 
G4double GetRangeMass () const
 
void SetRangeMass (G4double val)
 
virtual G4bool IsOKWithParentMass (G4double parentMass)
 
void SetPolarization (const G4ThreeVector &)
 
const G4ThreeVectorGetPolarization () 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 ()
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=1.0) const
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name = ""
 
G4double rbranch = 0.0
 
G4Stringparent_name = nullptr
 
G4String ** daughters_name = nullptr
 
G4double rangeMass = 2.5
 
G4ThreeVector parent_polarization
 
G4ParticleTableparticletable = nullptr
 
G4ParticleDefinitionG4MT_parent = nullptr
 
G4ParticleDefinition ** G4MT_daughters = nullptr
 
G4double G4MT_parent_mass = 0.0
 
G4doubleG4MT_daughters_mass = nullptr
 
G4doubleG4MT_daughters_width = nullptr
 
G4Mutex daughtersMutex
 
G4Mutex parentMutex
 
G4int numberOfDaughters = 0
 
G4int verboseLevel = 1
 
- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 42 of file G4PhaseSpaceDecayChannel.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_N_DAUGHTERS 

Definition at line 46 of file G4PhaseSpaceDecayChannel.hh.

Constructor & Destructor Documentation

◆ G4PhaseSpaceDecayChannel() [1/2]

G4PhaseSpaceDecayChannel::G4PhaseSpaceDecayChannel ( G4int  Verbose = 1)

Definition at line 42 of file G4PhaseSpaceDecayChannel.cc.

43 : G4VDecayChannel("Phase Space", Verbose)
44{
45}

◆ G4PhaseSpaceDecayChannel() [2/2]

G4PhaseSpaceDecayChannel::G4PhaseSpaceDecayChannel ( const G4String theParentName,
G4double  theBR,
G4int  theNumberOfDaughters,
const G4String theDaughterName1,
const G4String theDaughterName2 = "",
const G4String theDaughterName3 = "",
const G4String theDaughterName4 = "" 
)

Definition at line 47 of file G4PhaseSpaceDecayChannel.cc.

55 : G4VDecayChannel("Phase Space", theParentName,theBR, theNumberOfDaughters,
56 theDaughterName1, theDaughterName2,
57 theDaughterName3, theDaughterName4)
58{
59}

◆ ~G4PhaseSpaceDecayChannel()

G4PhaseSpaceDecayChannel::~G4PhaseSpaceDecayChannel ( )
virtual

Definition at line 62 of file G4PhaseSpaceDecayChannel.cc.

63{
64}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4PhaseSpaceDecayChannel::DecayIt ( G4double  parentMass)
virtual

Implements G4VDecayChannel.

Definition at line 67 of file G4PhaseSpaceDecayChannel.cc.

68{
69#ifdef G4VERBOSE
70 if (GetVerboseLevel()>1)
71 G4cout << "G4PhaseSpaceDecayChannel::DecayIt()" << G4endl;
72#endif
73
74 G4DecayProducts* products = nullptr;
75
78
79 if (parentMass >0.0) current_parent_mass.Put( parentMass );
80 else current_parent_mass.Put(G4MT_parent_mass);
81
82 switch (numberOfDaughters)
83 {
84 case 0:
85#ifdef G4VERBOSE
86 if (GetVerboseLevel()>0)
87 {
88 G4cout << "G4PhaseSpaceDecayChannel::DecayIt() -";
89 G4cout << " daughters not defined " << G4endl;
90 }
91#endif
92 break;
93 case 1:
94 products = OneBodyDecayIt();
95 break;
96 case 2:
97 products = TwoBodyDecayIt();
98 break;
99 case 3:
100 products = ThreeBodyDecayIt();
101 break;
102 default:
103 products = ManyBodyDecayIt();
104 break;
105 }
106#ifdef G4VERBOSE
107 if ((products == nullptr) && (GetVerboseLevel()>0))
108 {
109 G4cout << "G4PhaseSpaceDecayChannel::DecayIt() - ";
110 G4cout << *parent_name << " cannot decay " << G4endl;
111 DumpInfo();
112 }
113#endif
114 return products;
115}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void Put(const value_type &val) const
Definition: G4Cache.hh:321
G4String * parent_name
G4int GetVerboseLevel() const
G4double G4MT_parent_mass
void CheckAndFillDaughters()

◆ IsOKWithParentMass()

G4bool G4PhaseSpaceDecayChannel::IsOKWithParentMass ( G4double  parentMass)
virtual

Reimplemented from G4VDecayChannel.

Definition at line 850 of file G4PhaseSpaceDecayChannel.cc.

851{
852 if (!useGivenDaughterMass)
853 return G4VDecayChannel::IsOKWithParentMass(parentMass);
854
857
858 G4double sumOfDaughterMassMin=0.0;
859 for (G4int index=0; index<numberOfDaughters; ++index)
860 {
861 sumOfDaughterMassMin += givenDaughterMasses[index];
862 }
863 return (parentMass >= sumOfDaughterMassMin);
864}
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
virtual G4bool IsOKWithParentMass(G4double parentMass)

◆ Pmx()

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

Definition at line 867 of file G4PhaseSpaceDecayChannel.cc.

868{
869 // calcurate momentum of daughter particles in two-body decay
870 G4double ppp = (e+p1+p2)*(e+p1-p2)*(e-p1+p2)*(e-p1-p2)/(4.0*e*e);
871 if (ppp>0) return std::sqrt(ppp);
872 else return -1.;
873}

Referenced by G4DalitzDecayChannel::DecayIt().

◆ SampleDaughterMasses()

G4bool G4PhaseSpaceDecayChannel::SampleDaughterMasses ( )

Definition at line 843 of file G4PhaseSpaceDecayChannel.cc.

844{
845 useGivenDaughterMass = false;
846 return useGivenDaughterMass;
847}

◆ SetDaughterMasses()

G4bool G4PhaseSpaceDecayChannel::SetDaughterMasses ( G4double  masses[])

Definition at line 832 of file G4PhaseSpaceDecayChannel.cc.

833{
834 for (G4int idx=0; idx<numberOfDaughters; ++idx)
835 {
836 givenDaughterMasses[idx] = masses[idx];
837 }
838 useGivenDaughterMass = true;
839 return useGivenDaughterMass;
840}

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