Back to home page

EIC code displayed by LXR

 
 

    


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

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 header file G4ChargeExchangeXS
0030 //
0031 // Author V.Ivanchenko 
0032 //
0033 // Modified: 09.08.2023 Tim Lok Chau, CERN summer student program 
0034 //
0035  
0036 // This is a class for charge exchange hadronic cross sections:
0037 // pi- + N(Z, A) -> X + N(Z-1, A)
0038 // pi+ + N(Z, A) -> X + N(Z+1, A)
0039 //
0040 // where X = pi0, eta, etaP, omega, f2
0041 // V. Lyubovitsky, NA64 Collaboration (CERN)
0042 //
0043 // K- + N(Z, A) -> Y  + N(Z-1, A)
0044 // K+ + N(Z, A) -> Y  + N(Z+1, A)
0045 // KL + N(Z, A) -> K+ + N(Z-1, A)
0046 // KL + N(Z, A) -> K- + N(Z+1, A)
0047 //
0048 // where Y = KS, KL
0049 // 
0050 
0051 #ifndef G4ChargeExchangeXS_h
0052 #define G4ChargeExchangeXS_h 
0053 
0054 #include "G4VCrossSectionDataSet.hh"
0055 #include "globals.hh"
0056 #include <vector>
0057 
0058 class G4DynamicParticle;
0059 class G4ParticleDefinition;
0060 class G4Isotope;
0061 class G4Element;
0062 class G4Material;
0063 class G4Pow;
0064 
0065 class G4ChargeExchangeXS final : public G4VCrossSectionDataSet
0066 {
0067 public: 
0068 
0069   G4ChargeExchangeXS();
0070 
0071   ~G4ChargeExchangeXS() override = default;
0072 
0073   G4bool IsIsoApplicable(const G4DynamicParticle*, G4int Z, G4int A,
0074              const G4Element*, const G4Material*) override;
0075 
0076   G4double GetIsoCrossSection(const G4DynamicParticle*, G4int Z, G4int A,
0077                               const G4Isotope* iso,
0078                               const G4Element* elm,
0079                               const G4Material* mat) override;
0080 
0081   void CrossSectionDescription(std::ostream&) const override;
0082 
0083   const G4ParticleDefinition*
0084   SampleSecondaryType(const G4ParticleDefinition*,
0085                       const G4int Z, const G4int A);
0086 
0087   void SetEnergyLimit(G4double val) { fEnergyLimit = val; };
0088 
0089   void SetCrossSectionFactor(G4double val) { fFactor = val; };
0090 
0091   G4ChargeExchangeXS & operator=(const G4ChargeExchangeXS &right) = delete;
0092   G4ChargeExchangeXS(const G4ChargeExchangeXS&) = delete;
0093 
0094 private:
0095 
0096   G4Pow* g4calc;
0097   const G4ParticleDefinition* fPionSecPD[5];
0098   G4double fXSecPion[5] = {0.0, 0.0, 0.0, 0.0, 0.0};
0099   G4double fEnergyLimit{0.0};
0100   G4double fFactor{1.0};
0101 };
0102 
0103 #endif