HighLAND
ZeroToyMaker.cxx
1 #include "ZeroToyMaker.hxx"
2 #include "Parameters.hxx"
3 
4 //******************************************************************
6 //******************************************************************
7 }
8 
9 //******************************************************************
11 //******************************************************************
12 
13  // Set the same weight (1) for al toys. This will be later normalized to the number of toys
14  Float_t weight = 1.;
15 
16 
17  for (UInt_t isyst = 0; isyst<NMAXSYSTEMATICS;isyst++){
18  SystematicBase* syst = _systematics[isyst];
19  if (!syst) continue;
20 
21  // Create the proper structure for the ToyExperiment adding each of the systematics
22  toy.AddToyVariation(syst->GetIndex(), syst->GetNParameters());
23 
24  // Loop over parameters for this systematic
25  for (UInt_t ipar = 0;ipar<syst->GetNParameters();ipar++){
26  Float_t var = 0;
27  toy.SetToyVariation(isyst,ipar,var,weight);
28  }
29  }
30 }
31 
Int_t GetIndex() const
Return the index of this systematic.
ZeroToyMaker()
Create the Toy experiment.
Definition: ZeroToyMaker.cxx:5
SystematicBase * _systematics[NMAXSYSTEMATICS]
The systematics that need to be considered.
Definition: ToyMaker.hxx:46
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.