source: trunk/source/processes/hadronic/models/de_excitation/fermi_breakup/include/G4FermiPhaseSpaceDecay.icc @ 819

Last change on this file since 819 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 3.3 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// Hadronic Process: Nuclear De-excitations
27// by V. Lara
28
29inline G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay()
30{
31}
32
33inline G4FermiPhaseSpaceDecay::~G4FermiPhaseSpaceDecay()
34{
35}
36
37inline G4FermiPhaseSpaceDecay::G4FermiPhaseSpaceDecay(const G4FermiPhaseSpaceDecay&)
38{
39  // This is meant to not be used
40}
41
42inline const G4FermiPhaseSpaceDecay &
43G4FermiPhaseSpaceDecay::operator=(const G4FermiPhaseSpaceDecay&)
44{
45  //This is menat to not be used
46  return *this;
47}
48
49inline G4bool
50G4FermiPhaseSpaceDecay::operator==(const G4FermiPhaseSpaceDecay&)
51{
52  // This is meant to not be used
53  return false;
54}
55
56inline G4bool
57G4FermiPhaseSpaceDecay::operator!=(const G4FermiPhaseSpaceDecay&)
58{
59  // This is meant to not be used
60  return true;
61}
62
63
64inline G4double
65G4FermiPhaseSpaceDecay::PtwoBody(G4double E, G4double P1, G4double P2) const
66{
67  G4double P = (E+P1+P2)*(E+P1-P2)*(E-P1+P2)*(E-P1-P2)/(4.0*E*E);
68  if (P>0.0) return std::sqrt(P);
69  else return -1.0;
70}
71
72
73inline std::vector<G4LorentzVector*> * G4FermiPhaseSpaceDecay::
74Decay(const G4double parent_mass, const std::vector<G4double>& fragment_masses) const
75{
76  //  if (fragment_masses.size() == 2) 
77  //    {
78  //      return this->TwoBodyDecay(parent_mass,fragment_masses);
79  //    }
80  //  else return this->NBodyDecay(parent_mass,fragment_masses);
81  //  else
82  //    {
83      return this->KopylovNBodyDecay(parent_mass,fragment_masses);
84      //    }
85}
86
87inline G4double
88G4FermiPhaseSpaceDecay::BetaKopylov(const G4int K) const
89{
90  // Notice that alpha > beta always
91  const G4double beta = 1.5;
92  G4double alpha = 1.5*(K-1);
93  G4double Y1 = CLHEP::RandGamma::shoot(alpha,1);
94  G4double Y2 = CLHEP::RandGamma::shoot(beta,1);
95 
96  return Y1/(Y1+Y2);
97}
Note: See TracBrowser for help on using the repository browser.