Back to home page

EIC code displayed by LXR

 
 

    


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

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 // -------------------------------------------------------------------
0028 //
0029 //      GEANT4 class file
0030 //
0031 //      CERN, Geneva, Switzerland
0032 //
0033 //      File name:     G4PhotonEvaporation
0034 //
0035 //      Author:        Vladimir Ivantchenko
0036 //
0037 //      Creation date: 22 October 2015 
0038 //
0039 // -------------------------------------------------------------------
0040 //
0041 // This is gamma deexcitation model based on the nuclear levels data
0042 //
0043 
0044 #ifndef G4PHOTONEVAPORATION_HH
0045 #define G4PHOTONEVAPORATION_HH 1
0046 
0047 #include "globals.hh"
0048 #include "G4VEvaporationChannel.hh"
0049 #include "G4NuclearLevelData.hh"
0050 #include "G4LevelManager.hh"
0051 #include "G4Fragment.hh"
0052 
0053 class G4GammaTransition;
0054 
0055 class G4PhotonEvaporation : public G4VEvaporationChannel {
0056 
0057 public:
0058 
0059   explicit G4PhotonEvaporation(G4GammaTransition* ptr=nullptr);
0060 
0061   ~G4PhotonEvaporation() override;
0062 
0063   void Initialise() override;
0064 
0065   // one photon or e- emission
0066   G4Fragment* EmittedFragment(G4Fragment* theNucleus) override;
0067 
0068   // returns "false", emitted gamma and e- are added to the results
0069   G4bool 
0070   BreakUpChain(G4FragmentVector* theResult, G4Fragment* theNucleus) override;
0071 
0072   // emitted gamma, e-, and residual fragment are added to the results
0073   G4FragmentVector* BreakItUp(const G4Fragment& theNucleus);
0074 
0075   // compute emission probability for both continum and discrete cases
0076   // must be called before any method above
0077   G4double GetEmissionProbability(G4Fragment* theNucleus) override;
0078 
0079   // methods for unit tests
0080   G4double ComputeInverseXSection(G4Fragment* theNucleus, 
0081                                   G4double kinEnergy) override;
0082   G4double ComputeProbability(G4Fragment* theNucleus, 
0083                   G4double kinEnergy) override;
0084 
0085   G4double GetFinalLevelEnergy(G4int Z, G4int A, G4double energy);
0086 
0087   G4double GetUpperLevelEnergy(G4int Z, G4int A);
0088 
0089   void SetGammaTransition(G4GammaTransition*);
0090 
0091   void SetICM(G4bool) override;
0092 
0093   void RDMForced (G4bool) override;
0094   
0095   inline void SetVerboseLevel(G4int verbose);
0096 
0097   inline G4int GetVacantShellNumber() const;
0098 
0099   G4PhotonEvaporation(const G4PhotonEvaporation & right) = delete;
0100   const G4PhotonEvaporation & operator = 
0101     (const G4PhotonEvaporation & right) = delete;
0102  
0103 private:
0104 
0105   void InitialiseGRData();
0106 
0107   G4Fragment* GenerateGamma(G4Fragment* nucleus);
0108 
0109   inline void InitialiseLevelManager(G4int Z, G4int A);
0110 
0111   G4NuclearLevelData* fNuclearLevelData;
0112   const G4LevelManager* fLevelManager{nullptr};
0113   G4GammaTransition* fTransition;
0114 
0115   // fPolarization stores polarization tensor for consecutive
0116   // decays of a nucleus 
0117   G4NuclearPolarization* fPolarization{nullptr};
0118 
0119   G4int fVerbose;
0120   G4int theZ{0};
0121   G4int theA{0};
0122   G4int fPoints{0};
0123   G4int fCode{0};
0124   G4int vShellNumber{-1};
0125   G4int MAXDEPOINT{10};
0126   std::size_t fIndex{0};
0127 
0128   G4int fSecID;  // Creator model ID for the secondaries created by this model
0129 
0130   G4double fLevelEnergyMax{0.0};
0131   G4double fExcEnergy{0.0};
0132   G4double fProbability{0.0};
0133   G4double fStep{0.0};
0134   G4double fMaxLifeTime{DBL_MAX};
0135 
0136   G4double fTolerance;
0137 
0138   G4bool   fICM{true};
0139   G4bool   fRDM{false};
0140   G4bool   fSampleTime{true};
0141   G4bool   fCorrelatedGamma{false};
0142   G4bool   isInitialised{false};
0143 
0144   static const G4int MAXGRDATA{300};
0145   static G4float GREnergy[MAXGRDATA];
0146   static G4float GRWidth[MAXGRDATA];
0147 
0148   G4double fCummProbability[10] = {0.0};
0149 };
0150 
0151 inline void G4PhotonEvaporation::SetVerboseLevel(G4int verbose)
0152 {
0153   fVerbose = verbose;
0154 }
0155 
0156 inline void 
0157 G4PhotonEvaporation::InitialiseLevelManager(G4int Z, G4int A)
0158 {
0159   if(Z != theZ || A != theA) {
0160     theZ = Z;
0161     theA = A;
0162     fIndex = 0;
0163     fLevelManager = fNuclearLevelData->GetLevelManager(theZ, theA);
0164     fLevelEnergyMax = fLevelManager ? fLevelManager->MaxLevelEnergy() : 0.0;
0165   }
0166 }
0167 
0168 inline G4int G4PhotonEvaporation::GetVacantShellNumber() const 
0169 { 
0170   return vShellNumber;
0171 }
0172 
0173 #endif