G4QKaonZeroNuclearCrossSection.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: G4QKaonZeroNuclearCrossSection 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 // This Header is a part of the CHIPS physics package (author: M. Kosov)
00037 // ****************************************************************************************
00038 // Short description: CHIPS cross-sections for K0-nuclear interactions [K0=(K+ + K-)/2]
00039 // -------------------------------------------------------------------------------------
00040 //
00041 //#define debug
00042 //#define pdebug
00043 //#define debug3
00044 //#define debugn
00045 //#define debugs
00046 
00047 #include "G4QKaonZeroNuclearCrossSection.hh"
00048 
00049 // Initialization of the
00050 G4double* G4QKaonZeroNuclearCrossSection::lastLEN=0;// Pointer to the lastArray of LowEn CS
00051 G4double* G4QKaonZeroNuclearCrossSection::lastHEN=0;// Pointer to the lastArray of HighEnCS
00052 G4int     G4QKaonZeroNuclearCrossSection::lastN=0;  // The last N of calculated nucleus
00053 G4int     G4QKaonZeroNuclearCrossSection::lastZ=0;  // The last Z of calculated nucleus
00054 G4double  G4QKaonZeroNuclearCrossSection::lastP=0.; // Last used in cross section Momentum
00055 G4double  G4QKaonZeroNuclearCrossSection::lastTH=0.;// Last threshold momentum
00056 G4double  G4QKaonZeroNuclearCrossSection::lastCS=0.;// Last value of the Cross Section
00057 G4int     G4QKaonZeroNuclearCrossSection::lastI=0;  // The last position in the DAMDB
00058 G4VQCrossSection* G4QKaonZeroNuclearCrossSection::theKMinusCS =
00059                                              G4QKaonMinusNuclearCrossSection::GetPointer();
00060 G4VQCrossSection*  G4QKaonZeroNuclearCrossSection::theKPlusCS  =
00061                                               G4QKaonPlusNuclearCrossSection::GetPointer();
00062 
00063 // Returns Pointer to the G4VQCrossSection class
00064 G4VQCrossSection* G4QKaonZeroNuclearCrossSection::GetPointer()
00065 {
00066   static G4QKaonZeroNuclearCrossSection theCrossSection; //**Static body of Cross Section**
00067   return &theCrossSection;
00068 }
00069 
00070 // The main member function giving the collision cross section (P is in IU, CS is in mb)
00071 // Make pMom in independent units ! (Now it is MeV)
00072 G4double G4QKaonZeroNuclearCrossSection::GetCrossSection(G4bool fCS, G4double pMom,
00073                                                        G4int tgZ, G4int tgN, G4int PDG)
00074 {
00075 #ifdef debug
00076   G4cout<<"G4QKZCS::GetCS:>>> f="<<fCS<<", p="<<pMom<<", Z="<<tgZ<<"("<<lastZ<<") ,N="<<tgN
00077         <<"("<<lastN<<"), PDG=130/310, thresh="<<lastTH<<",Sz="<<colN.size()<<G4endl;
00078 #endif
00079   if(PDG!=130 && PDG!=310 && PDG!=311 && PDG!=-311)
00080                  G4cout<<"-Warning-G4QKaonZeroCS::GetCS:***Not a K0***, PDG="<<PDG<<G4endl;
00081   G4double CS=(theKMinusCS->GetCrossSection(fCS,pMom,tgZ,tgN,-321)
00082               +theKPlusCS->GetCrossSection(fCS,pMom,tgZ,tgN,321))/2;
00083 #ifdef debug
00084   G4cout<<"==>G4QKZCS::GetCroSec: P="<<pMom<<"(MeV),CS="<<CS<<"(mb)"<<G4endl;
00085 #endif
00086   return CS;
00087 }
00088 
00089 // A fake function (never called) giving the K0-A cross section (Mom in GeV, CS in mb)
00090 G4double G4QKaonZeroNuclearCrossSection::CalculateCrossSection(G4bool, G4int, G4int, G4int,
00091                                                                G4int, G4int, G4double)
00092 {
00093   G4cout<<"-Warning-G4QKaonZeroCS::CalcCS:*A fake function is called, returns 0**"<<G4endl;
00094   return 0.;
00095 } // It is kept because this is a pure virtual function of the G4VQCrossSection interface

Generated on Mon May 27 17:49:36 2013 for Geant4 by  doxygen 1.4.7