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

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

update ti head

File size: 5.1 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: hadr-chips-V09-03-08 $
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 part of the CHIPS physics package (author: M. Kosov)
37// ****************************************************************************************
38// Short description: CHIPS cross-sections for K0-nuclear interactions [K0=(K+ + K-)/2]
39// -------------------------------------------------------------------------------------
40//
41//#define debug
42//#define pdebug
43//#define debug3
44//#define debugn
45//#define debugs
46
47#include "G4QKaonZeroNuclearCrossSection.hh"
48
49// Initialization of the
50G4double* G4QKaonZeroNuclearCrossSection::lastLEN=0;// Pointer to the lastArray of LowEn CS
51G4double* G4QKaonZeroNuclearCrossSection::lastHEN=0;// Pointer to the lastArray of HighEnCS
52G4int     G4QKaonZeroNuclearCrossSection::lastN=0;  // The last N of calculated nucleus
53G4int     G4QKaonZeroNuclearCrossSection::lastZ=0;  // The last Z of calculated nucleus
54G4double  G4QKaonZeroNuclearCrossSection::lastP=0.; // Last used in cross section Momentum
55G4double  G4QKaonZeroNuclearCrossSection::lastTH=0.;// Last threshold momentum
56G4double  G4QKaonZeroNuclearCrossSection::lastCS=0.;// Last value of the Cross Section
57G4int     G4QKaonZeroNuclearCrossSection::lastI=0;  // The last position in the DAMDB
58G4VQCrossSection* G4QKaonZeroNuclearCrossSection::theKMinusCS =
59                                             G4QKaonMinusNuclearCrossSection::GetPointer();
60G4VQCrossSection*  G4QKaonZeroNuclearCrossSection::theKPlusCS  =
61                                              G4QKaonPlusNuclearCrossSection::GetPointer();
62
63// Returns Pointer to the G4VQCrossSection class
64G4VQCrossSection* G4QKaonZeroNuclearCrossSection::GetPointer()
65{
66  static G4QKaonZeroNuclearCrossSection theCrossSection; //**Static body of Cross Section**
67  return &theCrossSection;
68}
69
70// The main member function giving the collision cross section (P is in IU, CS is in mb)
71// Make pMom in independent units ! (Now it is MeV)
72G4double G4QKaonZeroNuclearCrossSection::GetCrossSection(G4bool fCS, G4double pMom,
73                                                       G4int tgZ, G4int tgN, G4int PDG)
74{
75#ifdef debug
76  G4cout<<"G4QKZCS::GetCS:>>> f="<<fCS<<", p="<<pMom<<", Z="<<tgZ<<"("<<lastZ<<") ,N="<<tgN
77        <<"("<<lastN<<"), PDG=130/310, thresh="<<lastTH<<",Sz="<<colN.size()<<G4endl;
78#endif
79  if(PDG!=130 && PDG!=310 && PDG!=311 && PDG!=-311)
80                 G4cout<<"-Warning-G4QKaonZeroCS::GetCS:***Not a K0***, PDG="<<PDG<<G4endl;
81  G4double CS=(theKMinusCS->GetCrossSection(fCS,pMom,tgZ,tgN,-321)
82              +theKPlusCS->GetCrossSection(fCS,pMom,tgZ,tgN,321))/2;
83#ifdef debug
84  G4cout<<"==>G4QKZCS::GetCroSec: P="<<pMom<<"(MeV),CS="<<CS<<"(mb)"<<G4endl;
85#endif
86  return CS;
87}
88
89// A fake function (never called) giving the K0-A cross section (Mom in GeV, CS in mb)
90G4double G4QKaonZeroNuclearCrossSection::CalculateCrossSection(G4bool, G4int, G4int, G4int,
91                                                               G4int, G4int, G4double)
92{
93  G4cout<<"-Warning-G4QKaonZeroCS::CalcCS:*A fake function is called, returns 0**"<<G4endl;
94  return 0.;
95} // It is kept because this is a pure virtual function of the G4VQCrossSection interface
Note: See TracBrowser for help on using the repository browser.