Geant4 11.1.1
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)
 
virtual ~G4DalitzDecayChannel ()
 
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="", const G4String &theDaughterName5="")
 
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
 

Protected Member Functions

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

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 47 of file G4DalitzDecayChannel.cc.

52 : G4VDecayChannel("Dalitz Decay", 1)
53{
54 // set names for daughter particles
55 SetParent(theParentName);
56 SetBR(theBR);
58 G4String gammaName = "gamma";
59 SetDaughter(idGamma, gammaName);
60 SetDaughter(idLepton, theLeptonName);
61 SetDaughter(idAntiLepton, theAntiLeptonName);
62}
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 ( )
virtual

Definition at line 64 of file G4DalitzDecayChannel.cc.

65{
66}

◆ G4DalitzDecayChannel() [2/2]

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4DalitzDecayChannel right)
protected

Definition at line 68 of file G4DalitzDecayChannel.cc.

69 : G4VDecayChannel(right)
70{
71}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 104 of file G4DalitzDecayChannel.cc.

105{
106#ifdef G4VERBOSE
107 if (GetVerboseLevel()>1) G4cout << "G4DalitzDecayChannel::DecayIt ";
108#endif
111
112 // parent mass
113 G4double parentmass = G4MT_parent->GetPDGMass();
114
115 // create parent G4DynamicParticle at rest
116 G4ThreeVector dummy;
117 G4DynamicParticle* parentparticle
118 = new G4DynamicParticle( G4MT_parent, dummy, 0.0);
119
120 //daughters' mass
121 G4double leptonmass = G4MT_daughters[idLepton]->GetPDGMass();
122
123 // Generate t ( = std::exp(x):mass Square of (l+ l-) system)
124 G4double xmin = 2.0*std::log(2.0*leptonmass);
125 G4double xmax = 2.0*std::log(parentmass);
126 G4double wmax = 1.5;
127 G4double x, w, ww, w1, w2, w3, t;
128 const std::size_t MAX_LOOP = 10000;
129 for (std::size_t loop_counter=0; loop_counter<MAX_LOOP; ++loop_counter)
130 {
131 x = G4UniformRand()*(xmax-xmin) + xmin;
132 w = G4UniformRand()*wmax;
133 t = std::exp(x);
134 w1 = (1.0-4.0*leptonmass*leptonmass/t);
135 if ( w1 > 0.0)
136 {
137 w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
138 w3 = ( 1.0 - t/parentmass/parentmass );
139 w3 = w3 * w3 * w3;
140 ww = w3 * w2 * std::sqrt(w1);
141 }
142 else
143 {
144 ww = 0.0;
145 }
146 if (w <= ww) break;
147 }
148
149 // calculate gamma momentum
150 G4double Pgamma =
151 G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t));
152 G4double costheta = 2.*G4UniformRand()-1.0;
153 G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
154 G4double phi = twopi*G4UniformRand()*rad;
155 G4ThreeVector gdirection(sintheta*std::cos(phi),
156 sintheta*std::sin(phi),
157 costheta);
158
159 // create G4DynamicParticle for gamma
160 G4DynamicParticle* gammaparticle
161 = new G4DynamicParticle(G4MT_daughters[idGamma] , gdirection, Pgamma);
162
163 // calculate beta of (l+ l-)system
164 G4double beta = Pgamma/(parentmass-Pgamma);
165
166 // calculate lepton momentum in the rest frame of (l+ l-)system
167 G4double Plepton =
168 G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t),leptonmass, leptonmass);
169 G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
170 costheta = 2.*G4UniformRand()-1.0;
171 sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
172 phi = twopi*G4UniformRand()*rad;
173 G4ThreeVector ldirection(sintheta*std::cos(phi),
174 sintheta*std::sin(phi),
175 costheta);
176 // create G4DynamicParticle for leptons in the rest frame of (l+ l-)system
177 G4DynamicParticle* leptonparticle
178 = new G4DynamicParticle(G4MT_daughters[idLepton] ,
179 ldirection, Elepton-leptonmass );
180 G4DynamicParticle* antileptonparticle
181 = new G4DynamicParticle(G4MT_daughters[idAntiLepton] ,
182 -1.0*ldirection, Elepton-leptonmass );
183 //boost leptons in the rest frame of the parent
184 G4LorentzVector p4 = leptonparticle->Get4Momentum();
185 p4.boost( -1.0*gdirection.x()*beta,
186 -1.0*gdirection.y()*beta,
187 -1.0*gdirection.z()*beta);
188 leptonparticle->Set4Momentum(p4);
189 p4 = antileptonparticle->Get4Momentum();
190 p4.boost( -1.0*gdirection.x()*beta,
191 -1.0*gdirection.y()*beta,
192 -1.0*gdirection.z()*beta);
193 antileptonparticle->Set4Momentum(p4);
194
195 //create G4Decayproducts
196 G4DecayProducts* products = new G4DecayProducts(*parentparticle);
197 delete parentparticle;
198 products->PushProducts(gammaparticle);
199 products->PushProducts(leptonparticle);
200 products->PushProducts(antileptonparticle);
201
202#ifdef G4VERBOSE
203 if (GetVerboseLevel()>1)
204 {
205 G4cout << "G4DalitzDecayChannel::DecayIt ";
206 G4cout << " create decay products in rest frame " <<G4endl;
207 products->DumpInfo();
208 }
209#endif
210 return products;
211}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:52
HepLorentzVector & boost(double, double, double)
void DumpInfo() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4LorentzVector Get4Momentum() const
void Set4Momentum(const G4LorentzVector &momentum)
static G4double Pmx(G4double e, G4double p1, G4double p2)
G4ParticleDefinition ** G4MT_daughters
G4int GetVerboseLevel() const
G4ParticleDefinition * G4MT_parent
void CheckAndFillDaughters()

◆ operator=()

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

Definition at line 74 of file G4DalitzDecayChannel.cc.

75{
76 if (this != &right)
77 {
80 rbranch = right.rbranch;
81
82 // copy parent name
83 parent_name = new G4String(*right.parent_name);
84
85 // clear daughters_name array
87
88 // recreate array
90 if ( numberOfDaughters >0 )
91 {
92 if (daughters_name != nullptr) ClearDaughtersName();
94 //copy daughters name
95 for (G4int index=0; index < numberOfDaughters; ++index)
96 {
97 daughters_name[index] = new G4String(*right.daughters_name[index]);
98 }
99 }
100 }
101 return *this;
102}
int G4int
Definition: G4Types.hh:85
G4String * parent_name
G4String ** daughters_name
G4String kinematics_name

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