Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:26

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 // J. M. Quesada (August 2008).  
0028 // Based  on previous work by V. Lara
0029 //
0030 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 
0031 // cross section option 
0032 // JMQ (06 September 2008) Also external choice has been added for:
0033 //                      - superimposed Coulomb barrier (if useSICB=true) 
0034 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 
0035 //                        G4ParticleDefinition to constructor, 
0036 //                        inline method to build G4ReactionProduct; 
0037 //                        remove string name
0038 //                        
0039 
0040 #ifndef G4VPreCompoundFragment_h
0041 #define G4VPreCompoundFragment_h 1
0042 
0043 #include "G4ios.hh"
0044 #include <iomanip>
0045 #include "G4ParticleDefinition.hh"
0046 #include "G4IonTable.hh"
0047 #include "G4Fragment.hh"
0048 #include "G4ReactionProduct.hh"
0049 #include "G4Pow.hh"
0050 
0051 class G4NuclearLevelData;
0052 class G4DeexPrecoParameters;
0053 class G4VCoulombBarrier;
0054 
0055 class G4VPreCompoundFragment
0056 {
0057 public:  
0058 
0059   explicit G4VPreCompoundFragment(const G4ParticleDefinition*,
0060                   G4VCoulombBarrier*);
0061   
0062   virtual ~G4VPreCompoundFragment();
0063   
0064   friend std::ostream& 
0065   operator<<(std::ostream&, const G4VPreCompoundFragment*);
0066   friend std::ostream& 
0067   operator<<(std::ostream&, const G4VPreCompoundFragment&);
0068   
0069   // =====================
0070   // Pure Virtual methods
0071   // =====================
0072   
0073   // Initialization method
0074   void Initialize(const G4Fragment& aFragment);
0075     
0076   // Methods for calculating the emission probability
0077   // ------------------------------------------------
0078   
0079   // Calculates the total (integrated over kinetic energy) emission
0080   // probability of a fragment
0081   virtual G4double CalcEmissionProbability(const G4Fragment&) = 0;
0082   
0083   // sample kinetic energy of emitted fragment
0084   virtual G4double SampleKineticEnergy(const G4Fragment&) = 0;
0085 
0086   inline G4bool IsItPossible(const G4Fragment& aFragment) const;
0087   
0088   inline G4ReactionProduct* GetReactionProduct() const;     
0089   
0090   G4int GetA() const { return theA; }
0091   
0092   G4int GetZ() const { return theZ; }
0093   
0094   G4int GetRestA() const { return theResA; }
0095   
0096   G4int GetRestZ() const { return theResZ; }
0097 
0098   G4double GetBindingEnergy() const { return theBindingEnergy; }
0099   
0100   G4double GetEnergyThreshold() const
0101   {
0102     return theMaxKinEnergy - theCoulombBarrier;
0103   }
0104 
0105   G4double GetEmissionProbability() const { return theEmissionProbability; }
0106     
0107   G4double GetNuclearMass() const { return theMass; }
0108   
0109   G4double GetRestNuclearMass() const { return theResMass; }
0110 
0111   const G4LorentzVector& GetMomentum() const { return theMomentum; }
0112   
0113   void SetMomentum(const G4LorentzVector& lv) { theMomentum = lv; }
0114   
0115   //for inverse cross section choice
0116   void SetOPTxs(G4int opt) { OPTxs = opt; }
0117   //for superimposed Coulomb Barrier for inverse cross sections
0118   void UseSICB(G4bool use) { useSICB = use; } 
0119 
0120   G4VPreCompoundFragment(const G4VPreCompoundFragment &right) = delete;
0121   const G4VPreCompoundFragment& 
0122   operator= (const G4VPreCompoundFragment &right) = delete;  
0123   G4bool operator==(const G4VPreCompoundFragment &right) const = delete;
0124   G4bool operator!=(const G4VPreCompoundFragment &right) const = delete;
0125 
0126 protected:
0127 
0128   virtual G4double GetAlpha() const = 0;
0129 
0130   virtual G4double GetBeta() const { return -theCoulombBarrier; }
0131 
0132   G4NuclearLevelData* fNucData;
0133   G4DeexPrecoParameters* theParameters;
0134   G4Pow* g4calc;
0135 
0136   G4int theA;
0137   G4int theZ;
0138   G4int theResA{0};
0139   G4int theResZ{0};
0140   G4int theFragA{0};
0141   G4int theFragZ{0};
0142 
0143   G4double theResA13{0.0};
0144   G4double theBindingEnergy{0.0};
0145   G4double theMinKinEnergy{0.0};
0146   G4double theMaxKinEnergy{0.0};
0147   G4double theResMass{0.0};
0148   G4double theReducedMass{0.0};
0149   G4double theMass;
0150 
0151   G4double theEmissionProbability{0.0};
0152   G4double theCoulombBarrier{0.0};
0153 
0154   //for inverse cross section choice
0155   G4int OPTxs{3};
0156   //for superimposed Coulomb Barrier for inverse cross sections
0157   G4bool useSICB{true};
0158 
0159 private:
0160 
0161   const G4ParticleDefinition* particle;
0162   G4VCoulombBarrier* theCoulombBarrierPtr;
0163   G4LorentzVector theMomentum{0., 0., 0., 0.};
0164 };
0165 
0166 inline G4bool
0167 G4VPreCompoundFragment::IsItPossible(const G4Fragment& aFragment) const
0168 {
0169   G4int pplus = aFragment.GetNumberOfCharged();
0170   G4int pneut = aFragment.GetNumberOfParticles()-pplus;
0171   return (pneut >= theA - theZ && pplus >= theZ && theMaxKinEnergy > 0.0);
0172 }
0173 
0174 inline G4ReactionProduct* G4VPreCompoundFragment::GetReactionProduct() const
0175 {
0176   G4ReactionProduct* theReactionProduct = new G4ReactionProduct(particle);
0177   theReactionProduct->SetMomentum(GetMomentum().vect());
0178   theReactionProduct->SetTotalEnergy(GetMomentum().e());
0179   return theReactionProduct;
0180 }
0181 
0182 #endif