GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CascadeReweight.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::CascadeReweight
5 
6 \brief In this module, the event weight is set depending on the FSI fate.
7  The weights are set depending on the xml configuration defined by the user
8 \author Julia Tena-Vidal <j.tena-vidal \at liverpool.ac.uk>
9 
10 \created July 2021
11 
12 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
13  For the full text of the license visit http://copyright.genie-mc.org
14 
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _CASCADE_REWEIGHT_H_
19 #define _CASCADE_REWEIGHT_H_
20 
23 
24 namespace genie {
25 
27 
28 public :
30  CascadeReweight(string config);
32 
33  // implement the EventRecordVisitorI interface
34  void ProcessEventRecord(GHepRecord * event_rec) const;
35 
36  // override the Algorithm::Configure methods to load configuration
37  // data to private data members
38  void Configure (const Registry & config);
39  void Configure (string param_set);
40  protected:
41  double GetEventWeight (const GHepRecord & ev) const; ///< get weight from fate and configuration
42 
43 private:
44  void LoadConfig (void); ///< read configuration from xml file
45 
46  static const std::map<INukeFateHN_t,string> & GetEINukeFateKeysMap( void ) {
47  static const std::map<INukeFateHN_t,string> map_keys { {kIHNFtNoInteraction,"NoInteraction"},{kIHNFtCEx,"CEx"}, {kIHNFtElas,"Elastic"}, {kIHNFtInelas,"Inelastic"},{kIHNFtAbs,"Abs"}, {kIHNFtCmp,"Cmp"} } ;
48  return map_keys ;
49  }
50 
51  // Class member
52  std::map< INukeFateHN_t, double > fDefaultMap ; // fate, weight
53  std::map< INukeFateHN_t, map<int,double> > fFateWeightsMap ; // < fate, <pdg,weight> >
54 
55 };
56 
57 } // genie namespace
58 #endif // _CASCADE_REWEIGHT_H_
void ProcessEventRecord(GHepRecord *event_rec) const
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
std::map< INukeFateHN_t, map< int, double > > fFateWeightsMap
void Configure(const Registry &config)
static const std::map< INukeFateHN_t, string > & GetEINukeFateKeysMap(void)
double GetEventWeight(const GHepRecord &ev) const
get weight from fate and configuration
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
In this module, the event weight is set depending on the FSI fate. The weights are set depending on t...
void LoadConfig(void)
read configuration from xml file
std::map< INukeFateHN_t, double > fDefaultMap
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45