Public Member Functions | Private Attributes | List of all members
genie::FermiMomentumTable Class Reference

A table of Fermi momentum constants. More...

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Physics/NuclearState/FermiMomentumTable.h"

Public Member Functions

 FermiMomentumTable ()
 
 FermiMomentumTable (const FermiMomentumTable &fmt)
 
virtual ~FermiMomentumTable ()
 
double FindClosestKF (int target_pdgc, int nucleon_pdgc) const
 
void AddTableEntry (int target_pdgc, KF_t kf)
 

Private Attributes

map< int, KF_tfKFSets
 

Detailed Description

A table of Fermi momentum constants.

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

August 18, 2005

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 33 of file FermiMomentumTable.h.

Constructor & Destructor Documentation

FermiMomentumTable::FermiMomentumTable ( )

Definition at line 26 of file FermiMomentumTable.cxx.

27 {
28 }
FermiMomentumTable::FermiMomentumTable ( const FermiMomentumTable fmt)

Definition at line 30 of file FermiMomentumTable.cxx.

31 {
32 
33 }
FermiMomentumTable::~FermiMomentumTable ( )
virtual

Definition at line 35 of file FermiMomentumTable.cxx.

36 {
37 
38 }

Member Function Documentation

void FermiMomentumTable::AddTableEntry ( int  target_pdgc,
KF_t  kf 
)

Definition at line 40 of file FermiMomentumTable.cxx.

References fKFSets.

Referenced by genie::FermiMomentumTablePool::ParseXMLTables().

41 {
42  fKFSets.insert(map<int, KF_t>::value_type(tgt_pdgc, kf));
43 }
double FermiMomentumTable::FindClosestKF ( int  target_pdgc,
int  nucleon_pdgc 
) const

Definition at line 45 of file FermiMomentumTable.cxx.

References fKFSets, genie::pdg::IonPdgCode(), genie::pdg::IonPdgCodeToA(), genie::pdg::IonPdgCodeToZ(), genie::pdg::IsProton(), LOG, genie::EKF_t::n, genie::EKF_t::p, pDEBUG, pINFO, pWARN, Z, and Zc.

Referenced by genie::NievesQELCCPXSec::CNCTCLimUcalc(), genie::PauliBlocker::GetFermiMomentum(), genie::FermiMover::KickHitNucleon(), main(), genie::utils::nuclear::NuclQELXSecSuppression(), genie::FGMBodekRitchie::ProbDistro(), genie::SmithMonizUtils::SetInteraction(), genie::ReinSehgalRESPXSec::XSec(), and genie::BSKLNBaseRESPXSec2014::XSec().

46 {
47  LOG("FermiP", pINFO)
48  << "Finding Fermi momenta table entry for (tgt = "
49  << tgt_pdgc << ", nucl = " << nucleon_pdgc << ")";
50 
51  if(fKFSets.size()==0) {
52  LOG("FermiP", pWARN)
53  << "The Fermi momenta table is empty! Returning kf(tgt = "
54  << tgt_pdgc << ", nucl = " << nucleon_pdgc << ") = 0";
55  return 0;
56  }
57 
58  double kf=0;
59  bool isp = pdg::IsProton(nucleon_pdgc);
60 
61  if(fKFSets.count(tgt_pdgc) == 1) {
62  LOG("FermiP", pDEBUG) << "Got exact match in Fermi momenta table";
63  map<int, KF_t>::const_iterator table_iter = fKFSets.find(tgt_pdgc);
64  if(isp) kf = table_iter->second.p;
65  else kf = table_iter->second.n;
66  LOG("FermiP", pINFO) << "kF = " << kf;
67  return kf;
68  }
69  LOG("FermiP", pINFO) << "Couldn't find exact match in Fermi momenta table";
70 
71  int Z = pdg::IonPdgCodeToZ(tgt_pdgc);
72  int Ac=9999, Zc=9999, dZmin=9999;
73  map<int, KF_t>::const_iterator kfiter;
74  for(kfiter=fKFSets.begin(); kfiter!=fKFSets.end(); ++kfiter) {
75  int pdgc = kfiter->first;
76  int Zt = pdg::IonPdgCodeToZ(pdgc);
77  int dZ = TMath::Abs(Zt-Z);
78  if(dZ<dZmin) {
79  dZmin = dZ;
80  Zc = Zt;
81  Ac = pdg::IonPdgCodeToA(pdgc);
82  KF_t kft = kfiter->second;
83  if(isp) kf=kft.p;
84  else kf=kft.n;
85  }
86  }
87  LOG("FermiP", pINFO)
88  << "The closest nucleus in table is pdgc = " << pdg::IonPdgCode(Ac,Zc);
89  LOG("FermiP", pINFO) << "kF = " << kf;
90  return kf;
91 }
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:61
Float_t Z
Definition: plot.C:38
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
#define pINFO
Definition: Messenger.h:63
#define pWARN
Definition: Messenger.h:61
Double_t Zc
Definition: plot.C:264
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:69
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:53
#define pDEBUG
Definition: Messenger.h:64

Member Data Documentation

map<int, KF_t> genie::FermiMomentumTable::fKFSets
private

Definition at line 44 of file FermiMomentumTable.h.

Referenced by AddTableEntry(), and FindClosestKF().


The documentation for this class was generated from the following files: