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