GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <c.andreopoulos \at cern.ch>
9  University of Liverpool
10 
11 \created May 25, 2005
12 
13 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _G_FLUX_I_H_
19 #define _G_FLUX_I_H_
20 
21 #include <TObject.h>
22 
23 class TLorentzVector;
24 
25 namespace genie {
26 
27 class PDGCodeList;
28 
29 class GFluxI {
30 
31 public :
32  virtual ~GFluxI();
33 
34  //
35  // define the GFluxI interface:
36  //
37  virtual const PDGCodeList & FluxParticles (void) = 0; ///< declare list of flux neutrinos that can be generated (for init. purposes)
38  virtual double MaxEnergy (void) = 0; ///< declare the max flux neutrino energy that can be generated (for init. purposes)
39  virtual bool GenerateNext (void) = 0; ///< generate the next flux neutrino (return false in err)
40  virtual int PdgCode (void) = 0; ///< returns the flux neutrino pdg code
41  virtual double Weight (void) = 0; ///< returns the flux neutrino weight (if any)
42  virtual const TLorentzVector & Momentum (void) = 0; ///< returns the flux neutrino 4-momentum
43  virtual const TLorentzVector & Position (void) = 0; ///< returns the flux neutrino 4-position (note: expect SI rather than physical units)
44  virtual bool End (void) = 0; ///< true if no more flux nu's can be thrown (eg reaching end of beam sim ntuples)
45  virtual long int Index (void) = 0; ///< returns corresponding index for current flux neutrino (e.g. for a flux ntuple returns the current entry number)
46  virtual void Clear (Option_t * opt ) = 0; ///< reset state variables based on opt
47  virtual void GenerateWeighted (bool gen_weighted) = 0; ///< set whether to generate weighted or unweighted neutrinos
48 
49 protected:
50  GFluxI();
51 };
52 
53 } // genie namespace
54 #endif // _G_FLUX_I_H_
virtual double MaxEnergy(void)=0
declare the max flux neutrino energy that can be generated (for init. purposes)
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:21
A list of PDG codes.
Definition: PDGCodeList.h:32
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:29