GFluxGenerator.h
Go to the documentation of this file.
1 #ifndef GENERATOR__H
2 #define GENERATOR__H
3 
4 // C++ includes
5 #include <vector>
6 
7 // NOvASoft includes
10 #include "GenieSNova/src/Sampler.h"
11 
12 class TH2;
13 
14 namespace genie {
15  namespace supernova {
16 
17  class GFluxGenerator: public GeneratorBase {
18  public:
19  GFluxGenerator(int pdg, TH2* hist);
20 
21  void GenerateNext();
22  void FillParticle(GenParticle& particle);
23 
24  void Reload();
25  void SetProbScale(double scale);
26  void SetEmin(double Emin);
27  bool End();
28 
29  int PDG() const;
30  double T() const;
31  double E() const;
32 
33  // Getters for samplers
34  const OrderedSampler& GetSamplerT() const;
35  const RandomSampler& GetSamplerE(size_t i) const;
36 
37  protected:
39  std::vector<RandomSampler> fESamplers;
40 
41  int fPdg; /// PDG code
42  double fT; /// Time
43  double fE; /// Energy
44  double fEmin=10; /// Min energy (MeV)
45  };
46 
47  } // end of namespace supernova
48 } // end of namespace genie
49 #endif
const OrderedSampler & GetSamplerT() const
const RandomSampler & GetSamplerE(size_t i) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
GFluxGenerator(int pdg, TH2 *hist)
Double_t scale
Definition: plot.C:25
std::vector< RandomSampler > fESamplers
void FillParticle(GenParticle &particle)
An ART module for generating supernova events via GENIE.