Geant4 11.2.2
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 = 5 }
 

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="", const G4String &theDaughterName5="")
 
 ~G4PhaseSpaceDecayChannel () override=default
 
G4bool SetDaughterMasses (G4double masses[])
 
G4bool SampleDaughterMasses ()
 
G4DecayProductsDecayIt (G4double) override
 
G4bool IsOKWithParentMass (G4double parentMass) override
 
- 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="", const G4String &theDaughterName5="")
 
virtual ~G4VDecayChannel ()
 
G4bool operator== (const G4VDecayChannel &r) const
 
G4bool operator!= (const G4VDecayChannel &r) const
 
G4bool 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 ()
 
G4double GetRangeMass () const
 
void SetRangeMass (G4double val)
 
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
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
void ClearDaughtersName ()
 
void CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=1.0) const
 
- 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 45 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{}

◆ G4PhaseSpaceDecayChannel() [2/2]

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

Definition at line 46 of file G4PhaseSpaceDecayChannel.cc.

53 : G4VDecayChannel("Phase Space", theParentName, theBR, theNumberOfDaughters, theDaughterName1,
54 theDaughterName2, theDaughterName3, theDaughterName4, theDaughterName5)
55{}

◆ ~G4PhaseSpaceDecayChannel()

G4PhaseSpaceDecayChannel::~G4PhaseSpaceDecayChannel ( )
overridedefault

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4PhaseSpaceDecayChannel::DecayIt ( G4double parentMass)
overridevirtual

Implements G4VDecayChannel.

Definition at line 57 of file G4PhaseSpaceDecayChannel.cc.

58{
59#ifdef G4VERBOSE
60 if (GetVerboseLevel() > 1) G4cout << "G4PhaseSpaceDecayChannel::DecayIt()" << G4endl;
61#endif
62
63 G4DecayProducts* products = nullptr;
64
67
68 if (parentMass > 0.0)
69 current_parent_mass.Put(parentMass);
70 else
71 current_parent_mass.Put(G4MT_parent_mass);
72
73 switch (numberOfDaughters) {
74 case 0:
75#ifdef G4VERBOSE
76 if (GetVerboseLevel() > 0) {
77 G4cout << "G4PhaseSpaceDecayChannel::DecayIt() -";
78 G4cout << " daughters not defined " << G4endl;
79 }
80#endif
81 break;
82 case 1:
83 products = OneBodyDecayIt();
84 break;
85 case 2:
86 products = TwoBodyDecayIt();
87 break;
88 case 3:
89 products = ThreeBodyDecayIt();
90 break;
91 default:
92 products = ManyBodyDecayIt();
93 break;
94 }
95#ifdef G4VERBOSE
96 if ((products == nullptr) && (GetVerboseLevel() > 0)) {
97 G4cout << "G4PhaseSpaceDecayChannel::DecayIt() - ";
98 G4cout << *parent_name << " cannot decay " << G4endl;
99 DumpInfo();
100 }
101#endif
102 return products;
103}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void Put(const value_type &val) const
Definition G4Cache.hh:321
G4int GetVerboseLevel() const

◆ IsOKWithParentMass()

G4bool G4PhaseSpaceDecayChannel::IsOKWithParentMass ( G4double parentMass)
overridevirtual

Reimplemented from G4VDecayChannel.

Definition at line 736 of file G4PhaseSpaceDecayChannel.cc.

737{
738 if (!useGivenDaughterMass) return G4VDecayChannel::IsOKWithParentMass(parentMass);
739
742
743 G4double sumOfDaughterMassMin = 0.0;
744 for (G4int index = 0; index < numberOfDaughters; ++index) {
745 sumOfDaughterMassMin += givenDaughterMasses[index];
746 }
747 return (parentMass >= sumOfDaughterMassMin);
748}
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 750 of file G4PhaseSpaceDecayChannel.cc.

751{
752 // calcurate momentum of daughter particles in two-body decay
753 G4double ppp = (e + p1 + p2) * (e + p1 - p2) * (e - p1 + p2) * (e - p1 - p2) / (4.0 * e * e);
754 if (ppp > 0) return std::sqrt(ppp);
755 return -1.;
756}

Referenced by G4DalitzDecayChannel::DecayIt().

◆ SampleDaughterMasses()

G4bool G4PhaseSpaceDecayChannel::SampleDaughterMasses ( )

Definition at line 730 of file G4PhaseSpaceDecayChannel.cc.

731{
732 useGivenDaughterMass = false;
733 return useGivenDaughterMass;
734}

◆ SetDaughterMasses()

G4bool G4PhaseSpaceDecayChannel::SetDaughterMasses ( G4double masses[])

Definition at line 721 of file G4PhaseSpaceDecayChannel.cc.

722{
723 for (G4int idx = 0; idx < numberOfDaughters; ++idx) {
724 givenDaughterMasses[idx] = masses[idx];
725 }
726 useGivenDaughterMass = true;
727 return useGivenDaughterMass;
728}

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