source: trunk/source/processes/hadronic/models/chiral_inv_phase_space/cross_sections/src/G4QKaonZeroNuclearCrossSection.cc @ 1315

Last change on this file since 1315 was 1315, checked in by garnier, 14 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 5.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
29//
30//
31// G4 Physics class: G4QKaonZeroNuclearCrossSection for gamma+A cross sections
32// Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Dec-03
33// The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Feb-04
34// --------------------------------------------------------------------------------
35// ****************************************************************************************
36// ***** This HEADER is a property of the CHIPS hadronic package in Geant4 (M. Kosov) *****
37// *********** DO NOT MAKE ANY CHANGE without approval of Mikhail.Kossov@cern.ch **********
38// ****************************************************************************************
39// Short description: CHIPS cross-sections for K0-nuclear interactions [K0=(K+ + K-)/2]
40// -------------------------------------------------------------------------------------
41//
42//#define debug
43//#define pdebug
44//#define debug3
45//#define debugn
46//#define debugs
47
48#include "G4QKaonZeroNuclearCrossSection.hh"
49
50// Initialization of the
51G4double* G4QKaonZeroNuclearCrossSection::lastLEN=0;// Pointer to the lastArray of LowEn CS
52G4double* G4QKaonZeroNuclearCrossSection::lastHEN=0;// Pointer to the lastArray of HighEnCS
53G4int     G4QKaonZeroNuclearCrossSection::lastN=0;  // The last N of calculated nucleus
54G4int     G4QKaonZeroNuclearCrossSection::lastZ=0;  // The last Z of calculated nucleus
55G4double  G4QKaonZeroNuclearCrossSection::lastP=0.; // Last used in cross section Momentum
56G4double  G4QKaonZeroNuclearCrossSection::lastTH=0.;// Last threshold momentum
57G4double  G4QKaonZeroNuclearCrossSection::lastCS=0.;// Last value of the Cross Section
58G4int     G4QKaonZeroNuclearCrossSection::lastI=0;  // The last position in the DAMDB
59G4VQCrossSection* G4QKaonZeroNuclearCrossSection::theKMinusCS =
60                                             G4QKaonMinusNuclearCrossSection::GetPointer();
61G4VQCrossSection*  G4QKaonZeroNuclearCrossSection::theKPlusCS  =
62                                              G4QKaonPlusNuclearCrossSection::GetPointer();
63
64// Returns Pointer to the G4VQCrossSection class
65G4VQCrossSection* G4QKaonZeroNuclearCrossSection::GetPointer()
66{
67  static G4QKaonZeroNuclearCrossSection theCrossSection; //**Static body of Cross Section**
68  return &theCrossSection;
69}
70
71// The main member function giving the collision cross section (P is in IU, CS is in mb)
72// Make pMom in independent units ! (Now it is MeV)
73G4double G4QKaonZeroNuclearCrossSection::GetCrossSection(G4bool fCS, G4double pMom,
74                                                       G4int tgZ, G4int tgN, G4int PDG)
75{
76#ifdef debug
77  G4cout<<"G4QKZCS::GetCS:>>> f="<<fCS<<", p="<<pMom<<", Z="<<tgZ<<"("<<lastZ<<") ,N="<<tgN
78        <<"("<<lastN<<"), PDG=130/310, thresh="<<lastTH<<",Sz="<<colN.size()<<G4endl;
79#endif
80  if(PDG!=130 && PDG!=310 && PDG!=311 && PDG!=-311)
81                 G4cout<<"-Warning-G4QKaonZeroCS::GetCS:***Not a K0***, PDG="<<PDG<<G4endl;
82  G4double CS=(theKMinusCS->GetCrossSection(fCS,pMom,tgZ,tgN,-321)
83              +theKPlusCS->GetCrossSection(fCS,pMom,tgZ,tgN,321))/2;
84#ifdef debug
85  G4cout<<"==>G4QKZCS::GetCroSec: P="<<pMom<<"(MeV),CS="<<CS<<"(mb)"<<G4endl;
86#endif
87  return CS;
88}
89
90// A fake function (never called) giving the K0-A cross section (Mom in GeV, CS in mb)
91G4double G4QKaonZeroNuclearCrossSection::CalculateCrossSection(G4bool, G4int, G4int, G4int,
92                                                               G4int, G4int, G4double)
93{
94  G4cout<<"-Warning-G4QKaonZeroCS::CalcCS:*A fake function is called, returns 0**"<<G4endl;
95  return 0.;
96} // It is kept because this is a pure virtual function of the G4VQCrossSection interface
Note: See TracBrowser for help on using the repository browser.