LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
WeightCalc.h
Go to the documentation of this file.
1 #ifndef _WEIGHTCALC_H_
2 #define _WEIGHTCALC_H_
3 
5 namespace fhicl {
6  class ParameterSet;
7 }
8 namespace CLHEP {
9  class HepRandomEngine;
10  class RandGaussQ;
11 }
12 
13 #include "TMatrixD.h"
14 #include <map>
15 #include <string>
16 
17 //weight calc base
18 namespace evwgh {
19  typedef std::map<std::string, std::vector<double>> WeightMap_t;
20 
21  class WeightCalc {
22  public:
23  virtual void Configure(fhicl::ParameterSet const& pset, CLHEP::HepRandomEngine&) = 0;
24  virtual std::vector<std::vector<double>> GetWeight(art::Event& e) = 0;
25  void SetName(std::string name) { fName = name; }
26  std::string GetName() { return fName; }
27 
38  static std::vector<std::vector<double>> MultiGaussianSmearing(
39  std::vector<double> const& centralValues,
40  std::vector<std::vector<double>> const& inputCovarianceMatrix,
41  int n_multisims,
42  CLHEP::RandGaussQ& GaussRandom);
43 
44  static std::vector<double> MultiGaussianSmearing(std::vector<double> const& centralValue,
45  TMatrixD* const& inputCovarianceMatrix,
46  std::vector<double> rand);
47 
48  static std::vector<double> MultiGaussianSmearing(std::vector<double> const& centralValue,
49  TMatrixD* const& LowerTriangleCovarianceMatrix,
50  bool isDecomposed,
51  std::vector<double> rand);
52 
53  private:
54  std::string fName;
55  };
56 
57 }
58 
59 #endif // _WEIGHTCALC_H_
std::map< std::string, std::vector< double > > WeightMap_t
Definition: WeightCalc.h:19
std::string GetName()
Definition: WeightCalc.h:26
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
parameter set interface
void SetName(std::string name)
Definition: WeightCalc.h:25
std::string fName
Definition: WeightCalc.h:54
Float_t e
Definition: plot.C:35