WrongSignSysts.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/ISyst.h"
4 
5 namespace ana
6 {
7  /// Wrong sign scale systematic up and dn by 30%
8  class WrongSignScale: public ISyst
9  {
10  public:
11  WrongSignScale() : ISyst("ScaleWS", "Wrong Sign Scale Systematic") {}
12 
13  // apply 30% scale to ws
14  void Shift(double sigma,
15  caf::SRProxy* sr, double& weight) const override;
16  };
17 
18  extern const WrongSignScale kWrongSignScale;
19 
20  //-----------------------------------------------------
21  /// Wrong sign scale RHC only systematic by energy bin
22  /// only up or dn shift
24  {
25  public:
26  WrongSignEnergyBinRHC() : ISyst("WrongSignEnergyBinRHC", "Scale RHC Wrong Sign by Bin (Up or Dn)") {}
27 
28  void Shift(double sigma,
29  caf::SRProxy* sr, double& weight) const override;
30  };
31 
33 
34  //-----------------------------------------------------
35  /// Wrong sign scale systematic by energy bin
36  /// only up or dn shift
37  class WrongSignEnergyBin: public ISyst
38  {
39  public:
40  WrongSignEnergyBin() : ISyst("WrongSignEnergyBin", "Scale Wrong Sign by Bin") {}
41 
42  void Shift(double sigma,
43  caf::SRProxy* sr, double& weight) const override;
44  };
45 
47 
48  //-----------------------------------------------------
49  class WrongSignScale100: public ISyst
50  {
51  public:
52  WrongSignScale100() : ISyst("ScaleWrongSign100", "Wrong Sign Scale Systematic 100") {}
53 
54  void Shift(double sigma,
55  caf::SRProxy* sr, double& weight) const override;
56  };
57 
59 
60  //-------------------------------------------------------------
61  /// Wrong sign scale systematic set by the user
62  /// scalefhc scales the fhc ws
63  /// scalerhc scales the rhc ws
64  class MyWrongSignScale: public ISyst
65  {
66  public:
68  const std::string& latexName,
69  double scaleFHC,
70  double scaleRHC)
71  : ISyst(shortName, latexName),
72  fScaleFHC(scaleFHC), fScaleRHC(scaleRHC)
73  {
74  }
75 
76  MyWrongSignScale(const double scaleFHC, const double scaleRHC)
77  : ISyst("MyWrongSignScale", "My Wrong Sign Scale Systematic"),
78  fScaleFHC(scaleFHC),
79  fScaleRHC(scaleRHC)
80  {
81  }
82 
83 
84  void Shift(double sigma,
85  caf::SRProxy* sr, double& weight) const override;
86 
87  private:
88 
89  const double fScaleFHC;
90  const double fScaleRHC;
91  };
92 
94 }
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
const MyWrongSignScale kMyWrongSignScale(0.03, 0.03)
const WrongSignScale kWrongSignScale
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
const double fScaleFHC
const WrongSignEnergyBinRHC kWrongSignEnergyBinRHC
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
Wrong sign scale systematic up and dn by 30%.
Definition: WrongSignSysts.h:8
caf::StandardRecord * sr
double sigma(TH1F *hist, double percentile)
const WrongSignScale100 kWrongSignScale100
MyWrongSignScale(const double scaleFHC, const double scaleRHC)
const WrongSignEnergyBin kWrongSignEnergyBin
MyWrongSignScale(const std::string &shortName, const std::string &latexName, double scaleFHC, double scaleRHC)
const double fScaleRHC
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
enum BeamMode string