All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbncode/sbncode/SBNEventWeight/Base/WeightCalc.h
Go to the documentation of this file.
1 #ifndef _SBN_WEIGHTCALC_H_
2 #define _SBN_WEIGHTCALC_H_
3 
4 // Adapted from LArSoft's larsim EventWeight
5 
6 #include <cassert>
7 #include <string>
8 #include <map>
9 #include <vector>
10 #include "art/Framework/Principal/fwd.h"
11 #include "TMatrixD.h"
12 #include "CLHEP/Random/RandGaussQ.h"
14 
15 namespace fhicl { class ParameterSet; }
16 
17 namespace CLHEP { class HepRandomEngine; }
18 
19 namespace sbn {
20  namespace evwgh {
21 
22 class WeightCalc {
23 public:
24  virtual void Configure(fhicl::ParameterSet const& pset,
25  CLHEP::HepRandomEngine&) = 0;
26 
27  virtual std::vector<float> GetWeight(art::Event& e, size_t inu) = 0;
28 
29  void SetName(std::string name) { fName = name; }
30  void SetType(std::string type) { fType = type; }
31 
32  std::string GetName() { return fName; }
33  std::string GetType() { return fType; }
34  std::string GetFullName() { return fName + "_" + fType; }
35 
37 
38 private:
39  std::string fName;
40  std::string fType;
41 };
42 
43  } // namespace evwgh
44 } // namespace sbn
45 
46 #endif // _SBN_WEIGHTCALC_H_
47 
virtual std::vector< float > GetWeight(art::Event &e, size_t inu)=0
Container for a set of reweightable parameters.
do i e
then echo fcl name
virtual void Configure(fhicl::ParameterSet const &pset, CLHEP::HepRandomEngine &)=0