gMakeHEDISStrucFunc.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 \program gmkspl
4 \brief GENIE utility program building Structure Functions needed for HEDIS
5  package.
6  Syntax :
7  gmksf [-h]
8  --tune genie_tune
9  [--message-thresholds xml_file]
10  Note :
11  [] marks optional arguments.
12  <> marks a list of arguments out of which only one can be
13  selected at any given time.
14  Options :
15  --tune
16  Specifies a GENIE comprehensive neutrino interaction model tune.
17  --message-thresholds
18  Allows users to customize the message stream thresholds.
19  The thresholds are specified using an XML file.
20  See $GENIE/config/Messenger.xml for the XML schema.
21  *** See the User Manual for more details and examples. ***
22 \author Alfonso Garcia <alfonsog \at nikhef.nl>
23  NIKHEF (Amsterdam)
24 \created July 8, 2019
25 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
26  For the full text of the license visit http://copyright.genie-mc.org
27  or see $GENIE/LICENSE
28 */
29 //____________________________________________________________________________
30 
36 #include "Framework/Utils/RunOpt.h"
40 
41 using namespace genie;
42 
43 void PrintSyntax (void);
44 
45 //____________________________________________________________________________
46 int main(int argc, char ** argv)
47 {
48 
50 
51  if ( ! RunOpt::Instance()->Tune() ) {
52  LOG("gmkhedissf", pFATAL) << " No TuneId in RunOption";
53  exit(-1);
54  }
56 
57  utils::app_init::MesgThresholds(RunOpt::Instance()->MesgThresholdFiles());
58 
59  GEVGDriver evg_driver;
60  InitialState init_state(1000010020, 14);
61  evg_driver.SetEventGeneratorList("CCHEDIS");
62  evg_driver.Configure(init_state);
63 
64  const InteractionList * intlst = evg_driver.Interactions();
65  InteractionList::const_iterator intliter = intlst->begin();
66  Interaction * interaction = *intliter;
67  const XSecAlgorithmI * xsec_alg = evg_driver.FindGenerator(interaction)->CrossSectionAlg();
68  interaction->SetBit(kISkipKinematicChk);
69  xsec_alg->XSec(interaction, kPSxQ2fE);
70 
71 }//____________________________________________________________________________
72 void PrintSyntax(void)
73 {
74  LOG("gmkhedissf", pNOTICE)
75  << "\n\n" << "Syntax:" << "\n"
76  << "\n gmkhedissf [-h]"
77  << "\n --tune genie_tune"
78  << "\n --message-thresholds xml_file"
79  << "\n";
80 }
Cross Section Calculation Interface.
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
const EventGeneratorI * FindGenerator(const Interaction *interaction) const
Definition: GEVGDriver.cxx:357
void ReadFromCommandLine(int argc, char **argv)
Definition: RunOpt.cxx:99
#define pFATAL
Definition: Messenger.h:56
intermediate_table::const_iterator const_iterator
Summary information for an interaction.
Definition: Interaction.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
void SetEventGeneratorList(string listname)
Definition: GEVGDriver.cxx:348
const InteractionList * Interactions(void) const
Definition: GEVGDriver.cxx:334
GENIE Event Generation Driver. A minimalist user interface object for generating neutrino interaction...
Definition: GEVGDriver.h:54
void BuildTune()
build tune and inform XSecSplineList
Definition: RunOpt.cxx:92
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
void PrintSyntax(void)
static RunOpt * Instance(void)
Definition: RunOpt.cxx:54
int main(int argc, char **argv)
void Configure(int nu_pdgc, int Z, int A)
Definition: GEVGDriver.cxx:137
A vector of Interaction objects.
void MesgThresholds(string inpfile)
Definition: AppInit.cxx:99
#define pNOTICE
Definition: Messenger.h:61
Initial State information.
Definition: InitialState.h:48