All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UniverseOracle.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <map>
6 #include <string>
7 #include <vector>
8 
9 namespace ana
10 {
11  /// Desired match type in UniverseOracle::ClosestShiftIndex
12  enum class ESide{
14  };
15 
17  {
18  public:
19  static UniverseOracle& Instance();
20 
21  bool SystExists(const std::string& name) const;
22  /// List of all known syst names
23  std::vector<std::string> Systs() const;
24 
25  /// List of shifts for this syst in each universe
26  const std::vector<float>& ShiftsForSyst(const std::string& name) const;
27 
28  /// Which index in the weights array corresponds to this parameter set?
29  unsigned int ParameterSetIndex(const std::string& name) const;
30 
31  /// Which index in the weights array corresponds to the shifting of just this syst (in any parameter set)?
32  unsigned int SystIndex(const std::string& name) const;
33 
34  /// Within that entry, which index corresponds most closely to 'shift'?
35  unsigned int ClosestShiftIndex(const std::string& name,
36  double shift,
37  ESide side = ESide::kEither,
38  double* trueShift = 0) const;
39  protected:
41 
42  std::map<std::string, unsigned int> fPSetIdxs;
43  std::map<std::string, unsigned int> fSystIdxs;
44  std::map<std::string, std::vector<float>> fShiftVals;
45  };
46 }
unsigned int SystIndex(const std::string &name) const
Which index in the weights array corresponds to the shifting of just this syst (in any parameter set)...
std::map< std::string, unsigned int > fSystIdxs
const std::vector< float > & ShiftsForSyst(const std::string &name) const
List of shifts for this syst in each universe.
ESide
Desired match type in UniverseOracle::ClosestShiftIndex.
process_name opflashCryoW ana
shift
Definition: fcl_checks.sh:26
static UniverseOracle & Instance()
std::map< std::string, std::vector< float > > fShiftVals
std::vector< std::string > Systs() const
List of all known syst names.
std::map< std::string, unsigned int > fPSetIdxs
unsigned int ParameterSetIndex(const std::string &name) const
Which index in the weights array corresponds to this parameter set?
unsigned int ClosestShiftIndex(const std::string &name, double shift, ESide side=ESide::kEither, double *trueShift=0) const
Within that entry, which index corresponds most closely to &#39;shift&#39;?
bool SystExists(const std::string &name) const
then echo fcl name