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

#include <G4DalitzDecayChannel.hh>

+ Inheritance diagram for G4DalitzDecayChannel:

Public Member Functions

 G4DalitzDecayChannel (const G4String &theParentName, G4double theBR, const G4String &theLeptonName, const G4String &theAntiLeptonName)
 
 ~G4DalitzDecayChannel () override=default
 
G4DecayProductsDecayIt (G4double) 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)
 
virtual G4bool IsOKWithParentMass (G4double parentMass)
 
void SetPolarization (const G4ThreeVector &)
 
const G4ThreeVectorGetPolarization () const
 

Protected Member Functions

 G4DalitzDecayChannel (const G4DalitzDecayChannel &)=default
 
G4DalitzDecayChanneloperator= (const G4DalitzDecayChannel &)
 
- 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
 

Additional Inherited Members

- 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 G4DalitzDecayChannel.hh.

Constructor & Destructor Documentation

◆ G4DalitzDecayChannel() [1/2]

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4String & theParentName,
G4double theBR,
const G4String & theLeptonName,
const G4String & theAntiLeptonName )

Definition at line 43 of file G4DalitzDecayChannel.cc.

46 : G4VDecayChannel("Dalitz Decay", 1)
47{
48 // set names for daughter particles
49 SetParent(theParentName);
50 SetBR(theBR);
52 G4String gammaName = "gamma";
53 SetDaughter(idGamma, gammaName);
54 SetDaughter(idLepton, theLeptonName);
55 SetDaughter(idAntiLepton, theAntiLeptonName);
56}
void SetBR(G4double value)
void SetNumberOfDaughters(G4int value)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
void SetParent(const G4ParticleDefinition *particle_type)

Referenced by G4DalitzDecayChannel().

◆ ~G4DalitzDecayChannel()

G4DalitzDecayChannel::~G4DalitzDecayChannel ( )
overridedefault

◆ G4DalitzDecayChannel() [2/2]

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4DalitzDecayChannel & )
protecteddefault

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double )
overridevirtual

Implements G4VDecayChannel.

Definition at line 85 of file G4DalitzDecayChannel.cc.

86{
87#ifdef G4VERBOSE
88 if (GetVerboseLevel() > 1) G4cout << "G4DalitzDecayChannel::DecayIt ";
89#endif
92
93 // parent mass
94 G4double parentmass = G4MT_parent->GetPDGMass();
95
96 // create parent G4DynamicParticle at rest
97 G4ThreeVector dummy;
98 auto parentparticle = new G4DynamicParticle(G4MT_parent, dummy, 0.0);
99
100 // daughters' mass
101 G4double leptonmass = G4MT_daughters[idLepton]->GetPDGMass();
102
103 // Generate t ( = std::exp(x):mass Square of (l+ l-) system)
104 G4double xmin = 2.0 * std::log(2.0 * leptonmass);
105 G4double xmax = 2.0 * std::log(parentmass);
106 G4double wmax = 1.5;
107 G4double x, w, ww, w1, w2, w3, t;
108 const std::size_t MAX_LOOP = 10000;
109 for (std::size_t loop_counter = 0; loop_counter < MAX_LOOP; ++loop_counter) {
110 x = G4UniformRand() * (xmax - xmin) + xmin;
111 w = G4UniformRand() * wmax;
112 t = std::exp(x);
113 w1 = (1.0 - 4.0 * leptonmass * leptonmass / t);
114 if (w1 > 0.0) {
115 w2 = (1.0 + 2.0 * leptonmass * leptonmass / t);
116 w3 = (1.0 - t / parentmass / parentmass);
117 w3 = w3 * w3 * w3;
118 ww = w3 * w2 * std::sqrt(w1);
119 }
120 else {
121 ww = 0.0;
122 }
123 if (w <= ww) break;
124 }
125
126 // calculate gamma momentum
127 G4double Pgamma = G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t));
128 G4double costheta = 2. * G4UniformRand() - 1.0;
129 G4double sintheta = std::sqrt((1.0 - costheta) * (1.0 + costheta));
130 G4double phi = twopi * G4UniformRand() * rad;
131 G4ThreeVector gdirection(sintheta * std::cos(phi), sintheta * std::sin(phi), costheta);
132
133 // create G4DynamicParticle for gamma
134 auto gammaparticle = new G4DynamicParticle(G4MT_daughters[idGamma], gdirection, Pgamma);
135
136 // calculate beta of (l+ l-)system
137 G4double beta = Pgamma / (parentmass - Pgamma);
138
139 // calculate lepton momentum in the rest frame of (l+ l-)system
140 G4double Plepton = G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t), leptonmass, leptonmass);
141 G4double Elepton = std::sqrt(Plepton * Plepton + leptonmass * leptonmass);
142 costheta = 2. * G4UniformRand() - 1.0;
143 sintheta = std::sqrt((1.0 - costheta) * (1.0 + costheta));
144 phi = twopi * G4UniformRand() * rad;
145 G4ThreeVector ldirection(sintheta * std::cos(phi), sintheta * std::sin(phi), costheta);
146 // create G4DynamicParticle for leptons in the rest frame of (l+ l-)system
147 auto leptonparticle =
148 new G4DynamicParticle(G4MT_daughters[idLepton], ldirection, Elepton - leptonmass);
149 auto antileptonparticle =
150 new G4DynamicParticle(G4MT_daughters[idAntiLepton], -1.0 * ldirection, Elepton - leptonmass);
151 // boost leptons in the rest frame of the parent
152 G4LorentzVector p4 = leptonparticle->Get4Momentum();
153 p4.boost(-1.0 * gdirection.x() * beta, -1.0 * gdirection.y() * beta,
154 -1.0 * gdirection.z() * beta);
155 leptonparticle->Set4Momentum(p4);
156 p4 = antileptonparticle->Get4Momentum();
157 p4.boost(-1.0 * gdirection.x() * beta, -1.0 * gdirection.y() * beta,
158 -1.0 * gdirection.z() * beta);
159 antileptonparticle->Set4Momentum(p4);
160
161 // create G4Decayproducts
162 auto products = new G4DecayProducts(*parentparticle);
163 delete parentparticle;
164 products->PushProducts(gammaparticle);
165 products->PushProducts(leptonparticle);
166 products->PushProducts(antileptonparticle);
167
168#ifdef G4VERBOSE
169 if (GetVerboseLevel() > 1) {
170 G4cout << "G4DalitzDecayChannel::DecayIt ";
171 G4cout << " create decay products in rest frame " << G4endl;
172 products->DumpInfo();
173 }
174#endif
175 return products;
176}
double G4double
Definition G4Types.hh:83
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition Randomize.hh:52
HepLorentzVector & boost(double, double, double)
static G4double Pmx(G4double e, G4double p1, G4double p2)
G4ParticleDefinition ** G4MT_daughters
G4int GetVerboseLevel() const
G4ParticleDefinition * G4MT_parent

◆ operator=()

G4DalitzDecayChannel & G4DalitzDecayChannel::operator= ( const G4DalitzDecayChannel & right)
protected

Definition at line 58 of file G4DalitzDecayChannel.cc.

59{
60 if (this != &right) {
63 rbranch = right.rbranch;
64
65 // copy parent name
66 parent_name = new G4String(*right.parent_name);
67
68 // clear daughters_name array
70
71 // recreate array
73 if (numberOfDaughters > 0) {
74 if (daughters_name != nullptr) ClearDaughtersName();
76 // copy daughters name
77 for (G4int index = 0; index < numberOfDaughters; ++index) {
78 daughters_name[index] = new G4String(*right.daughters_name[index]);
79 }
80 }
81 }
82 return *this;
83}
int G4int
Definition G4Types.hh:85
G4String ** daughters_name

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