GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MECScaleVsW.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::MECScaleVsW
5 
6 \brief This class is responsible to compute the MEC scaling factor given
7  Q0, Q3. The scaling is done as a function of the hadronic invariant
8  mass.
9 
10 \author Code contributed by J.Tena Vidal and M.Roda
11 
12 \created June, 2020
13 
14 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
15  For the full text of the license visit http://copyright.genie-mc.org
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _MEC_SCALE_VS_W_H_
20 #define _MEC_SCALE_VS_W_H_
21 
23 #include <TSpline.h>
24 
25 namespace genie {
26 
27  class MECScaleVsW: public XSecScaleI {
28 
29  using weight_type_map = std::map<double,double> ;
30  using weight_type_pair = std::pair<double,double> ;
31 
32  public:
33  MECScaleVsW();
34  MECScaleVsW(string config);
35  virtual ~MECScaleVsW();
36 
37  // This function returns the scaling value at a given Q0 Q3:
38  virtual double GetScaling( const Interaction & ) const override ;
39 
40  protected:
41 
42  // Load algorithm configuration
43  virtual void LoadConfig (void) override ;
44 
45  // This function returns the scaling value at a given Q0 Q3:
46  virtual double GetScaling( const double Q0, const double Q3 ) const ;
47 
48  // This function adds the limits of the phase space if they are not set by the user
49  weight_type_map GetMapWithLimits( const double Q0, const double Q3 ) const ;
50 
51  // Thist function calculates the scale factor value at W as a linear interpolation
52  // between two W values (Wmin,Wmax) with weights (scale_min,scale_max).
53  virtual double ScaleFunction( const double W, const weight_type_pair min, const weight_type_pair max ) const ;
54 
55  private:
56  double fDefaultWeight ;
58  // Adding Spline to handle the limits of W1:
59  TSpline3 fW1_Q0Q3_limits ;
60 
61  double fLowLimitWeight ;
63 
64  };
65 
66 } // genie namespace
67 #endif // _MEC_SCALE_VS_W_H_
virtual void LoadConfig(void) override
This class is responsible to compute a scaling factor for the XSec.
Definition: XSecScaleI.h:25
This class is responsible to compute the MEC scaling factor given Q0, Q3. The scaling is done as a fu...
Definition: MECScaleVsW.h:27
virtual double GetScaling(const Interaction &) const override
Definition: MECScaleVsW.cxx:36
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
Summary information for an interaction.
Definition: Interaction.h:56
std::pair< double, double > weight_type_pair
Definition: MECScaleVsW.h:30
weight_type_map GetMapWithLimits(const double Q0, const double Q3) const
Definition: MECScaleVsW.cxx:77
std::map< double, double > weight_type_map
Definition: MECScaleVsW.h:29
virtual double ScaleFunction(const double W, const weight_type_pair min, const weight_type_pair max) const
Definition: MECScaleVsW.cxx:94
double fLowLimitWeight
Definition: MECScaleVsW.h:61
weight_type_map fWeightsMap
Definition: MECScaleVsW.h:57
double fUpperLimitWeight
Definition: MECScaleVsW.h:62
virtual ~MECScaleVsW()
Definition: MECScaleVsW.cxx:31
TSpline3 fW1_Q0Q3_limits
Definition: MECScaleVsW.h:59