source: trunk/source/particles/management/src/G4DalitzDecayChannel.cc @ 1199

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

update CVS release candidate geant4.9.3.01

File size: 6.1 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: G4DalitzDecayChannel.cc,v 1.9 2009/08/17 14:52:19 kurasige 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//      30 May 1997 H.Kurashige
36// ------------------------------------------------------------
37
38#include "G4ParticleDefinition.hh"
39#include "G4DecayProducts.hh"
40#include "G4VDecayChannel.hh"
41#include "G4DalitzDecayChannel.hh"
42#include "G4PhaseSpaceDecayChannel.hh"
43#include "Randomize.hh"
44#include "G4LorentzVector.hh"
45#include "G4LorentzRotation.hh"
46
47G4DalitzDecayChannel::G4DalitzDecayChannel(
48                           const G4String& theParentName,
49                           G4double        theBR,
50                           const G4String& theLeptonName,
51                           const G4String& theAntiLeptonName)
52                   :G4VDecayChannel("Dalitz Decay",1)
53{
54  // set names for daughter particles
55  SetParent(theParentName);
56  SetBR(theBR);
57  SetNumberOfDaughters(3);
58  G4String gammaName = "gamma";
59  SetDaughter(idGamma, gammaName);
60  SetDaughter(idLepton, theLeptonName);
61  SetDaughter(idAntiLepton, theAntiLeptonName);
62}
63
64G4DalitzDecayChannel::~G4DalitzDecayChannel()
65{
66}
67
68G4DecayProducts *G4DalitzDecayChannel::DecayIt(G4double) 
69{
70#ifdef G4VERBOSE
71  if (GetVerboseLevel()>1) G4cout << "G4DalitzDecayChannel::DecayIt ";
72#endif
73  if (parent == 0) FillParent(); 
74  if (daughters == 0) FillDaughters();
75
76  // parent mass
77  G4double parentmass = parent->GetPDGMass();
78 
79 //create parent G4DynamicParticle at rest
80  G4ThreeVector dummy;
81  G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
82 
83  //daughters'mass
84  G4double leptonmass = daughters[idLepton]->GetPDGMass(); 
85
86 // Generate t ( = std::exp(x):mass Square of (l+ l-) system)
87  G4double xmin  = 2.0*std::log(2.0*leptonmass);
88  G4double xmax  = 2.0*std::log(parentmass);
89  G4double wmax = 1.5;
90  G4double x, w, ww, w1, w2, w3, t;
91  do {
92    x = G4UniformRand()*(xmax-xmin) + xmin;
93    w = G4UniformRand()*wmax;
94    t = std::exp(x);
95    w1 = (1.0-4.0*leptonmass*leptonmass/t);
96    if ( w1 > 0.0) {
97      w2 = ( 1.0 + 2.0*leptonmass*leptonmass/t );
98      w3 = ( 1.0 - t/parentmass/parentmass );
99      w3 = w3 * w3 * w3;
100      ww = w3 * w2 * std::sqrt(w1);
101    } else {
102      ww = 0.0;
103    }
104  } while (w > ww);   
105 
106  // calculate gamma momentum
107  G4double Pgamma = 
108      G4PhaseSpaceDecayChannel::Pmx(parentmass, 0.0, std::sqrt(t)); 
109  G4double costheta = 2.*G4UniformRand()-1.0;
110  G4double sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
111  G4double phi  = twopi*G4UniformRand()*rad;
112  G4ThreeVector gdirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
113
114  //create G4DynamicParticle for gamma
115  G4DynamicParticle * gammaparticle
116      = new G4DynamicParticle(daughters[idGamma] , gdirection, Pgamma);
117
118  // calcurate beta of (l+ l-)system
119  G4double beta = Pgamma/(parentmass-Pgamma);
120
121  // calculate lepton momentum in the rest frame of (l+ l-)system
122  G4double Plepton = 
123      G4PhaseSpaceDecayChannel::Pmx(std::sqrt(t),leptonmass, leptonmass); 
124  G4double Elepton = std::sqrt(Plepton*Plepton + leptonmass*leptonmass );
125  costheta = 2.*G4UniformRand()-1.0;
126  sintheta = std::sqrt((1.0 - costheta)*(1.0 + costheta));
127  phi  = twopi*G4UniformRand()*rad;
128  G4ThreeVector ldirection(sintheta*std::cos(phi),sintheta*std::sin(phi),costheta);
129  //create G4DynamicParticle for leptons  in the rest frame of (l+ l-)system
130  G4DynamicParticle * leptonparticle
131    = new G4DynamicParticle(daughters[idLepton] , 
132                            ldirection, Elepton-leptonmass );
133  G4DynamicParticle * antileptonparticle
134    = new G4DynamicParticle(daughters[idAntiLepton] , 
135                            -1.0*ldirection, Elepton-leptonmass );
136  //boost leptons in the rest frame of the parent
137  G4LorentzVector p4 = leptonparticle->Get4Momentum();
138  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
139  leptonparticle->Set4Momentum(p4);
140  p4 = antileptonparticle->Get4Momentum();
141  p4.boost( -1.0*gdirection.x()*beta, -1.0*gdirection.y()*beta, -1.0*gdirection.z()*beta);
142  antileptonparticle->Set4Momentum(p4);
143
144  //create G4Decayproducts
145  G4DecayProducts *products = new G4DecayProducts(*parentparticle);
146  delete parentparticle;
147  products->PushProducts(gammaparticle);
148  products->PushProducts(leptonparticle);
149  products->PushProducts(antileptonparticle);
150
151#ifdef G4VERBOSE
152  if (GetVerboseLevel()>1) {
153     G4cout << "G4DalitzDecayChannel::DecayIt ";
154     G4cout << "  create decay products in rest frame " <<G4endl;
155     products->DumpInfo();
156  }
157#endif
158  return products;
159}
160
161
162
163
164
Note: See TracBrowser for help on using the repository browser.