1 #ifndef _SBN_EVENTWEIGHTPARAMETERSET_H_
2 #define _SBN_EVENTWEIGHTPARAMETERSET_H_
9 namespace CLHEP {
class HepRandomEngine; }
103 void Configure(std::string
name, std::string rwtype_string,
size_t nuni=1);
114 void AddParameter(std::string
name, std::vector<float> widths,
float mean=0,
size_t covIndex=0);
140 void Sample(CLHEP::HepRandomEngine& engine);
153 #endif // _SBN_EVENTWEIGHTPARAMETERSET_H_
void AddParameter(std::string name, float width, float mean=0, size_t covIndex=0)
float fMean
Gaussian mean.
float fWidth
Gaussian sigma.
std::string fName
Parameter name.
enum sbn::evwgh::EventWeightParameterSet::rwtype ReweightType
EventWeightParameter(std::string name, float mean, float width, size_t covIndex=0)
EventWeightParameterSet()
void Configure(std::string name, ReweightType rwtype, size_t nuni=1)
TMatrixD * fCovarianceMatrix
Covariance matrix for correlated throws (optional)
EventWeightParameter(std::string name, float mean, std::vector< float > widths, size_t covIndex=0)
void SetCovarianceMatrix(TMatrixD *cov)
ReweightType fRWType
Type of throws (the same for all parameters in a set)
size_t fCovIndex
Index in the covariance matrix (if any)
A single parameter to be reweighted.
Container for a set of reweightable parameters.
void Sample(CLHEP::HepRandomEngine &engine)
std::map< EventWeightParameter, std::vector< float > > fParameterMap
Mapping of definitions to the set of values.
size_t fNuniverses
Number of universes (i.e. random throws)
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
std::string fName
Name of the parameter set.
std::vector< float > fWidths
for multi sigma modes
friend bool operator==(const EventWeightParameterSet &lhs, const EventWeightParameterSet &rhs)
friend bool operator==(const EventWeightParameter &lhs, const EventWeightParameter &rhs)
friend bool operator<(const EventWeightParameter &lhs, const EventWeightParameter &rhs)