All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultiExperiment.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <memory>
6 #include <vector>
7 
8 namespace ana
9 {
10  /// Combine multiple component experiments
12  {
13  public:
14  MultiExperiment(std::vector<const IExperiment*> expts = {}) : fExpts(expts)
15  {
16  fSystCorrelations.resize(expts.size());
17  }
18 
19  void Add(const IExperiment* expt){fExpts.push_back(expt);}
20 
21  virtual double ChiSq(osc::IOscCalcAdjustable* osc,
22  const SystShifts& syst = SystShifts::Nominal()) const override;
23 
24  /// For the subexperiment \a idx, set up a mapping between systematics
25  ///
26  /// Each element in the vector is a pair from a "primary" systematic to a
27  /// "secondary". When this MultiExperiment is called with a primary
28  /// systematic shifted, the sub-experiment will be called with the
29  /// secondary systematic set to the same value (and the primary unset).
30  ///
31  /// You can pass NULL for a secondary to indicate that the systematic
32  /// simply has no effect on the experiment in question and should be
33  /// filtered out.
34  void SetSystCorrelations(int idx,
35  const std::vector<std::pair<const ISyst*,
36  const ISyst*>>& corrs);
37 
38  virtual void SaveTo(TDirectory* dir) const override;
39  static std::unique_ptr<MultiExperiment> LoadFrom(TDirectory* dir);
40 
41  protected:
42  std::vector<const IExperiment*> fExpts;
43 
44  std::vector<std::vector<std::pair<const ISyst*, const ISyst*>>> fSystCorrelations;
45  };
46 }
std::vector< const IExperiment * > fExpts
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:16
process_name opflashCryoW ana
static SystShifts Nominal()
Definition: SystShifts.h:23
static std::unique_ptr< MultiExperiment > LoadFrom(TDirectory *dir)
Encapsulate code to systematically shift a caf::StandardRecord.
Definition: ISyst.h:14
void Add(const IExperiment *expt)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< std::vector< std::pair< const ISyst *, const ISyst * > > > fSystCorrelations
tuple dir
Definition: dropbox.py:28
Combine multiple component experiments.
Base class defining interface for experiments.
Definition: IExperiment.h:21
virtual void SaveTo(TDirectory *dir) const override
MultiExperiment(std::vector< const IExperiment * > expts={})
void SetSystCorrelations(int idx, const std::vector< std::pair< const ISyst *, const ISyst * >> &corrs)
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override