HighLAND
ToyMaker.hxx
1 #ifndef ToyMaker_h
2 #define ToyMaker_h
3 
4 #include "ToyExperiment.hxx"
5 #include "SystematicBase.hxx"
6 
7 /// Creates the ToyExperiments with the proper variations for all systematic parameters
8 ///
9 
10 class ToyMaker{
11 
12 public:
13 
14  /// Create the Toy experiment
15  ToyMaker();
16 
17  /// Everyone should have a destructor.
18  virtual ~ToyMaker();
19 
20  //------------- MANDATORY METHOD -------------------------
21 
22  /// Fills the Toy Experiment with a given index
23  virtual void FillToyExperiment(ToyExperiment& toy) = 0;
24 
25  //--------------------------------------------------------
26 
27  /// Create the Toy Experiment, provided the number of toys,
28  // and the vector of enabled systematics
29  void CreateToyExperiments(Int_t ntoys, const std::vector<SystematicBase*>& systematicsEnabled);
30 
31  /// Add a SystematicBase
32  void AddSystematic(SystematicBase* sys);
33 
34  /// Returns the Toy experiment with a given index
35  ToyExperiment* GetToyExperiment(UInt_t index){return _toys[index];}
36 
37  /// Returns the Toy experiment vector
38  const std::vector<ToyExperiment*>& GetToyExperiments() const {return _toys;}
39 
40 protected:
41 
42  /// The vector of toys
43  std::vector<ToyExperiment*> _toys;
44 
45  /// The systematics that need to be considered
46  SystematicBase* _systematics[NMAXSYSTEMATICS];
47  int _nSystematics;
48 
49 };
50 
51 #endif
const std::vector< ToyExperiment * > & GetToyExperiments() const
Returns the Toy experiment vector.
Definition: ToyMaker.hxx:38
void AddSystematic(SystematicBase *sys)
Add a SystematicBase.
Definition: ToyMaker.cxx:26
std::vector< ToyExperiment * > _toys
The vector of toys.
Definition: ToyMaker.hxx:43
SystematicBase * _systematics[NMAXSYSTEMATICS]
The systematics that need to be considered.
Definition: ToyMaker.hxx:46
ToyMaker()
Create the Toy experiment.
Definition: ToyMaker.cxx:4
void CreateToyExperiments(Int_t ntoys, const std::vector< SystematicBase *> &systematicsEnabled)
Create the Toy Experiment, provided the number of toys,.
Definition: ToyMaker.cxx:34
virtual ~ToyMaker()
Everyone should have a destructor.
Definition: ToyMaker.cxx:16
ToyExperiment * GetToyExperiment(UInt_t index)
Returns the Toy experiment with a given index.
Definition: ToyMaker.hxx:35
virtual void FillToyExperiment(ToyExperiment &toy)=0
Fills the Toy Experiment with a given index.