Geant4 9.6.0
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="")
 
virtual ~G4VDecayChannel ()
 
G4int operator== (const G4VDecayChannel &right) const
 
G4int operator!= (const G4VDecayChannel &right) const
 
G4int 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 ()
 

Protected Member Functions

 G4DalitzDecayChannel (const G4DalitzDecayChannel &)
 
G4DalitzDecayChanneloperator= (const G4DalitzDecayChannel &)
 
- Protected Member Functions inherited from G4VDecayChannel
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
void ClearDaughtersName ()
 
void FillDaughters ()
 
void FillParent ()
 

Additional Inherited Members

- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4Stringparent_name
 
G4String ** daughters_name
 
G4ParticleTableparticletable
 
G4ParticleDefinitionparent
 
G4ParticleDefinition ** daughters
 
G4double parent_mass
 
G4doubledaughters_mass
 
G4int verboseLevel
 
- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 43 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 53 of file G4DalitzDecayChannel.cc.

58 :G4VDecayChannel("Dalitz Decay",1)
59{
60 // set names for daughter particles
61 SetParent(theParentName);
62 SetBR(theBR);
64 G4String gammaName = "gamma";
65 SetDaughter(idGamma, gammaName);
66 SetDaughter(idLepton, theLeptonName);
67 SetDaughter(idAntiLepton, theAntiLeptonName);
68}
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 70 of file G4DalitzDecayChannel.cc.

71{
72}

◆ G4DalitzDecayChannel() [2/2]

G4DalitzDecayChannel::G4DalitzDecayChannel ( const G4DalitzDecayChannel right)
protected

Definition at line 74 of file G4DalitzDecayChannel.cc.

74 :
75 G4VDecayChannel(right)
76{
77}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4DalitzDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 106 of file G4DalitzDecayChannel.cc.

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

◆ operator=()

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

Definition at line 79 of file G4DalitzDecayChannel.cc.

80{
81 if (this != &right) {
84 rbranch = right.rbranch;
85
86 // copy parent name
87 parent_name = new G4String(*right.parent_name);
88
89 // clear daughters_name array
91
92 // recreate array
94 if ( numberOfDaughters >0 ) {
97 //copy daughters name
98 for (G4int index=0; index < numberOfDaughters; index++) {
99 daughters_name[index] = new G4String(*right.daughters_name[index]);
100 }
101 }
102 }
103 return *this;
104}
int G4int
Definition: G4Types.hh:66
G4String * parent_name
G4String ** daughters_name
G4String kinematics_name

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