1 #include "baseToyMaker.hxx" 2 #include "Parameters.hxx" 14 _individualRandomGenerator = (bool) (ND::params().
GetParameterI(
"baseAnalysis.Systematics.IndividualRandomGenerator"));
16 if (_individualRandomGenerator){
17 for (UInt_t isyst = 0; isyst<NMAXSYSTEMATICS;isyst++){
21 _seeds[isyst] = syst->
GetIndex() + seed*NMAXSYSTEMATICS;
22 _RandomGenerators[isyst].SetSeed(_seeds[isyst]);
41 for (UInt_t isyst = 0; isyst<NMAXSYSTEMATICS;isyst++){
53 if (_individualRandomGenerator){
54 if (syst->
PDF() == SystematicBase::kUniform) var = _RandomGenerators[isyst].Uniform(0.,1.);
55 else if (syst->
PDF() == SystematicBase::kGaussian) var = _RandomGenerators[isyst].Gaus(0.,1.);
Int_t GetIndex() const
Return the index of this systematic.
bool _zero_var
Apply 0 variation.
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
TRandom3 _RandomGenerator
A random generator that can be used to generate throws.
This class defines a symmetric binned gaussian.
baseToyMaker(UInt_t seed, bool zero_var=false)
Create the Toy experiment.
UInt_t _seed
The random seed used.
PDFEnum PDF() const
Return the PDF of this systematic.
SystematicBase * _systematics[NMAXSYSTEMATICS]
The systematics that need to be considered.
void SetToyVariation(UInt_t index, UInt_t ipar, Float_t var, Float_t weight=1.)
Set the variation for a given systematic (index) and a given parameter (ipar) in that systematic...
void FillToyExperiment(ToyExperiment &toy)
Fills the Toy Experiment with a given index.
void AddToyVariation(Int_t index, UInt_t npar)
Add a systematic, specifying the systematic index and number of systematic parameters.
UInt_t GetNParameters() const
Returns the number of systematic parameters associated to this systematic.