GENIEGenerator
Loading...
Searching...
No Matches
gtestFGPauliBlockSuppr.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\program gtestFGPauliBlockSuppr
5
6\brief Plot suppression factor due to Pauli-blocking.
7
8\author Costas Andreopoulos <c.andreopoulos \at cern.ch>
9 University of Liverpool
10
11\created June 20, 2004
12
13\cpright Copyright (c) 2003-2025, The GENIE Collaboration
14 For the full text of the license visit http://copyright.genie-mc.org
15
16*/
17//____________________________________________________________________________
18
19#include <TFile.h>
20#include <TNtuple.h>
21
30
31using namespace genie;
32
33int main(int /*argc*/, char ** /*argv*/)
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
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}
#define pNOTICE
Definition Messenger.h:61
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
int main()
Singleton class to load & serve tables of Fermi momentum constants.
const FermiMomentumTable * GetTable(string name)
static FermiMomentumTablePool * Instance(void)
A table of Fermi momentum constants.
double FindClosestKF(int target_pdgc, int nucleon_pdgc) const
int IonPdgCodeToZ(int pdgc)
Definition PDGUtils.cxx:55
int IonPdgCodeToA(int pdgc)
Definition PDGUtils.cxx:63
static constexpr double GeV
Definition Units.h:28
static constexpr double GeV2
Definition Units.h:133
double RQEFG_generic(double q2, double Mn, double kFi, double kFf, double pmax)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgTgtDeuterium
Definition PDGCodes.h:201
const int kPdgNeutron
Definition PDGCodes.h:83
const int kPdgTgtFe56
Definition PDGCodes.h:205
const int kPdgTgtO16
Definition PDGCodes.h:203
const int kPdgTgtC12
Definition PDGCodes.h:202