Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:17

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // Hadronic Process: Phase space decay for the Fermi BreakUp model
0028 // by V. Lara
0029 //
0030 // Modifications:
0031 // 01.04.2011 General cleanup by V.Ivanchenko: 
0032 //          - IsotropicVector is inlined
0033 //          - Momentum computation return zero or positive value
0034 //          - DumpProblem method is added providing more information
0035 //          - Reduced usage of exotic std functions  
0036 //
0037 
0038 #ifndef G4FermiPhaseSpaceDecay_hh
0039 #define G4FermiPhaseSpaceDecay_hh 1
0040 
0041 #include "G4LorentzVector.hh"
0042 #include "G4ThreeVector.hh"
0043 #include "Randomize.hh"
0044 
0045 #include <vector>
0046 
0047 class G4Pow;
0048 
0049 class G4FermiPhaseSpaceDecay
0050 {
0051 public:
0052 
0053   G4FermiPhaseSpaceDecay();
0054   ~G4FermiPhaseSpaceDecay();
0055   
0056   std::vector<G4LorentzVector*>* Decay(G4double parent_mass, 
0057     const std::vector<G4double>& fragment_masses) const;
0058 
0059 private:
0060 
0061   inline G4double PtwoBody(G4double E, G4double P1, G4double P2) const;
0062   
0063   G4double BetaKopylov(G4int, CLHEP::HepRandomEngine*) const; 
0064 
0065   std::vector<G4LorentzVector*> * 
0066   KopylovNBodyDecay(G4double, const std::vector<G4double>&) const;
0067 
0068   G4FermiPhaseSpaceDecay(const G4FermiPhaseSpaceDecay&) = delete;
0069   const G4FermiPhaseSpaceDecay & operator=
0070   (const G4FermiPhaseSpaceDecay &) = delete; 
0071   G4bool operator==(const G4FermiPhaseSpaceDecay&) = delete;
0072   G4bool operator!=(const G4FermiPhaseSpaceDecay&) = delete;
0073 
0074   G4Pow* g4calc;
0075 };
0076 
0077 inline G4double 
0078 G4FermiPhaseSpaceDecay::PtwoBody(G4double E, G4double P1, G4double P2) const
0079 {
0080   G4double P = (E+P1+P2)*(E+P1-P2)*(E-P1+P2)*(E-P1-P2)/(4.0*E*E);
0081   return (P>0.0) ? std::sqrt(P) : 0.0; 
0082 }
0083 
0084 #endif