GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
gtestFGPauliBlockSuppr.cxx File Reference
#include <TFile.h>
#include <TNtuple.h>
#include "Framework/Conventions/Constants.h"
#include "Framework/Conventions/Units.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/ParticleData/PDGCodes.h"
#include "Framework/ParticleData/PDGUtils.h"
#include "Physics/NuclearState/NuclearUtils.h"
#include "Physics/NuclearState/FermiMomentumTablePool.h"
#include "Physics/NuclearState/FermiMomentumTable.h"
Include dependency graph for gtestFGPauliBlockSuppr.cxx:

Go to the source code of this file.

Functions

int main (int, char **)
 

Function Documentation

int main ( int  ,
char **   
)

Definition at line 33 of file gtestFGPauliBlockSuppr.cxx.

References genie::units::A, genie::FermiMomentumTable::FindClosestKF(), genie::FermiMomentumTablePool::GetTable(), genie::units::GeV, genie::units::GeV2, genie::FermiMomentumTablePool::Instance(), genie::pdg::IonPdgCodeToA(), genie::pdg::IonPdgCodeToZ(), genie::constants::kNucleonMass, genie::kPdgNeutron, genie::kPdgProton, genie::kPdgTgtC12, genie::kPdgTgtDeuterium, genie::kPdgTgtFe56, genie::kPdgTgtO16, LOG, pNOTICE, genie::utils::kinematics::Q2(), and genie::utils::nuclear::RQEFG_generic().

34 {
35  TNtuple * nt = new TNtuple("nt","","Z:A:nucl:Q2:Rdef:Rm10p:Rp10p");
36 
37  const int ntgt = 4;
38  const int nnuc = 4;
39 
40  int target [ntgt] = { kPdgTgtDeuterium, kPdgTgtC12, kPdgTgtO16, kPdgTgtFe56 };
41  int nucleon [nnuc] = { kPdgProton, kPdgNeutron };
42 
43  const int N = 3001;
44  const double Q2min = 0.000001*units::GeV2;
45  const double Q2max = 10*units::GeV2;
46  const double logQ2min = TMath::Log(Q2min);
47  const double logQ2max = TMath::Log(Q2max);
48  const double dlogQ2 = (logQ2max-logQ2min)/(N-1);
49  const double kMN = constants::kNucleonMass;
50  const double pmax = 0.5*units::GeV;
51 
52  FermiMomentumTablePool * kftp = FermiMomentumTablePool::Instance();
53  const FermiMomentumTable * kft = kftp->GetTable("Default");
54 
55  for(int itgt=0; itgt<ntgt; itgt++) {
56  for(int inuc=0; inuc<nnuc; inuc++) {
57 
58  double kFi = kft->FindClosestKF(target[itgt], nucleon[inuc]);
59 
60  int Z = pdg::IonPdgCodeToZ(target[itgt]);
61  int A = pdg::IonPdgCodeToA(target[itgt]);
62 
63  LOG("test", pNOTICE)
64  << "nuclear target = " << target[itgt] << ", nucleon = " << nucleon[inuc];
65 
66  for(int i=0; i<N; i++) {
67  double Q2 = TMath::Exp(logQ2min + i*dlogQ2);
68  double Rdef = utils::nuclear::RQEFG_generic(-1*Q2,kMN, kFi, kFi,pmax);
69  double Rm10p = utils::nuclear::RQEFG_generic(-1*Q2,kMN,0.9*kFi,0.9*kFi,pmax); // kF -> +10%
70  double Rp10p = utils::nuclear::RQEFG_generic(-1*Q2,kMN,1.1*kFi,1.1*kFi,pmax); // kF -> -10%
71 
72  LOG("test", pNOTICE)
73  << "Q2 = " << Q2 << " GeV, Rdef = " << Rdef
74  << ", R(kF->0.9kF) = " << Rm10p << ", R(kF->1.1*kF) = " << Rp10p;
75 
76  nt->Fill(Z,A,nucleon[inuc],Q2,Rdef,Rm10p,Rp10p);
77 
78  }//i
79  }//inuc
80  }//itgt
81 
82  TFile f("./fg_pauli_suppression_factors.root","recreate");
83  nt->Write();
84  f.Close();
85 
86  return 0;
87 }
static const double kNucleonMass
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:63
A table of Fermi momentum constants.
const int kPdgTgtO16
Definition: PDGCodes.h:203
double RQEFG_generic(double q2, double Mn, double kFi, double kFf, double pmax)
Singleton class to load &amp; serve tables of Fermi momentum constants.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double A
Definition: Units.h:74
const FermiMomentumTable * GetTable(string name)
static constexpr double GeV
Definition: Units.h:28
static constexpr double GeV2
Definition: Units.h:133
const int kPdgTgtC12
Definition: PDGCodes.h:202
const int kPdgTgtFe56
Definition: PDGCodes.h:205
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:55
const int kPdgProton
Definition: PDGCodes.h:81
double FindClosestKF(int target_pdgc, int nucleon_pdgc) const
#define pNOTICE
Definition: Messenger.h:61
const int kPdgTgtDeuterium
Definition: PDGCodes.h:201
const int kPdgNeutron
Definition: PDGCodes.h:83