35{
36 const unsigned int kNTargets = 2;
37 const unsigned int kNModels = 4;
39
40
42
45 "genie::FGMBodekRitchie","Default"));
48 algf->
GetAlgorithm(
"genie::BenharSpectralFunc1D",
"Default"));
51 algf->
GetAlgorithm(
"genie::BenharSpectralFunc",
"Default"));
55
56 const NuclearModelI * nuclmodel[kNModels] = { bodritch, benhsf1d, benhsf2d, effsf };
57
58
59 Target * nucltgt[kNTargets];
60 nucltgt[0] =
new Target ( 6, 12);
61 nucltgt[1] =
new Target (26, 56);
62
63
64
65 TNtuple * nuclnt = new TNtuple("nuclnt","","target:model:p:px:py:pz:w");
66
67
68 for(unsigned int it = 0; it < kNTargets; it++) {
70 const Target & target = *nucltgt[it];
71 LOG(
"test",
pNOTICE) <<
"** Using target : " << target;;
72 for(unsigned int im = 0; im < kNModels; im++) {
73 LOG(
"test",
pNOTICE) <<
"Running model : " << nuclmodel[im]->
Id();
74 for(
unsigned int iev = 0; iev <
kNEvents; iev++) {
78 double px = p3.Px();
79 double py = p3.Py();
80 double pz = p3.Pz();
81 double p = p3.Mag();
84 nuclnt->Fill(it,im,p,px,py,pz,w);
85 }
86 }
87 }
88
89
90 TFile f("./fermip.root","recreate");
91 nuclnt->Write();
92 f.Close();
93
94
95 delete nucltgt[0];
96 delete nucltgt[1];
97 delete nuclnt;
98
99 return 0;
100}
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
The GENIE Algorithm Factory.
const Algorithm * GetAlgorithm(const AlgId &algid)
static AlgFactory * Instance()
virtual const AlgId & Id(void) const
Get algorithm ID.
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
const TVector3 & Momentum3(void) const
virtual bool GenerateNucleon(const Target &) const =0
double RemovalEnergy(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
void SetHitNucPdg(int pdgc)
const unsigned int kNEvents
string Vec3AsString(const TVector3 *vec)