MichelTaggingSyst.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "CAFAna/Core/ISyst.h"
4 
5 #include "TRandom3.h"
6 
7 namespace ana
8 {
9  // 2020 version -- easiest way to just copy the old version to avoid naming conflicts and not destroying the old pieces of code
11  {
12  public:
13  MichelTaggingSyst2020() : ISyst("michel_tagging2020", "Michel Electrons Tagging Uncertainty") {}
14 
15  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
16 
17  private:
18  // Jeremy's trick for random numbers
19  int Hash(caf::SRProxy* sr) const;
20 
21  // 2020 first preliminary numbers, waiting for full validation
22  double fProbUP = .08;
23  double fProbDO = .05;
24 
25  mutable TRandom3 fMRnd;
26  };
27 
29 
30  //----------------------------------------------------------------------------------------
31 
32 
33  // 2018 version
35  {
36  public:
37  MichelTaggingSyst2018() : ISyst("michel_tagging2018", "Michel Electrons Tagging Uncertainty") {}
38 
39  void Shift(double sigma, caf::SRProxy* sr, double& weight) const override;
40 
41  private:
42  // Jeremy's trick for random numbers
43  int Hash(caf::SRProxy* sr) const;
44 
45  // made up numbers to hack +-5% shift of tagging efficiency
46  // this needs to be treated carefully and tested for every new/old datasets
47  // it can change quite a lot
48  // DO NOT USE FOR ANY OTHER DATASETS THAN 2018 (prod4) FHC
49  double fProbUP = .36;
50  double fProbDO = .08;
51 
52  mutable TRandom3 fMRnd;
53  };
54 
56 }
57 
58 
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
Encapsulate code to systematically shift a caf::SRProxy.
Definition: ISyst.h:14
caf::StandardRecord * sr
double sigma(TH1F *hist, double percentile)
const MichelTaggingSyst2020 kMichelTaggingSyst2020
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
const MichelTaggingSyst2018 kMichelTaggingSyst2018
int Hash(caf::SRProxy *sr) const