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

#include <G4NeutronBetaDecayChannel.hh>

+ Inheritance diagram for G4NeutronBetaDecayChannel:

Public Member Functions

 G4NeutronBetaDecayChannel (const G4String &theParentName, G4double theBR)
 
virtual ~G4NeutronBetaDecayChannel ()
 
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

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

Protected Attributes

const G4double aENuCorr
 
- 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
 

Additional Inherited Members

- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 43 of file G4NeutronBetaDecayChannel.hh.

Constructor & Destructor Documentation

◆ G4NeutronBetaDecayChannel() [1/3]

G4NeutronBetaDecayChannel::G4NeutronBetaDecayChannel ( const G4String theParentName,
G4double  theBR 
)

Definition at line 57 of file G4NeutronBetaDecayChannel.cc.

60 :G4VDecayChannel("Neutron Decay"),
61 aENuCorr(-0.102)
62{
63 // set names for daughter particles
64 if (theParentName == "neutron") {
65 SetBR(theBR);
66 SetParent("neutron");
68 SetDaughter(0, "e-");
69 SetDaughter(1, "anti_nu_e");
70 SetDaughter(2, "proton");
71 } else if (theParentName == "anti_neutron") {
72 SetBR(theBR);
73 SetParent("anti_neutron");
75 SetDaughter(0, "e+");
76 SetDaughter(1, "nu_e");
77 SetDaughter(2, "anti_proton");
78 } else {
79#ifdef G4VERBOSE
80 if (GetVerboseLevel()>0) {
81 G4cout << "G4NeutronBetaDecayChannel:: constructor :";
82 G4cout << " parent particle is not neutron but ";
83 G4cout << theParentName << G4endl;
84 }
85#endif
86 }
87}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void SetBR(G4double value)
G4int GetVerboseLevel() const
void SetNumberOfDaughters(G4int value)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
void SetParent(const G4ParticleDefinition *particle_type)

◆ ~G4NeutronBetaDecayChannel()

G4NeutronBetaDecayChannel::~G4NeutronBetaDecayChannel ( )
virtual

Definition at line 89 of file G4NeutronBetaDecayChannel.cc.

90{
91}

◆ G4NeutronBetaDecayChannel() [2/3]

G4NeutronBetaDecayChannel::G4NeutronBetaDecayChannel ( const G4NeutronBetaDecayChannel right)
protected

Definition at line 93 of file G4NeutronBetaDecayChannel.cc.

94 : G4VDecayChannel(right),
95 aENuCorr(-0.102)
96{
97}

◆ G4NeutronBetaDecayChannel() [3/3]

G4NeutronBetaDecayChannel::G4NeutronBetaDecayChannel ( )
protected

Definition at line 51 of file G4NeutronBetaDecayChannel.cc.

53 aENuCorr(-0.102)
54{
55}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4NeutronBetaDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Definition at line 127 of file G4NeutronBetaDecayChannel.cc.

128{
129 // This class describes free neutron beta decay kinemtics.
130 // This version neglects neutron/electron polarization
131 // without Coulomb effect
132
133#ifdef G4VERBOSE
134 if (GetVerboseLevel()>1) G4cout << "G4NeutronBetaDecayChannel::DecayIt ";
135#endif
136
137 if (parent == 0) FillParent();
138 if (daughters == 0) FillDaughters();
139
140 // parent mass
141 G4double parentmass = parent->GetPDGMass();
142
143 //daughters'mass
144 G4double daughtermass[3];
145 G4double sumofdaughtermass = 0.0;
146 for (G4int index=0; index<3; index++){
147 daughtermass[index] = daughters[index]->GetPDGMass();
148 sumofdaughtermass += daughtermass[index];
149 }
150 G4double xmax = parentmass-sumofdaughtermass;
151
152 //create parent G4DynamicParticle at rest
153 G4ThreeVector dummy;
154 G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
155
156 //create G4Decayproducts
157 G4DecayProducts *products = new G4DecayProducts(*parentparticle);
158 delete parentparticle;
159
160 // calculate daughter momentum
161 G4double daughtermomentum[3];
162
163 // calcurate electron energy
164 G4double x; // Ee
165 G4double p; // Pe
166 G4double dm = daughtermass[0]; //Me
167 G4double w; // cosine of e-nu angle
168 G4double r;
169 G4double r0;
170 do {
171 x = xmax*G4UniformRand();
172 p = std::sqrt(x*(x+2.0*dm));
173 w = 1.0-2.0*G4UniformRand();
174 r = p*(x+dm)*(xmax-x)*(xmax-x)*(1.0+aENuCorr*p/(x+dm)*w);
175 r0 = G4UniformRand()*(xmax+dm)*(xmax+dm)*xmax*xmax*(1.0+aENuCorr);
176 } while (r < r0);
177
178
179 //create daughter G4DynamicParticle
180 // rotation materix to lab frame
181 G4double costheta = 2.*G4UniformRand()-1.0;
182 G4double theta = std::acos(costheta)*rad;
183 G4double phi = twopi*G4UniformRand()*rad;
185 rm.rotateY(theta);
186 rm.rotateZ(phi);
187
188 // daughter 0 (electron) in Z direction
189 daughtermomentum[0] = p;
190 G4ThreeVector direction0(0.0, 0.0, 1.0);
191 direction0 = rm * direction0;
192 G4DynamicParticle * daughterparticle0
193 = new G4DynamicParticle( daughters[0], direction0*daughtermomentum[0]);
194 products->PushProducts(daughterparticle0);
195
196 // daughter 1 (nutrino) in XZ plane
197 G4double eNu; // Enu
198 eNu = (parentmass-daughtermass[2])*(parentmass+daughtermass[2])+(dm*dm)-2.*parentmass*(x+dm);
199 eNu /= 2.*(parentmass+p*w-(x+dm));
200 G4double cosn = w;
201 G4double sinn = std::sqrt((1.0-cosn)*(1.0+cosn));
202
203 G4ThreeVector direction1(sinn, 0.0, cosn);
204 direction1 = rm * direction1;
205 G4DynamicParticle * daughterparticle1
206 = new G4DynamicParticle( daughters[1], direction1*eNu);
207 products->PushProducts(daughterparticle1);
208
209 // daughter 2 (proton) at REST
210 G4double eP; // Eproton
211 eP = parentmass-eNu-(x+dm)-daughtermass[2];
212 G4double pPx = -eNu*sinn;
213 G4double pPz = -p-eNu*cosn;
214 G4double pP = std::sqrt(eP*(eP+2.*daughtermass[2]));
215 G4ThreeVector direction2(pPx/pP, 0.0, pPz/pP);
216 G4DynamicParticle * daughterparticle2
217 = new G4DynamicParticle( daughters[2], direction2);
218 products->PushProducts(daughterparticle2);
219
220
221 // output message
222#ifdef G4VERBOSE
223 if (GetVerboseLevel()>1) {
224 G4cout << "G4NeutronBetaDecayChannel::DecayIt ";
225 G4cout << " create decay products in rest frame " <<G4endl;
226 products->DumpInfo();
227 }
228#endif
229 return products;
230}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
void DumpInfo() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * parent
G4ParticleDefinition ** daughters

◆ operator=()

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

Definition at line 100 of file G4NeutronBetaDecayChannel.cc.

101{
102 if (this != &right) {
105 rbranch = right.rbranch;
106
107 // copy parent name
108 parent_name = new G4String(*right.parent_name);
109
110 // clear daughters_name array
112
113 // recreate array
115 if ( numberOfDaughters >0 ) {
118 //copy daughters name
119 for (G4int index=0; index < numberOfDaughters; index++) {
120 daughters_name[index] = new G4String(*right.daughters_name[index]);
121 }
122 }
123 }
124 return *this;
125}
G4String * parent_name
G4String ** daughters_name
G4String kinematics_name

Member Data Documentation

◆ aENuCorr

const G4double G4NeutronBetaDecayChannel::aENuCorr
protected

Definition at line 70 of file G4NeutronBetaDecayChannel.hh.

Referenced by DecayIt().


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