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

#include <G4MuonDecayChannel.hh>

+ Inheritance diagram for G4MuonDecayChannel:

Public Member Functions

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

 G4MuonDecayChannel (const G4MuonDecayChannel &)
 
G4MuonDecayChanneloperator= (const G4MuonDecayChannel &)
 
 G4MuonDecayChannel ()
 
- 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 G4MuonDecayChannel.hh.

Constructor & Destructor Documentation

◆ G4MuonDecayChannel() [1/3]

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

Definition at line 59 of file G4MuonDecayChannel.cc.

61 :G4VDecayChannel("Muon Decay",1)
62{
63 // set names for daughter particles
64 if (theParentName == "mu+") {
65 SetBR(theBR);
66 SetParent("mu+");
68 SetDaughter(0, "e+");
69 SetDaughter(1, "nu_e");
70 SetDaughter(2, "anti_nu_mu");
71 } else if (theParentName == "mu-") {
72 SetBR(theBR);
73 SetParent("mu-");
75 SetDaughter(0, "e-");
76 SetDaughter(1, "anti_nu_e");
77 SetDaughter(2, "nu_mu");
78 } else {
79#ifdef G4VERBOSE
80 if (GetVerboseLevel()>0) {
81 G4cout << "G4MuonDecayChannel:: constructor :";
82 G4cout << " parent particle is not muon 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)

◆ ~G4MuonDecayChannel()

G4MuonDecayChannel::~G4MuonDecayChannel ( )
virtual

Definition at line 94 of file G4MuonDecayChannel.cc.

95{
96}

◆ G4MuonDecayChannel() [2/3]

G4MuonDecayChannel::G4MuonDecayChannel ( const G4MuonDecayChannel right)
protected

Definition at line 89 of file G4MuonDecayChannel.cc.

89 :
90 G4VDecayChannel(right)
91{
92}

◆ G4MuonDecayChannel() [3/3]

G4MuonDecayChannel::G4MuonDecayChannel ( )
protected

Definition at line 54 of file G4MuonDecayChannel.cc.

56{
57}

Member Function Documentation

◆ DecayIt()

G4DecayProducts * G4MuonDecayChannel::DecayIt ( G4double  )
virtual

Implements G4VDecayChannel.

Reimplemented in G4MuonDecayChannelWithSpin.

Definition at line 125 of file G4MuonDecayChannel.cc.

126{
127 // this version neglects muon polarization,and electron mass
128 // assumes the pure V-A coupling
129 // the Neutrinos are correctly V-A.
130#ifdef G4VERBOSE
131 if (GetVerboseLevel()>1) G4cout << "G4MuonDecayChannel::DecayIt ";
132#endif
133
134 if (parent == 0) FillParent();
135 if (daughters == 0) FillDaughters();
136
137 // parent mass
138 G4double parentmass = parent->GetPDGMass();
139
140 //daughters'mass
141 G4double daughtermass[3];
142 G4double sumofdaughtermass = 0.0;
143 for (G4int index=0; index<3; index++){
144 daughtermass[index] = daughters[index]->GetPDGMass();
145 sumofdaughtermass += daughtermass[index];
146 }
147
148 //create parent G4DynamicParticle at rest
149 G4ThreeVector dummy;
150 G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
151 //create G4Decayproducts
152 G4DecayProducts *products = new G4DecayProducts(*parentparticle);
153 delete parentparticle;
154
155 // calculate daughter momentum
156 G4double daughtermomentum[3];
157 // calcurate electron energy
158 G4double xmax = (1.0+daughtermass[0]*daughtermass[0]/parentmass/parentmass);
159 G4double x;
160
161 G4double Ee,Ene;
162
164 G4double EMax=parentmass/2-daughtermass[0];
165
166
167 //Generating Random Energy
168do {
169 Ee=G4UniformRand();
170 do{
171 x=xmax*G4UniformRand();
173 }while (gam >x*(1.-x));
174 Ene=x;
175 } while ( Ene < (1.-Ee));
176 G4double Enm=(2.-Ee-Ene);
177
178
179 //initialisation of rotation parameters
180
181 G4double costheta,sintheta,rphi,rtheta,rpsi;
182 costheta= 1.-2./Ee-2./Ene+2./Ene/Ee;
183 sintheta=std::sqrt(1.-costheta*costheta);
184
185
186 rphi=twopi*G4UniformRand()*rad;
187 rtheta=(std::acos(2.*G4UniformRand()-1.));
188 rpsi=twopi*G4UniformRand()*rad;
189
191 rot.set(rphi,rtheta,rpsi);
192
193 //electron 0
194 daughtermomentum[0]=std::sqrt(Ee*Ee*EMax*EMax+2.0*Ee*EMax * daughtermass[0]);
195 G4ThreeVector direction0(0.0,0.0,1.0);
196
197 direction0 *= rot;
198
199 G4DynamicParticle * daughterparticle = new G4DynamicParticle ( daughters[0], direction0 * daughtermomentum[0]);
200
201 products->PushProducts(daughterparticle);
202
203 //electronic neutrino 1
204
205 daughtermomentum[1]=std::sqrt(Ene*Ene*EMax*EMax+2.0*Ene*EMax * daughtermass[1]);
206 G4ThreeVector direction1(sintheta,0.0,costheta);
207
208 direction1 *= rot;
209
210 G4DynamicParticle * daughterparticle1 = new G4DynamicParticle ( daughters[1], direction1 * daughtermomentum[1]);
211 products->PushProducts(daughterparticle1);
212
213 //muonnic neutrino 2
214
215 daughtermomentum[2]=std::sqrt(Enm*Enm*EMax*EMax +2.0*Enm*EMax*daughtermass[2]);
216 G4ThreeVector direction2(-Ene/Enm*sintheta,0,-Ee/Enm-Ene/Enm*costheta);
217
218 direction2 *= rot;
219
220 G4DynamicParticle * daughterparticle2 = new G4DynamicParticle ( daughters[2],
221 direction2 * daughtermomentum[2]);
222 products->PushProducts(daughterparticle2);
223
224
225
226
227 // output message
228#ifdef G4VERBOSE
229 if (GetVerboseLevel()>1) {
230 G4cout << "G4MuonDecayChannel::DecayIt ";
231 G4cout << " create decay products in rest frame " <<G4endl;
232 products->DumpInfo();
233 }
234#endif
235 return products;
236}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4UniformRand()
Definition: Randomize.hh:53
HepRotation & set(const Hep3Vector &axis, double delta)
Definition: RotationA.cc:27
void DumpInfo() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * parent
G4ParticleDefinition ** daughters

◆ operator=()

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

Definition at line 98 of file G4MuonDecayChannel.cc.

99{
100 if (this != &right) {
103 rbranch = right.rbranch;
104
105 // copy parent name
106 parent_name = new G4String(*right.parent_name);
107
108 // clear daughters_name array
110
111 // recreate array
113 if ( numberOfDaughters >0 ) {
116 //copy daughters name
117 for (G4int index=0; index < numberOfDaughters; index++) {
118 daughters_name[index] = new G4String(*right.daughters_name[index]);
119 }
120 }
121 }
122 return *this;
123}
G4String * parent_name
G4String ** daughters_name
G4String kinematics_name

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