This class is responsible to compute the MEC scaling factor given Q0, Q3. The scaling is done as a function of the hadronic invariant mass.
More...
|
virtual void | LoadConfig (void) override |
|
virtual double | GetScaling (const double Q0, const double Q3) const |
|
weight_type_map | GetMapWithLimits (const double Q0, const double Q3) const |
|
virtual double | ScaleFunction (const double W, const weight_type_pair min, const weight_type_pair max) const |
|
| XSecScaleI (string name, string config="Default") |
|
void | Configure (const Registry &config) override |
|
virtual void | Configure (string config) override |
|
| Algorithm () |
|
| Algorithm (string name) |
|
| Algorithm (string name, string config) |
|
void | Initialize (void) |
|
void | DeleteConfig (void) |
|
void | DeleteSubstructure (void) |
|
Registry * | ExtractLocalConfig (const Registry &in) const |
|
Registry * | ExtractLowerConfig (const Registry &in, const string &alg_key) const |
| Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key. More...
|
|
template<class T > |
bool | GetParam (const RgKey &name, T &p, bool is_top_call=true) const |
|
template<class T > |
bool | GetParamDef (const RgKey &name, T &p, const T &def) const |
|
template<class T > |
int | GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const |
| Handle to load vectors of parameters. More...
|
|
int | GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const |
|
template<class T > |
int | GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const |
| Handle to load matrix of parameters. More...
|
|
template<class T > |
int | GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const |
|
int | GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const |
|
int | AddTopRegistry (Registry *rp, bool owns=true) |
| add registry with top priority, also update ownership More...
|
|
int | AddLowRegistry (Registry *rp, bool owns=true) |
| add registry with lowest priority, also update ownership More...
|
|
int | MergeTopRegistry (const Registry &r) |
|
int | AddTopRegisties (const vector< Registry * > &rs, bool owns=false) |
| Add registries with top priority, also udated Ownerships. More...
|
|
This class is responsible to compute the MEC scaling factor given Q0, Q3. The scaling is done as a function of the hadronic invariant mass.
- Author
- Code contributed by J.Tena Vidal and M.Roda
- Created:
- June, 2020
- License:
- Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 27 of file MECScaleVsW.h.
void MECScaleVsW::LoadConfig |
( |
void |
| ) |
|
|
overrideprotectedvirtual |
Implements genie::XSecScaleI.
Definition at line 103 of file MECScaleVsW.cxx.
References fDefaultWeight, fLowLimitWeight, fUpperLimitWeight, fW1_Q0Q3_limits, fWeightsMap, genie::Algorithm::GetConfig(), genie::Algorithm::GetParam(), genie::Algorithm::GetParamDef(), genie::Algorithm::GetParamVect(), LOG, and pERROR.
105 bool good_config = true ;
109 if(
GetConfig().Exists(
"MECScaleVsW-Default-Weight") ) {
112 good_config = false ;
113 LOG(
"MECScaleVsW",
pERROR) <<
"Default weight is not specified." ;
116 std::vector<double> Weights, WValues ;
120 if( Weights.size() != WValues.size() ) {
121 good_config = false ;
122 LOG(
"MECScaleVsW",
pERROR) <<
"Entries don't match" ;
123 LOG(
"MECScaleVsW",
pERROR) <<
"Weights size: " << Weights.size() ;
124 LOG(
"MECScaleVsW",
pERROR) <<
"WValues size: " << WValues.size() ;
128 for(
unsigned int i = 0 ; i<Weights.size() ; ++i ) {
132 std::vector<double> limit_Q0, limit_Q3 ;
133 if(
GetParamVect(
"MECScaleVsW-LowerLimitQ0", limit_Q0 ) == 0 ) {
134 good_config = false ;
135 LOG(
"MECScaleVsW",
pERROR) <<
"MECScaleVsW-LowerLimitQ0 is empty" ;
138 if(
GetParamVect(
"MECScaleVsW-LowerLimitQ3", limit_Q3 ) == 0 ) {
139 good_config = false ;
140 LOG(
"MECScaleVsW",
pERROR) <<
"MECScaleVsW-LowerLimitQ3 is empty" ;
143 if( limit_Q0.size() != limit_Q3.size() ) {
144 good_config = false ;
145 LOG(
"MECScaleVsW",
pERROR) <<
"Entries don't match" ;
146 LOG(
"MECScaleVsW",
pERROR) <<
"Lower limit for Q0 size: " << limit_Q0.size() ;
147 LOG(
"MECScaleVsW",
pERROR) <<
"Lower limit for Q3 size: " << limit_Q3.size() ;
153 if( ! good_config ) {
154 LOG(
"MECScaleVsW",
pERROR) <<
"Configuration has failed.";
158 fW1_Q0Q3_limits = TSpline3(
"fW1_Q0Q3_limits",limit_Q3.data(),limit_Q0.data(),limit_Q3.size());
int GetParamVect(const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
Handle to load vectors of parameters.
virtual const Registry & GetConfig(void) const
std::pair< double, double > weight_type_pair
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
weight_type_map fWeightsMap
bool GetParamDef(const RgKey &name, T &p, const T &def) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const