Functions | Variables
gEvGenHadronNucleus.cxx File Reference
#include <cassert>
#include <cstdlib>
#include "TSystem.h"
#include "TFile.h"
#include "TTree.h"
#include "TH1D.h"
#include "TF1.h"
#include "Framework/Conventions/GBuild.h"
#include "Framework/Algorithm/AlgFactory.h"
#include "Framework/Conventions/Controls.h"
#include "Framework/EventGen/EventRecord.h"
#include "Framework/EventGen/GMCJMonitor.h"
#include "Framework/EventGen/EventRecordVisitorI.h"
#include "Framework/GHEP/GHepParticle.h"
#include "Framework/GHEP/GHepRecord.h"
#include "Framework/GHEP/GHepStatus.h"
#include "Framework/Interaction/Interaction.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/Ntuple/NtpWriter.h"
#include "Framework/Ntuple/NtpMCFormat.h"
#include "Framework/Numerical/RandomGen.h"
#include "Framework/Numerical/Spline.h"
#include "Framework/ParticleData/PDGCodes.h"
#include "Framework/ParticleData/PDGLibrary.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/StringUtils.h"
#include "Framework/Utils/PrintUtils.h"
#include "Framework/Utils/XSecSplineList.h"
#include "Framework/Utils/RunOpt.h"
#include "Framework/Utils/CmdLnArgParser.h"
#include "Physics/HadronTransport/INukeHadroFates.h"
#include "Physics/HadronTransport/INukeUtils.h"

Go to the source code of this file.

Functions

void GetCommandLineArgs (int argc, char **argv)
 
const EventRecordVisitorIGetIntranuke (void)
 
double GenProbeKineticEnergy (void)
 
EventRecordInitializeEvent (void)
 
void BuildSpectrum (void)
 
void PrintSyntax (void)
 
int main (int argc, char **argv)
 

Variables

int kDefOptNevents = 10000
 
Long_t kDefOptRunNu = 0
 
string kDefOptEvFilePrefix = "gntp.inuke"
 
string kDefOptMode = "hA"
 
string gOptMode
 
Long_t gOptRunNu
 
int gOptNevents
 
int gOptProbePdgCode
 
int gOptTgtPdgCode
 
double gOptProbeKE
 
double gOptProbeKEmin
 
double gOptProbeKEmax
 
string gOptFlux
 
string gOptEvFilePrefix
 
bool gOptUsingFlux =false
 
long int gOptRanSeed
 
TH1D * gSpectrum = 0
 

Function Documentation

void BuildSpectrum ( void  )

Definition at line 323 of file gEvGenHadronNucleus.cxx.

324 {
325 // Create kinetic energy spectrum from input function
326 //
327 
328  if(!gOptUsingFlux) return;
329 
330  if(gSpectrum) {
331  delete gSpectrum;
332  gSpectrum = 0;
333  }
334 
335  LOG("gevgen_hadron", pNOTICE)
336  << "Generating a flux histogram ... ";
337 
338  int flux_bins = 300;
339  int flux_entries = 1000000;
340  double ke_min = gOptProbeKEmin;
341  double ke_max = gOptProbeKEmax;
342  double dke = ke_max - ke_min;
343  assert(dke>0 && ke_min>=0.);
344 
345  // kinetic energy spectrum
346  gSpectrum = new TH1D(
347  "spectrum","hadron kinetic energy spectrum", flux_bins, ke_min, ke_max);
348 
349  // check whether the input flux is a file or a functional form
350  bool input_is_file = ! gSystem->AccessPathName(gOptFlux.c_str());
351  if(input_is_file) {
352  Spline * input_flux = new Spline(gOptFlux.c_str());
353 
354  // generate the flux hisogram from the input flux file
355  int n = 100;
356  double ke_step = (ke_max-ke_min)/(n-1);
357  double ymax = -1, ry = -1, gy = -1, ke = -1;
358  for(int i=0; i<n; i++) {
359  ke = ke_min + i*ke_step;
360  ymax = TMath::Max(ymax, input_flux->Evaluate(ke));
361  }
362  ymax *= 1.3;
363 
364  RandomGen * r = RandomGen::Instance();
365 
366  for(int ientry=0; ientry<flux_entries; ientry++) {
367  bool accept = false;
368  unsigned int iter=0;
369  while(!accept) {
370  iter++;
371  if(iter > kRjMaxIterations) {
372  LOG("gevgen_hadron", pFATAL)
373  << "Couldn't generate a flux histogram";
374  gAbortingInErr = true;
375  exit(1);
376  }
377  ke = ke_min + dke * r->RndGen().Rndm();
378  gy = ymax * r->RndGen().Rndm();
379  ry = input_flux->Evaluate(ke);
380  accept = gy < ry;
381  if(accept) gSpectrum->Fill(ke);
382  }
383  }
384  delete input_flux;
385 
386  } else {
387  // generate the flux histogram from the input functional form
388  TF1 * input_func = new TF1("input_func", gOptFlux.c_str(), ke_min, ke_max);
389  gSpectrum->FillRandom("input_func", flux_entries);
390  delete input_func;
391  }
392  TFile f("./input-hadron-flux.root","recreate");
393  gSpectrum->Write();
394  f.Close();
395 }
double gOptProbeKEmax
A numeric analysis tool class for interpolating 1-D functions.
Definition: Spline.h:46
#define pFATAL
Definition: Messenger.h:56
TH1D * gSpectrum
double Evaluate(double x) const
Definition: Spline.cxx:361
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:29
bool gOptUsingFlux
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
std::void_t< T > n
string gOptFlux
TRandom3 & RndGen(void) const
rnd number generator for generic usage
Definition: RandomGen.h:80
double gOptProbeKEmin
#define pNOTICE
Definition: Messenger.h:61
static const unsigned int kRjMaxIterations
Definition: Controls.h:26
bool gAbortingInErr
Definition: Messenger.cxx:34
double GenProbeKineticEnergy ( void  )

Definition at line 317 of file gEvGenHadronNucleus.cxx.

318 {
319  if(gOptUsingFlux) return gSpectrum->GetRandom(); // spectrum
320  else return gOptProbeKE; // mono-energetic
321 }
TH1D * gSpectrum
bool gOptUsingFlux
double gOptProbeKE
void GetCommandLineArgs ( int  argc,
char **  argv 
)

Definition at line 397 of file gEvGenHadronNucleus.cxx.

398 {
399  LOG("gevgen_hadron", pINFO) << "Parsing command line arguments";
400 
401  // Common run options.
402  RunOpt::Instance()->ReadFromCommandLine(argc,argv);
403 
404  // Parse run options for this app
405 
406  CmdLnArgParser parser(argc,argv);
407 
408  // number of events
409  if( parser.OptionExists('n') ) {
410  LOG("gevgen_hadron", pINFO) << "Reading number of events to generate";
411  gOptNevents = parser.ArgAsInt('n');
412  } else {
413  LOG("gevgen_hadron", pINFO)
414  << "Unspecified number of events to generate - Using default";
416  }
417 
418  // run number
419  if( parser.OptionExists('r') ) {
420  LOG("gevgen_hadron", pINFO) << "Reading MC run number";
421  gOptRunNu = parser.ArgAsLong('r');
422  } else {
423  LOG("gevgen_hadron", pINFO) << "Unspecified run number - Using default";
425  }
426 
427  // incoming hadron PDG code
428  if( parser.OptionExists('p') ) {
429  LOG("gevgen_hadron", pINFO) << "Reading rescattering particle PDG code";
430  gOptProbePdgCode = parser.ArgAsInt('p');
431  } else {
432  LOG("gevgen_hadron", pFATAL) << "Unspecified PDG code - Exiting";
433  PrintSyntax();
434  gAbortingInErr = true;
435  exit(1);
436  }
437 
438  // target PDG code
439  if( parser.OptionExists('t') ) {
440  LOG("gevgen_hadron", pINFO) << "Reading target PDG code";
441  gOptTgtPdgCode = parser.ArgAsInt('t');
442  } else {
443  LOG("gevgen_hadron", pFATAL) << "Unspecified target PDG code - Exiting";
444  PrintSyntax();
445  gAbortingInErr = true;
446  exit(1);
447  }
448 
449  // target PDG code
450  if( parser.OptionExists('m') ) {
451  LOG("gevgen_hadron", pINFO) << "Reading mode";
452  gOptMode = parser.ArgAsString('m');
453  } else {
454  LOG("gevgen_hadron", pFATAL) << "Unspecified mode - Using default";
456  }
457 
458  // flux functional form or flux file
459  if( parser.OptionExists('f') ) {
460  LOG("gevgen_hadron", pINFO) << "Reading hadron's kinetic energy spectrum";
461  gOptFlux = parser.ArgAsString('f');
462  gOptUsingFlux = true;
463  }
464 
465  // incoming hadron kinetic energy (or kinetic energy range, if using flux)
466  if( parser.OptionExists('k') ) {
467  LOG("gevgen_hadron", pINFO) << "Reading probe kinetic energy";
468  string ke = parser.ArgAsString('k');
469  // is it just a value or a range (comma separated set of values)
470  if(ke.find(",") != string::npos) {
471  // split the comma separated list
472  vector<string> kerange = utils::str::Split(ke, ",");
473  assert(kerange.size() == 2);
474  double kemin = atof(kerange[0].c_str());
475  double kemax = atof(kerange[1].c_str());
476  assert(kemax>kemin && kemin>0);
477  gOptProbeKE = -1;
478  gOptProbeKEmin = kemin;
479  gOptProbeKEmax = kemax;
480  // if no flux was specified, generate uniformly within given range
481  if(!gOptUsingFlux) {
482  gOptFlux = "1";
483  gOptUsingFlux = true;
484  }
485  } else {
486  gOptProbeKE = atof(ke.c_str());
487  gOptProbeKEmin = -1;
488  gOptProbeKEmax = -1;
489  if(gOptUsingFlux) {
490  LOG("gevgen_hadron", pFATAL)
491  << "You specified an input flux without a kinetic energy range";
492  PrintSyntax();
493  gAbortingInErr = true;
494  exit(1);
495  }
496  }
497  } else {
498  LOG("gevgen_hadron", pFATAL) << "Unspecified kinetic energy - Exiting";
499  PrintSyntax();
500  gAbortingInErr = true;
501  exit(1);
502  }
503 
504  // event file prefix
505  if( parser.OptionExists('o') ) {
506  LOG("gevgen_hadron", pINFO) << "Reading the event filename prefix";
507  gOptEvFilePrefix = parser.ArgAsString('o');
508  } else {
509  LOG("gevgen_hadron", pDEBUG)
510  << "Will set the default event filename prefix";
512  } //-o
513 
514  // INTRANUKE mode
515  if( parser.OptionExists('m') ) {
516  LOG("gevgen_hadron", pINFO) << "Reading mode";
517  gOptMode = parser.ArgAsString('m');
518  } else {
519  LOG("gevgen_hadron", pDEBUG)
520  << "Unspecified mode - Using default";
522  }
523 
524  // random number seed
525  if( parser.OptionExists("seed") ) {
526  LOG("gevgen_hadron", pINFO) << "Reading random number seed";
527  gOptRanSeed = parser.ArgAsLong("seed");
528  } else {
529  LOG("gevgen_hadron", pINFO) << "Unspecified random number seed - Using default";
530  gOptRanSeed = -1;
531  }
532 
533 
534  LOG("gevgen_hadron", pNOTICE)
535  << "\n"
536  << utils::print::PrintFramedMesg("gevgen_hadron job configuration");
537 
538  LOG("gevgen_hadron", pNOTICE) << "MC Run Number = " << gOptRunNu;
539  LOG("gevgen_hadron", pNOTICE) << "Random number seed = " << gOptRanSeed;
540  LOG("gevgen_hadron", pNOTICE) << "Mode = " << gOptMode;
541  LOG("gevgen_hadron", pNOTICE) << "Number of events = " << gOptNevents;
542  LOG("gevgen_hadron", pNOTICE) << "Probe PDG code = " << gOptProbePdgCode;
543  LOG("gevgen_hadron", pNOTICE) << "Target PDG code = " << gOptTgtPdgCode;
544  if(gOptProbeKEmin<0 && gOptProbeKEmax<0) {
545  LOG("gevgen_hadron", pNOTICE)
546  << "Hadron input KE = " << gOptProbeKE;
547  } else {
548  LOG("gevgen_hadron", pNOTICE)
549  << "Hadron input KE range = ["
550  << gOptProbeKEmin << ", " << gOptProbeKEmax << "]";
551  }
552  if(gOptUsingFlux) {
553  LOG("gevgen_hadron", pNOTICE)
554  << "Input flux = "
555  << gOptFlux;
556  }
557 
558  LOG("gevgen_hadron", pNOTICE) << "\n";
559  LOG("gevgen_hadron", pNOTICE) << *RunOpt::Instance();
560 }
int gOptNevents
Long_t kDefOptRunNu
double gOptProbeKEmax
long int gOptRanSeed
Long_t gOptRunNu
#define pFATAL
Definition: Messenger.h:56
string kDefOptMode
int kDefOptNevents
bool gOptUsingFlux
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
void PrintSyntax(void)
#define pINFO
Definition: Messenger.h:62
int gOptProbePdgCode
string gOptFlux
string gOptMode
string gOptEvFilePrefix
vector< string > Split(string input, string delim)
Definition: StringUtils.cxx:36
string kDefOptEvFilePrefix
string PrintFramedMesg(string mesg, unsigned int nl=1, const char f='*')
Definition: PrintUtils.cxx:164
double gOptProbeKEmin
Command line argument parser.
#define pNOTICE
Definition: Messenger.h:61
double gOptProbeKE
bool gAbortingInErr
Definition: Messenger.cxx:34
#define pDEBUG
Definition: Messenger.h:63
int gOptTgtPdgCode
const EventRecordVisitorI * GetIntranuke ( void  )

Definition at line 235 of file gEvGenHadronNucleus.cxx.

236 {
237 // get the requested INTRANUKE module
238 
239  string sname = "";
240  string sconf = "";
241 
242  if ( gOptMode.compare("hA") == 0 ) {
243  sname = "genie::HAIntranuke";
244  sconf = "Default";
245  } else if ( gOptMode.compare("hN") == 0 ) {
246  sname = "genie::HNIntranuke";
247  sconf = "Default";
248  } else if ( gOptMode.compare("hA2019") == 0 ) {
249  sname = "genie::HAIntranuke2019";
250  sconf = "Default";
251  } else if ( gOptMode.compare("hN2019") == 0 ) {
252  sname = "genie::HNIntranuke2019";
253  sconf = "Default";
254  } else if ( gOptMode.compare("hA2018") == 0 ) {
255  sname = "genie::HAIntranuke2018";
256  sconf = "Default";
257  } else if ( gOptMode.compare("hN2018") == 0 ) {
258  sname = "genie::HNIntranuke2018";
259  sconf = "Default";
260 #ifdef __GENIE_INCL_ENABLED__
261  } else if ( gOptMode.compare("HINCL") == 0 ) {
262  sname = "genie::HINCLCascadeIntranuke";
263  sconf = "Default";
264 #endif
265 #ifdef __GENIE_GEANT4_INTERFACE_ENABLED__
266  } else if ( gOptMode.compare("HG4BertCasc") == 0 ) {
267  sname = "genie::HG4BertCascIntranuke";
268  sconf = "Default";
269 #endif
270  } else {
271  LOG("gevgen_hadron", pFATAL) << "Invalid Intranuke mode - Exiting";
272  gAbortingInErr = true;
273  exit(1);
274  }
275 
276  AlgFactory * algf = AlgFactory::Instance();
277  const EventRecordVisitorI * intranuke =
278  dynamic_cast<const EventRecordVisitorI *> (algf->GetAlgorithm(sname,sconf));
279  assert(intranuke);
280 
281  return intranuke;
282 }
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
#define pFATAL
Definition: Messenger.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
const Algorithm * GetAlgorithm(const AlgId &algid)
Definition: AlgFactory.cxx:75
string gOptMode
The GENIE Algorithm Factory.
Definition: AlgFactory.h:39
bool gAbortingInErr
Definition: Messenger.cxx:34
EventRecord * InitializeEvent ( void  )

Definition at line 284 of file gEvGenHadronNucleus.cxx.

285 {
286 // Initialize event record. Inserting the probe and target particles.
287 
288  EventRecord * evrec = new EventRecord();
290  evrec->AttachSummary(interaction);
291 
292  // dummy vertex position
293  TLorentzVector x4null(0.,0.,0.,0.);
294 
295  // incident hadron & target nucleon masses
296  PDGLibrary * pdglib = PDGLibrary::Instance();
297  double mh = pdglib -> Find (gOptProbePdgCode) -> Mass();
298  double M = pdglib -> Find (gOptTgtPdgCode ) -> Mass();
299 
300  // incident hadron kinetic energy
301  double ke = GenProbeKineticEnergy();
302 
303  // form incident hadron and target 4-momenta
304  double Eh = mh + ke;
305  double pzh = TMath::Sqrt(TMath::Max(0.,Eh*Eh-mh*mh));
306  TLorentzVector p4h (0.,0.,pzh,Eh);
307  TLorentzVector p4tgt (0.,0.,0., M);
308 
309  // insert probe and target entries
311  evrec->AddParticle(gOptProbePdgCode, ist, -1,-1,-1,-1, p4h, x4null);
312  evrec->AddParticle(gOptTgtPdgCode, ist, -1,-1,-1,-1, p4tgt, x4null);
313 
314  return evrec;
315 }
double GenProbeKineticEnergy(void)
double Mass(Resonance_t res)
resonance mass (GeV)
virtual void AttachSummary(Interaction *interaction)
Definition: GHepRecord.cxx:99
Summary information for an interaction.
Definition: Interaction.h:56
int gOptProbePdgCode
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
Singleton class to load & serve a TDatabasePDG.
Definition: PDGLibrary.h:32
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:491
enum genie::EGHepStatus GHepStatus_t
int gOptTgtPdgCode
int main ( int  argc,
char **  argv 
)

Definition at line 159 of file gEvGenHadronNucleus.cxx.

160 {
161  // Parse command line arguments
162  GetCommandLineArgs(argc,argv);
163 
164  if ( ! RunOpt::Instance()->Tune() ) {
165  LOG("gmkspl", pFATAL) << " No TuneId in RunOption";
166  exit(-1);
167  }
168  RunOpt::Instance()->BuildTune();
169 
170  // Init random number generator generator with user-specified seed number,
171  // set user-specified mesg thresholds, set user-specified GHEP print-level
172  utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
174  GHepRecord::SetPrintLevel(RunOpt::Instance()->EventRecordPrintLevel());
175 
176  // Build the incident hadron kinetic energy spectrum, if required
177  BuildSpectrum();
178 
179  LOG("gevgen_hadron",pNOTICE) << "finish setup";
180 
181  // Get the specified INTRANUKE model
182  const EventRecordVisitorI * intranuke = GetIntranuke();
183 
184  // Initialize an Ntuple Writer to save GHEP records into a ROOT tree
186  ntpw.CustomizeFilenamePrefix(gOptEvFilePrefix);
187  ntpw.Initialize();
188 
189  // Create an MC job monitor
190  GMCJMonitor mcjmonitor(gOptRunNu);
191 
192  LOG("gevgen_hadron",pNOTICE) << "ready to generate events";
193 
194  //
195  // Generate events
196  //
197 
198  int ievent = 0;
199  while (ievent < gOptNevents) {
200  LOG("gevgen_hadron", pNOTICE)
201  << " *** Generating event............ " << ievent;
202 
203  // initialize
204  EventRecord * evrec = InitializeEvent();
205 
206  // generate full h+A event
207  intranuke->ProcessEventRecord(evrec);
208 
209  // print generated events
210  LOG("gevgen_hadron", pNOTICE ) << *evrec;
211 
212  // add event at the output ntuple
213  ntpw.AddEventRecord(ievent, evrec);
214 
215  // refresh the mc job monitor
216  mcjmonitor.Update(ievent,evrec);
217 
218  ievent++;
219  delete evrec;
220 
221  } // end loop events
222 
223  // Save the generated MC events
224  ntpw.Save();
225 
226  // Clean-up
227  if(gSpectrum) {
228  delete gSpectrum;
229  gSpectrum = 0;
230  }
231 
232  return 0;
233 }
void RandGen(long int seed)
Definition: AppInit.cxx:30
int gOptNevents
void GetCommandLineArgs(int argc, char **argv)
virtual void ProcessEventRecord(GHepRecord *event_rec) const =0
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
long int gOptRanSeed
Long_t gOptRunNu
#define pFATAL
Definition: Messenger.h:56
TH1D * gSpectrum
EventRecord * InitializeEvent(void)
void BuildSpectrum(void)
Simple class to create & update MC job status files and env. vars. This is used to be able to keep tr...
Definition: GMCJMonitor.h:31
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
string gOptEvFilePrefix
A utility class to facilitate creating the GENIE MC Ntuple from the output GENIE GHEP event records...
Definition: NtpWriter.h:39
void MesgThresholds(string inpfile)
Definition: AppInit.cxx:99
#define pNOTICE
Definition: Messenger.h:61
const EventRecordVisitorI * GetIntranuke(void)
void PrintSyntax ( void  )

Definition at line 562 of file gEvGenHadronNucleus.cxx.

563 {
564  LOG("gevgen_hadron", pNOTICE)
565  << "\n\n"
566  << "Syntax:" << "\n"
567  << " gevgen_hadron [-r run] [-n nev] -p hadron_pdg -t tgt_pdg -k KE [-m mode] "
568  << " [-f flux] "
569  << " [--seed random_number_seed]"
570  << " [--message-thresholds xml_file]"
571  << " [--event-record-print-level level]"
572  << " [--mc-job-status-refresh-rate rate]"
573  << "\n";
574 }
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pNOTICE
Definition: Messenger.h:61

Variable Documentation

string gOptEvFilePrefix

Definition at line 152 of file gEvGenHadronNucleus.cxx.

string gOptFlux

Definition at line 151 of file gEvGenHadronNucleus.cxx.

string gOptMode

Definition at line 143 of file gEvGenHadronNucleus.cxx.

int gOptNevents

Definition at line 145 of file gEvGenHadronNucleus.cxx.

double gOptProbeKE

Definition at line 148 of file gEvGenHadronNucleus.cxx.

double gOptProbeKEmax

Definition at line 150 of file gEvGenHadronNucleus.cxx.

double gOptProbeKEmin

Definition at line 149 of file gEvGenHadronNucleus.cxx.

int gOptProbePdgCode

Definition at line 146 of file gEvGenHadronNucleus.cxx.

long int gOptRanSeed

Definition at line 154 of file gEvGenHadronNucleus.cxx.

Long_t gOptRunNu

Definition at line 144 of file gEvGenHadronNucleus.cxx.

int gOptTgtPdgCode

Definition at line 147 of file gEvGenHadronNucleus.cxx.

bool gOptUsingFlux =false

Definition at line 153 of file gEvGenHadronNucleus.cxx.

TH1D* gSpectrum = 0

Definition at line 156 of file gEvGenHadronNucleus.cxx.

string kDefOptEvFilePrefix = "gntp.inuke"

Definition at line 139 of file gEvGenHadronNucleus.cxx.

string kDefOptMode = "hA"

Definition at line 140 of file gEvGenHadronNucleus.cxx.

int kDefOptNevents = 10000

Definition at line 137 of file gEvGenHadronNucleus.cxx.

Long_t kDefOptRunNu = 0

Definition at line 138 of file gEvGenHadronNucleus.cxx.