Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4FermiPhaseSpaceDecay.hh
이 파일의 문서화 페이지로 가기
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 // $Id: G4ExcitationHandler.hh,v 1.13 2010-11-17 16:20:31 vnivanch Exp $
27 //
28 // Hadronic Process: Phase space decay for the Fermi BreakUp model
29 // by V. Lara
30 //
31 // Modifications:
32 // 01.04.2011 General cleanup by V.Ivanchenko:
33 // - IsotropicVector is inlined
34 // - Momentum computation return zero or positive value
35 // - DumpProblem method is added providing more information
36 // - Reduced usage of exotic std functions
37 //
38 
39 #ifndef G4FermiPhaseSpaceDecay_hh
40 #define G4FermiPhaseSpaceDecay_hh 1
41 
42 #include "G4LorentzVector.hh"
43 #include "G4ThreeVector.hh"
44 #include "Randomize.hh"
45 #include "G4Pow.hh"
46 
47 #include <vector>
50 
52 {
53 public:
54 
57 
58  inline std::vector<G4LorentzVector*>*
59  Decay(G4double parent_mass,
60  const std::vector<G4double>& fragment_masses) const;
61 
62 private:
63 
64  inline G4double PtwoBody(G4double E, G4double P1, G4double P2) const;
65 
67 
68  std::vector<G4LorentzVector*> *
69  KopylovNBodyDecay(G4double, const std::vector<G4double>&) const;
70 
71  void DumpProblem(G4double E, G4double P1, G4double P2, G4double P) const;
72 
77 
79 };
80 
81 inline G4double
83 {
84  G4double res = 0.0;
85  G4double P = (E+P1+P2)*(E+P1-P2)*(E-P1+P2)*(E-P1-P2)/(4.0*E*E);
86  if (P>0.0) { res = std::sqrt(P); }
87  else { DumpProblem(E,P1,P2,P); }
88  return res;
89 }
90 
91 inline std::vector<G4LorentzVector*>*
93  const std::vector<G4double>& fragment_masses) const
94 {
95  return KopylovNBodyDecay(parent_mass, fragment_masses);
96 }
97 
98 inline G4double
100  CLHEP::HepRandomEngine* rndmEngine) const
101 {
102  G4int N = 3*K - 5;
103  G4double xN = G4double(N);
104  G4double F;
105  // VI variant
106  G4double Fmax = std::sqrt(g4calc->powN(xN/(xN + 1),N)/(xN + 1));
107  G4double chi;
108  do {
109  chi = rndmEngine->flat();
110  F = std::sqrt(g4calc->powN(chi,N)*(1-chi));
111  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
112  } while ( Fmax*rndmEngine->flat() > F);
113  return chi;
114 }
115 
116 #endif
static const G4double * P2[nN]
std::vector< G4LorentzVector * > * Decay(G4double parent_mass, const std::vector< G4double > &fragment_masses) const
void DumpProblem(G4double E, G4double P1, G4double P2, G4double P) const
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:177
G4double BetaKopylov(G4int, CLHEP::HepRandomEngine *) const
const G4FermiPhaseSpaceDecay & operator=(const G4FermiPhaseSpaceDecay &)
Double_t K
G4bool operator!=(const G4FermiPhaseSpaceDecay &)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
**D E S C R I P T I O N
virtual double flat()=0
G4double PtwoBody(G4double E, G4double P1, G4double P2) const
static double P[]
int G4int
Definition: G4Types.hh:78
Definition: G4Pow.hh:56
static const G4double * P1[nN]
std::vector< G4LorentzVector * > * KopylovNBodyDecay(G4double, const std::vector< G4double > &) const
G4bool operator==(const G4FermiPhaseSpaceDecay &)