source: trunk/source/particles/management/src/G4NeutronBetaDecayChannel.cc @ 1202

Last change on this file since 1202 was 1196, checked in by garnier, 15 years ago

update CVS release candidate geant4.9.3.01

File size: 5.9 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4NeutronBetaDecayChannel.cc,v 1.7 2006/06/29 19:25:38 gunter Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30//
31// ------------------------------------------------------------
32//      GEANT 4 class header file
33//
34//      History: first implementation, based on object model of
35//      18 Sep  2001 H.Kurashige
36//
37// ------------------------------------------------------------
38
39#include "G4ParticleDefinition.hh"
40#include "G4DecayProducts.hh"
41#include "G4VDecayChannel.hh"
42#include "G4NeutronBetaDecayChannel.hh"
43#include "Randomize.hh"
44#include "G4RotationMatrix.hh"
45#include "G4LorentzVector.hh"
46#include "G4LorentzRotation.hh"
47
48
49G4NeutronBetaDecayChannel::G4NeutronBetaDecayChannel(
50                                       const G4String& theParentName, 
51                                       G4double        theBR)
52                   :G4VDecayChannel("Neutron Decay"),
53                    aENuCorr(-0.102)
54{
55  // set names for daughter particles
56  if (theParentName == "neutron") {
57    SetBR(theBR);
58    SetParent("neutron");
59    SetNumberOfDaughters(3);
60    SetDaughter(0, "e-");
61    SetDaughter(1, "anti_nu_e");
62    SetDaughter(2, "proton");
63  } else {
64#ifdef G4VERBOSE
65    if (GetVerboseLevel()>0) {
66      G4cout << "G4NeutronBetaDecayChannel:: constructor :";
67      G4cout << " parent particle is not muon but ";
68      G4cout << theParentName << G4endl;
69    }
70#endif
71  }
72}
73
74G4NeutronBetaDecayChannel::~G4NeutronBetaDecayChannel()
75{
76}
77
78G4DecayProducts *G4NeutronBetaDecayChannel::DecayIt(G4double) 
79{
80  //  This class describes free neutron beta decay  kinemtics.
81  //  This version neglects neutron/electron polarization 
82  //  without Coulomb effect
83
84#ifdef G4VERBOSE
85  if (GetVerboseLevel()>1) G4cout << "G4NeutronBetaDecayChannel::DecayIt ";
86#endif
87
88  if (parent == 0) FillParent(); 
89  if (daughters == 0) FillDaughters();
90 
91  // parent mass
92  G4double parentmass = parent->GetPDGMass();
93
94  //daughters'mass
95  G4double daughtermass[3]; 
96  G4double sumofdaughtermass = 0.0;
97  for (G4int index=0; index<3; index++){
98    daughtermass[index] = daughters[index]->GetPDGMass();
99    sumofdaughtermass += daughtermass[index];
100  }
101  G4double xmax = parentmass-sumofdaughtermass; 
102
103   //create parent G4DynamicParticle at rest
104  G4ThreeVector dummy;
105  G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
106
107  //create G4Decayproducts
108  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
109  delete parentparticle;
110
111  // calculate daughter momentum
112  G4double daughtermomentum[3];
113
114  // calcurate electron energy
115  G4double x;                    // Ee
116  G4double p;                    // Pe
117  G4double m = daughtermass[0];  //Me
118  G4double w;                    // cosine of e-nu angle
119  G4double r; 
120  G4double r0;
121  do {
122      x = xmax*G4UniformRand();
123      p = std::sqrt(x*(x+2.0*m));
124      w = 1.0-2.0*G4UniformRand();
125      r = p*(x+m)*(xmax-x)*(xmax-x)*(1.0+aENuCorr*p/(x+m)*w);
126      r0 = G4UniformRand()*(xmax+m)*(xmax+m)*xmax*xmax*(1.0+aENuCorr);
127  } while (r < r0);   
128
129  //create daughter G4DynamicParticle
130  // rotation materix to lab frame
131  G4double costheta = 2.*G4UniformRand()-1.0;
132  G4double theta = std::acos(costheta)*rad;
133  G4double phi  = twopi*G4UniformRand()*rad;
134  G4RotationMatrix rm;
135  rm.rotateY(theta);
136  rm.rotateZ(phi);
137
138  // daughter 0 (electron) in Z direction
139  daughtermomentum[0] = p;
140  G4ThreeVector direction0(0.0, 0.0, 1.0);
141  direction0 = rm * direction0;
142  G4DynamicParticle * daughterparticle0
143         = new G4DynamicParticle( daughters[0], direction0*daughtermomentum[0]);
144  products->PushProducts(daughterparticle0);
145
146  // daughter 1 (nutrino) in XZ plane
147  G4double eNu = xmax-x; 
148  G4double cosn = w;
149  G4double sinn = std::sqrt((1.0-cosn)*(1.0+cosn));
150
151  G4ThreeVector direction1(sinn, 0.0, cosn);
152  direction1 = rm * direction1;
153  G4DynamicParticle * daughterparticle1
154         = new G4DynamicParticle( daughters[1], direction1*eNu);
155  products->PushProducts(daughterparticle1);
156
157  // daughter 2 (proton) at REST
158  G4ThreeVector direction2(0.0, 0.0, 0.0);
159  G4DynamicParticle * daughterparticle2
160         = new G4DynamicParticle( daughters[2], direction2);
161  products->PushProducts(daughterparticle2);
162 
163
164 // output message
165#ifdef G4VERBOSE
166  if (GetVerboseLevel()>1) {
167    G4cout << "G4NeutronBetaDecayChannel::DecayIt ";
168    G4cout << "  create decay products in rest frame " <<G4endl;
169    products->DumpInfo();
170  }
171#endif
172  return products;
173}
174
175
176
177
178
179
Note: See TracBrowser for help on using the repository browser.