Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MuonDecayChannel Class Reference

#include <G4MuonDecayChannel.hh>

Inheritance diagram for G4MuonDecayChannel:
Collaboration 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
 
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

 G4MuonDecayChannel (const G4MuonDecayChannel &)
 
G4MuonDecayChanneloperator= (const G4MuonDecayChannel &)
 
 G4MuonDecayChannel ()
 
- Protected Member Functions inherited from G4VDecayChannel
void ClearDaughtersName ()
 
void CheckAndFillDaughters ()
 
void CheckAndFillParent ()
 
 G4VDecayChannel ()
 
 G4VDecayChannel (const G4VDecayChannel &)
 
G4VDecayChanneloperator= (const G4VDecayChannel &)
 
G4double DynamicalMass (G4double massPDG, G4double width, G4double maxDev=+1.) const
 

Additional Inherited Members

- Protected Attributes inherited from G4VDecayChannel
G4String kinematics_name
 
G4double rbranch
 
G4int numberOfDaughters
 
G4Stringparent_name
 
G4String ** daughters_name
 
G4double rangeMass
 
G4ThreeVector parent_polarization
 
G4ParticleTableparticletable
 
G4int verboseLevel
 
G4ParticleDefinitionG4MT_parent
 
G4ParticleDefinition ** G4MT_daughters
 
G4double G4MT_parent_mass
 
G4doubleG4MT_daughters_mass
 
G4doubleG4MT_daughters_width
 
G4Mutex daughtersMutex
 
G4Mutex parentMutex
 
- Static Protected Attributes inherited from G4VDecayChannel
static const G4String noName = " "
 

Detailed Description

Definition at line 43 of file G4MuonDecayChannel.hh.

Constructor & Destructor Documentation

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 }
void SetBR(G4double value)
G4GLOB_DLL std::ostream G4cout
void SetNumberOfDaughters(G4int value)
G4int GetVerboseLevel() const
void SetParent(const G4ParticleDefinition *particle_type)
void SetDaughter(G4int anIndex, const G4ParticleDefinition *particle_type)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4MuonDecayChannel::~G4MuonDecayChannel ( )
virtual

Definition at line 94 of file G4MuonDecayChannel.cc.

95 {
96 }
G4MuonDecayChannel::G4MuonDecayChannel ( const G4MuonDecayChannel right)
protected

Definition at line 89 of file G4MuonDecayChannel.cc.

89  :
90  G4VDecayChannel(right)
91 {
92 }
G4MuonDecayChannel::G4MuonDecayChannel ( )
protected

Definition at line 54 of file G4MuonDecayChannel.cc.

56 {
57 }

Member Function Documentation

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 
136 
137  // parent mass
138  G4double parentmass = G4MT_parent->GetPDGMass();
139  const int N_DAUGHTER=3;
140 
141  //daughters'mass
142  G4double daughtermass[N_DAUGHTER];
143  G4double sumofdaughtermass = 0.0;
144  for (G4int index=0; index<N_DAUGHTER; index++){
145  daughtermass[index] = G4MT_daughters[index]->GetPDGMass();
146  sumofdaughtermass += daughtermass[index];
147  }
148 
149  //create parent G4DynamicParticle at rest
150  G4ThreeVector dummy;
151  G4DynamicParticle * parentparticle = new G4DynamicParticle( G4MT_parent, dummy, 0.0);
152  //create G4Decayproducts
153  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
154  delete parentparticle;
155 
156  // calculate daughter momentum
157  G4double daughtermomentum[N_DAUGHTER];
158  // calcurate electron energy
159  G4double xmax = (1.0+daughtermass[0]*daughtermass[0]/parentmass/parentmass);
160  G4double x;
161 
162  G4double Ee,Ene;
163 
164  G4double gam;
165  G4double EMax=parentmass/2-daughtermass[0];
166 
167  const size_t MAX_LOOP=1000;
168  //Generating Random Energy
169  for (size_t loop1=0; loop1 <MAX_LOOP; ++loop1){
170  Ee=G4UniformRand();
171  for (size_t loop2 =0; loop2<MAX_LOOP; ++loop2){
172  x=xmax*G4UniformRand();
173  gam=G4UniformRand();
174  if (gam <= x*(1.-x)) break;
175  x = xmax;
176  }
177  Ene=x;
178  if ( Ene >= (1.-Ee)) break;
179  Ene = 1.-Ee;
180  }
181  G4double Enm=(2.-Ee-Ene);
182 
183 
184  //initialisation of rotation parameters
185 
186  G4double costheta,sintheta,rphi,rtheta,rpsi;
187  costheta= 1.-2./Ee-2./Ene+2./Ene/Ee;
188  sintheta=std::sqrt(1.-costheta*costheta);
189 
190 
191  rphi=twopi*G4UniformRand()*rad;
192  rtheta=(std::acos(2.*G4UniformRand()-1.));
193  rpsi=twopi*G4UniformRand()*rad;
194 
195  G4RotationMatrix rot;
196  rot.set(rphi,rtheta,rpsi);
197 
198  //electron 0
199  daughtermomentum[0]=std::sqrt(Ee*Ee*EMax*EMax+2.0*Ee*EMax * daughtermass[0]);
200  G4ThreeVector direction0(0.0,0.0,1.0);
201 
202  direction0 *= rot;
203 
204  G4DynamicParticle * daughterparticle = new G4DynamicParticle ( G4MT_daughters[0], direction0 * daughtermomentum[0]);
205 
206  products->PushProducts(daughterparticle);
207 
208  //electronic neutrino 1
209 
210  daughtermomentum[1]=std::sqrt(Ene*Ene*EMax*EMax+2.0*Ene*EMax * daughtermass[1]);
211  G4ThreeVector direction1(sintheta,0.0,costheta);
212 
213  direction1 *= rot;
214 
215  G4DynamicParticle * daughterparticle1 = new G4DynamicParticle ( G4MT_daughters[1], direction1 * daughtermomentum[1]);
216  products->PushProducts(daughterparticle1);
217 
218  //muonnic neutrino 2
219 
220  daughtermomentum[2]=std::sqrt(Enm*Enm*EMax*EMax +2.0*Enm*EMax*daughtermass[2]);
221  G4ThreeVector direction2(-Ene/Enm*sintheta,0,-Ee/Enm-Ene/Enm*costheta);
222 
223  direction2 *= rot;
224 
225  G4DynamicParticle * daughterparticle2 = new G4DynamicParticle ( G4MT_daughters[2],
226  direction2 * daughtermomentum[2]);
227  products->PushProducts(daughterparticle2);
228 
229  // output message
230 #ifdef G4VERBOSE
231  if (GetVerboseLevel()>1) {
232  G4cout << "G4MuonDecayChannel::DecayIt ";
233  G4cout << " create decay products in rest frame " <<G4endl;
234  products->DumpInfo();
235  }
236 #endif
237  return products;
238 }
void CheckAndFillDaughters()
G4int PushProducts(G4DynamicParticle *aParticle)
G4ParticleDefinition * G4MT_parent
G4ParticleDefinition ** G4MT_daughters
tuple x
Definition: test.py:50
static constexpr double rad
Definition: G4SIunits.hh:149
int G4int
Definition: G4Types.hh:78
static constexpr double twopi
Definition: G4SIunits.hh:76
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
void DumpInfo() const
HepRotation & set(const Hep3Vector &axis, double delta)
Definition: RotationA.cc:27
G4int GetVerboseLevel() const
G4double GetPDGMass() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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

Definition at line 98 of file G4MuonDecayChannel.cc.

99 {
100  if (this != &right) {
102  verboseLevel = right.verboseLevel;
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 }
int G4int
Definition: G4Types.hh:78
G4String kinematics_name
G4String * parent_name
G4String ** daughters_name

Here is the call graph for this function:


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