GFluxI.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::GFluxI
5 
6 \brief GENIE Interface for user-defined flux classes
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created May 25, 2005
12 
13 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 
17  @ Feb 22, 2011 - JD
18  Changed the interface by adding the GFluxI::Clear, GFluxI::Index and
19  GFluxI::GenerateWeighted methods needed so that can be used with the new
20  pre-generation of flux interaction probabilities functionality added to
21  GMCJDriver.
22 
23 */
24 //____________________________________________________________________________
25 
26 #ifndef _G_FLUX_I_H_
27 #define _G_FLUX_I_H_
28 
29 #include <TObject.h>
30 
31 class TLorentzVector;
32 
33 namespace genie {
34 
35 class PDGCodeList;
36 
37 class GFluxI {
38 
39 public :
40  virtual ~GFluxI();
41 
42  //
43  // define the GFluxI interface:
44  //
45  virtual const PDGCodeList & FluxParticles (void) = 0; ///< declare list of flux neutrinos that can be generated (for init. purposes)
46  virtual double MaxEnergy (void) = 0; ///< declare the max flux neutrino energy that can be generated (for init. purposes)
47  virtual bool GenerateNext (void) = 0; ///< generate the next flux neutrino (return false in err)
48  virtual int PdgCode (void) = 0; ///< returns the flux neutrino pdg code
49  virtual double Weight (void) = 0; ///< returns the flux neutrino weight (if any)
50  virtual const TLorentzVector & Momentum (void) = 0; ///< returns the flux neutrino 4-momentum
51  virtual const TLorentzVector & Position (void) = 0; ///< returns the flux neutrino 4-position (note: expect SI rather than physical units)
52  virtual bool End (void) = 0; ///< true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
53  virtual long int Index (void) = 0; ///< returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
54  virtual void Clear (Option_t * opt ) = 0; ///< reset state variables based on opt
55  virtual void GenerateWeighted (bool gen_weighted) = 0; ///< set whether to generate weighted or unweighted neutrinos
56 
57 protected:
58  GFluxI();
59 };
60 
61 } // genie namespace
62 #endif // _G_FLUX_I_H_
virtual double MaxEnergy(void)=0
declare the max flux neutrino energy that can be generated (for init. purposes)
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
virtual const TLorentzVector & Position(void)=0
returns the flux neutrino 4-position (note: expect SI rather than physical units) ...
virtual void GenerateWeighted(bool gen_weighted)=0
set whether to generate weighted or unweighted neutrinos
virtual ~GFluxI()
Definition: GFluxI.cxx:27
A list of PDG codes.
Definition: PDGCodeList.h:33
virtual long int Index(void)=0
returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current ent...
virtual void Clear(Option_t *opt)=0
reset state variables based on opt
virtual bool GenerateNext(void)=0
generate the next flux neutrino (return false in err)
virtual const PDGCodeList & FluxParticles(void)=0
declare list of flux neutrinos that can be generated (for init. purposes)
virtual int PdgCode(void)=0
returns the flux neutrino pdg code
virtual const TLorentzVector & Momentum(void)=0
returns the flux neutrino 4-momentum
virtual bool End(void)=0
true if no more flux nu&#39;s can be thrown (eg reaching end of beam sim ntuples)
virtual double Weight(void)=0
returns the flux neutrino weight (if any)
GENIE Interface for user-defined flux classes.
Definition: GFluxI.h:37