G4ChipsKaonZeroElasticXS.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
00028 // GEANT4 tag $Name: not supported by cvs2svn $
00029 //
00030 //
00031 // G4 Physics class: G4ChipsKaonZeroElasticXS for gamma+A cross sections
00032 // Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Dec-03
00033 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Feb-04
00034 //
00035 // ****************************************************************************************
00036 // Short description: Cross-sections extracted (by W.Pokorski) from the CHIPS package for 
00037 // K(zero)-nuclear  interactions. Original author: M. Kossov
00038 // -------------------------------------------------------------------------------------
00039 //
00040 
00041 #include "G4ChipsKaonZeroElasticXS.hh"
00042 #include "G4DynamicParticle.hh"
00043 #include "G4ParticleDefinition.hh"
00044 #include "G4KaonZero.hh"
00045 #include "G4KaonZeroLong.hh"
00046 #include "G4KaonZeroShort.hh"
00047 #include "G4AntiKaonZero.hh"
00048 
00049 // factory
00050 #include "G4CrossSectionFactory.hh"
00051 //
00052 G4_DECLARE_XS_FACTORY(G4ChipsKaonZeroElasticXS);
00053 
00054 // Initialization of the
00055 G4double* G4ChipsKaonZeroElasticXS::lastLEN=0;// Pointer to the lastArray of LowEn CS
00056 G4double* G4ChipsKaonZeroElasticXS::lastHEN=0;// Pointer to the lastArray of HighEnCS
00057 G4int     G4ChipsKaonZeroElasticXS::lastN=0;  // The last N of calculated nucleus
00058 G4int     G4ChipsKaonZeroElasticXS::lastZ=0;  // The last Z of calculated nucleus
00059 G4double  G4ChipsKaonZeroElasticXS::lastP=0.; // Last used in cross section Momentum
00060 G4double  G4ChipsKaonZeroElasticXS::lastTH=0.;// Last threshold momentum
00061 G4double  G4ChipsKaonZeroElasticXS::lastCS=0.;// Last value of the Cross Section
00062 G4int     G4ChipsKaonZeroElasticXS::lastI=0;  // The last position in the DAMDB
00063 
00064 
00065 G4ChipsKaonZeroElasticXS::G4ChipsKaonZeroElasticXS():G4VCrossSectionDataSet(Default_Name())
00066 {
00067   theKMinusCS = (G4ChipsKaonMinusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusElasticXS::Default_Name());;
00068   theKPlusCS = (G4ChipsKaonPlusElasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusElasticXS::Default_Name());
00069 }
00070 
00071 
00072 G4ChipsKaonZeroElasticXS::~G4ChipsKaonZeroElasticXS()
00073 {
00074 }
00075 
00076 G4bool G4ChipsKaonZeroElasticXS::IsIsoApplicable(const G4DynamicParticle* Pt, G4int, G4int,    
00077                                  const G4Element*,
00078                                  const G4Material*)
00079 {
00080   G4ParticleDefinition* particle = Pt->GetDefinition();
00081   
00082   if(particle == G4KaonZeroLong::KaonZeroLong()   ||
00083      particle == G4KaonZeroShort::KaonZeroShort() ||
00084      particle == G4KaonZero::KaonZero()           ||
00085      particle == G4AntiKaonZero::AntiKaonZero()   )
00086   {
00087     return true;
00088   }
00089   return false;
00090 }
00091 
00092 
00093 
00094 // The main member function giving the collision cross section (P is in IU, CS is in mb)
00095 // Make pMom in independent units ! (Now it is MeV)
00096 
00097 G4double G4ChipsKaonZeroElasticXS::GetIsoCrossSection(const G4DynamicParticle* Pt, G4int tgZ, G4int A,  
00098                                                         const G4Isotope*,
00099                                                         const G4Element*,
00100                                                         const G4Material*)
00101 {
00102   G4double pMom=Pt->GetTotalMomentum();
00103   G4int N = A - tgZ;
00104   
00105   return GetChipsCrossSection(pMom, tgZ, N, 311);
00106 }
00107 
00108 G4double G4ChipsKaonZeroElasticXS::GetChipsCrossSection(G4double mom, G4int Z, G4int N, G4int pdg)
00109 {
00110   return (theKMinusCS->GetChipsCrossSection(mom,Z,N,pdg)
00111           +theKPlusCS->GetChipsCrossSection(mom,Z,N,pdg))/2;
00112 }
00113 
00114 

Generated on Mon May 27 17:47:52 2013 for Geant4 by  doxygen 1.4.7