GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
gMakeHEDISStrucFunc.cxx File Reference
#include "Framework/EventGen/XSecAlgorithmI.h"
#include "Framework/EventGen/InteractionList.h"
#include "Framework/EventGen/EventGeneratorI.h"
#include "Framework/EventGen/GEVGDriver.h"
#include "Framework/Utils/AppInit.h"
#include "Framework/Utils/RunOpt.h"
#include "Framework/Interaction/Interaction.h"
#include "Framework/Interaction/InitialState.h"
#include "Framework/Messenger/Messenger.h"
Include dependency graph for gMakeHEDISStrucFunc.cxx:

Go to the source code of this file.

Functions

void PrintSyntax (void)
 
int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 46 of file gMakeHEDISStrucFunc.cxx.

References genie::RunOpt::BuildTune(), genie::GEVGDriver::Configure(), genie::EventGeneratorI::CrossSectionAlg(), genie::GEVGDriver::FindGenerator(), genie::RunOpt::Instance(), genie::GEVGDriver::Interactions(), genie::kISkipKinematicChk, genie::kPSxQ2fE, LOG, genie::utils::app_init::MesgThresholds(), pFATAL, genie::RunOpt::ReadFromCommandLine(), genie::GEVGDriver::SetEventGeneratorList(), and genie::XSecAlgorithmI::XSec().

47 {
48 
49  RunOpt::Instance()->ReadFromCommandLine(argc,argv);
50 
51  if ( ! RunOpt::Instance()->Tune() ) {
52  LOG("gmkhedissf", pFATAL) << " No TuneId in RunOption";
53  exit(-1);
54  }
55  RunOpt::Instance()->BuildTune();
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 }//____________________________________________________________________________
Cross Section Calculation Interface.
const EventGeneratorI * FindGenerator(const Interaction *interaction) const
Definition: GEVGDriver.cxx:357
#define pFATAL
Definition: Messenger.h:56
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
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
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
Initial State information.
Definition: InitialState.h:48
void PrintSyntax ( void  )