All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SystComponentScale.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace ana
7 {
8  /// Uncertainty in the scale of a single component of the spectrum
9  class SystComponentScale: public ISyst
10  {
11  public:
13 
14  /// \param cut Select the component to be scaled
15  SystComponentScale(const std::string& shortName,
16  const std::string& latexName,
17  const Cut& cut,
18  double oneSigma,
20  : ISyst(shortName, latexName),
21  fCut(cut), fOneSigma(oneSigma), fType(type)
22  {
23  }
24 
26 
27  /// Scaling this component between 1/(1+x) and (1+x) is the 1-sigma range
28  double OneSigmaScale() const {return fOneSigma;}
29 
30  const Cut& GetCut() const {return fCut;}
31 
32  void Shift(double sigma,
33  caf::SRSliceProxy* slc,
34  double& weight) const override;
35 
36  // Some derived classes might have a back-channel allowing them to
37  // implement this.
38  static std::unique_ptr<SystComponentScale> LoadFrom(TDirectory* dir);
39  virtual void SaveTo(TDirectory* dir) const {assert(0 && "unimplemented");}
40 
41  protected:
43  double fOneSigma;
45  };
46 } // namespace
double OneSigmaScale() const
Scaling this component between 1/(1+x) and (1+x) is the 1-sigma range.
Uncertainty in the scale of a single component of the spectrum.
const Cut & GetCut() const
static std::unique_ptr< SystComponentScale > LoadFrom(TDirectory *dir)
virtual void SaveTo(TDirectory *dir) const
process_name opflashCryoW ana
Encapsulate code to systematically shift a caf::StandardRecord.
Definition: ISyst.h:14
caf::Proxy< caf::SRSlice > SRSliceProxy
Definition: EpilogFwd.h:2
SystComponentScale(const std::string &shortName, const std::string &latexName, const Cut &cut, double oneSigma, ESystType type=kExponential)
void Shift(double sigma, caf::SRSliceProxy *slc, double &weight) const override
Perform the systematic shift.
tuple dir
Definition: dropbox.py:28