LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
WeightCalc.h
Go to the documentation of this file.
1 #ifndef _WEIGHTCALC_H_
2 #define _WEIGHTCALC_H_
5 
7 #include "CLHEP/Random/RandomEngine.h"
8 #include "CLHEP/Random/RandGaussQ.h"
9 
10 #include "TMatrixD.h"
11 #include <string>
12 #include <map>
13 
14 //weight calc base
15 namespace evwgh {
16  typedef std::map<std::string, std::vector<double> > WeightMap_t;
17 
18  class WeightCalc
19  {
20  public:
21  virtual void Configure(fhicl::ParameterSet const& pset) = 0;
22  virtual std::vector<std::vector<double> > GetWeight(art::Event & e) = 0;
23  void SetName(std::string name) {fName=name;}
24  std::string GetName() {return fName;}
25 
36  static std::vector<std::vector<double> > MultiGaussianSmearing(
37  std::vector<double> const& centralValues,
38  std::vector< std::vector<double>> const& inputCovarianceMatrix,
39  int n_multisims, CLHEP::RandGaussQ& GaussRandom);
40 
41  static std::vector<double> MultiGaussianSmearing(
42  std::vector<double> const& centralValue,
43  TMatrixD* const& inputCovarianceMatrix,
44  std::vector<double> rand);
45 
46  static std::vector<double> MultiGaussianSmearing(
47  std::vector<double> const& centralValue,
48  TMatrixD* const& LowerTriangleCovarianceMatrix,
49  bool isDecomposed,
50  std::vector<double> rand);
51 
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:16
std::string GetName()
Definition: WeightCalc.h:24
static std::vector< std::vector< double > > MultiGaussianSmearing(std::vector< double > const &centralValues, std::vector< std::vector< double >> const &inputCovarianceMatrix, int n_multisims, CLHEP::RandGaussQ &GaussRandom)
Applies Gaussian smearing to a set of data.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
void SetName(std::string name)
Definition: WeightCalc.h:23
std::string fName
Definition: WeightCalc.h:54
virtual void Configure(fhicl::ParameterSet const &pset)=0
Float_t e
Definition: plot.C:34
virtual std::vector< std::vector< double > > GetWeight(art::Event &e)=0