HighLAND
ToyExperiment.hxx
1 #ifndef ToyExperiment_h
2 #define ToyExperiment_h
3 
4 #include "ToyVariations.hxx"
5 
6 /// The maximum number of toyVariations that is supported.
7 /// This is defined here because it is the lowest level Systematic class
8 const UInt_t NMAXSYSTEMATICS=100;
9 
10 /// A ToyExperiemnt is defined a set of ToyVariations, one for each of the toyVariations
11 /// It contains a vector of variations one for each systematic parameter
12 ///
13 
15 
16 public:
17 
18  /// Create the Toy experiment
19  ToyExperiment();
20 
21  /// Copy constructor
22  ToyExperiment(const ToyExperiment& toy);
23 
24  /// Everyone should have a destructor.
25  virtual ~ToyExperiment();
26 
27  /// Add a systematic, specifying the systematic index and number of systematic parameters
28  void AddToyVariation(Int_t index, UInt_t npar);
29 
30  /// returns the variations for a given systematic (index)
31  ToyVariations* GetToyVariations(UInt_t index) const{return _toyVariations[index];}
32 
33  /// Get the number of toyVariations in this toy
34  UInt_t GetNToyVariations() const{return _nToyVariations;}
35 
36  /// Get the number of parameters in this systematic
37  UInt_t GetNParameters(UInt_t index) const {return GetToyVariations(index)->GetNParameters();}
38 
39  /// Set the variation for a given systematic (index) and a given parameter (ipar) in that systematic
40  void SetToyVariation(UInt_t index, UInt_t ipar, Float_t var, Float_t weight=1.) {_toyVariations[index]->Variations[ipar] = var;_toyVariations[index]->Weights[ipar] = weight; }
41 
42  /// Set the variation for a given systematic (index) with a single parameter
43  void SetToyVariation(UInt_t index, Float_t var, Float_t weight=1.) {_toyVariations[index]->Variations[0] = var;_toyVariations[index]->Weights[0] = weight;}
44 
45 public:
46 
47  /// vector of variations (one for each Systematic)
48  ToyVariations* _toyVariations[NMAXSYSTEMATICS];
49 
50  /// Total number of toyVariations
52 };
53 
54 #endif
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
UInt_t GetNParameters() const
Number of parameters for this systematic.
Float_t * Weights
the vector of Weights, one for each of the systematic parameters
UInt_t GetNToyVariations() const
Get the number of toyVariations in this toy.
ToyVariations * _toyVariations[NMAXSYSTEMATICS]
vector of variations (one for each Systematic)
ToyExperiment()
Create the Toy experiment.
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...
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
UInt_t GetNParameters(UInt_t index) const
Get the number of parameters in this systematic.
UInt_t _nToyVariations
Total number of toyVariations.
void AddToyVariation(Int_t index, UInt_t npar)
Add a systematic, specifying the systematic index and number of systematic parameters.
virtual ~ToyExperiment()
Everyone should have a destructor.
void SetToyVariation(UInt_t index, Float_t var, Float_t weight=1.)
Set the variation for a given systematic (index) with a single parameter.