GFlavorMixerI.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::flux::GFlavorMixerI
5 
6 \brief GENIE interface for flavor modification
7 
8  Specific implementations of this class when used in conjuction
9  with the genie::flux::GFluxBlender class allow it to act as
10  an intermediate between a concrete flux generator and the
11  genie::GMCJDriver class. Using this adapter allows one to
12  apply neutrino flavor changes using different models without
13  modifying either the concrete flux generator or GMCJDriver.
14 
15  Concrete instances of this interface must be configurable
16  from a string, and provide a means of calculating the
17  transition probability from one flavor to any of the PDG
18  codes { 0, 12, 14, 16, -12, -14, -16 } where 0 represents
19  the complete disappearance (decay, sterile, ...).
20 
21  Probability is expected to be normalized (that is, the sum
22  of all possible outcomes, including 0, must be 1).
23 
24 \author Robert Hatcher <rhatcher \at fnal.gov>
25  Fermi National Accelerator Laboratory
26 
27 \created 2010-10-31
28 
29 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
30  for the full text of the license visit http://copyright.genie-mc.org
31 */
32 //____________________________________________________________________________
33 
34 #ifndef GENIE_FLUX_GFLAVORMIXERI_H
35 #define GENIE_FLUX_GFLAVORMIXERI_H
36 
37 #include <string>
38 
39 namespace genie {
40 namespace flux {
41 
42  class GFlavorMixerI {
43 
44  public:
45 
46  GFlavorMixerI();
47  virtual ~GFlavorMixerI();
48 
49  //
50  // define the GFlavorMixerI interface:
51  //
52 
53  /// each schema must take a string that configures it
54  /// it is up to the individual model to parse said string
55  /// and extract parameters (e.g. sin2th23, deltam12, etc)
56  virtual void Config(std::string config) = 0;
57 
58  /// for any pair of PDG codes the model must calculate
59  /// the transition probability. This can also depend on
60  /// neutrino energy (in GeV) and distance (in meters) from
61  /// the neutrino origin.
62  virtual double Probability(int pdg_initial, int pdg_final,
63  double energy, double dist) = 0;
64 
65  /// provide a means of printing the configuration
66  virtual void PrintConfig(bool verbose=true) = 0;
67 
68  };
69 
70 } // namespace flux
71 } // namespace genie
72 
73 #endif //GENIE_FLUX_GFLAVORMIXERI_H
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
std::string string
Definition: nybbler.cc:12
virtual double Probability(int pdg_initial, int pdg_final, double energy, double dist)=0
static Config * config
Definition: config.cpp:1054
GENIE interface for flavor modification.
Definition: GFlavorMixerI.h:42
virtual void Config(std::string config)=0
verbose
Definition: train.py:477
virtual void PrintConfig(bool verbose=true)=0
provide a means of printing the configuration
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)