futureSig_systs.h
Go to the documentation of this file.
1 // Define simple systematics to be used in projeted sensitivities
2 #include "CAFAna/Systs/Systs.h"
6 #include "CAFAna/Core/Var.h"
7 
8 #include <TString.h>
9 
10 using namespace ana;
11 
12 
13 const Cut kkIsFD([](const caf::SRProxy* sr)
14  {
15  return sr->hdr.det == caf::kFARDET;
16  });
17 
18 ////////////////////////////////////////////////////////////
19 /// Nue/Numu RHC systematic
20 ////////////////////////////////////////////////////////////
21 SystComponentScale kkWrongSignBkg ("WrongSign","20% Wrong Sign",
22  (kIsNumuCC || kIsSig || kIsBeamNue) && !kIsAntiNu, 0.20);
23 
24 ////////////////////////////////////////////////////////////
25 /// Nue systematics
26 ////////////////////////////////////////////////////////////
27 
28 SystComponentScale kkNueSigSyst1 ("NueSig1", "Nue 5% Signal", kIsSig, 0.05);
29 SystComponentScale kkNueSigSyst2 ("NueSig2", "Nue 2% Signal", kIsSig, 0.02);
30 SystComponentScale kkNueBkgSyst1 ("NueBkg1", "Nue 10% Background", !kIsSig && kkIsFD, 0.10);
31 SystComponentScale kkNueBkgSyst2 ("NueBkg2", "Nue 5% Background", !kIsSig && kkIsFD, 0.05);
32 
33 std::vector< const ISyst * > systsNueFHC = {&kkNueSigSyst1, &kkNueBkgSyst1,
35 
36 std::vector< const ISyst * > systsNueRHC = {&kkNueSigSyst1, &kkNueBkgSyst1,
38 
39 ////////////////////////////////////////////////////////////
40 /// Numu systematics
41 ////////////////////////////////////////////////////////////
42 
43 class MySAMuEnergyScaleSyst: public SAMuEnergyScaleSyst
44 {
45 public:
47  : SAMuEnergyScaleSyst(scale)
48  {
49  fShortName = shortName;
50  fLatexName = latexName;
51  };
52 
53  std::string ShortName() const override {return fShortName;}
54  std::string LatexName() const override {return fLatexName;}
57 };
58 
59 class MyFitHadEnergyScaleSyst: public FitHadEnergyScaleSyst
60 {
61 public:
63  : FitHadEnergyScaleSyst(scale) {
64  fShortName = shortName;
65  fLatexName = latexName;
66  };
67  std::string ShortName() const override {return fShortName;}
68  std::string LatexName() const override {return fLatexName;}
71 };
72 
73 SystComponentScale kkNumuSigSyst1 ("NumuSig","Numu 7% Signal", kIsNumuCC && kkIsFD, 0.07);
74 
75 SystComponentScale kkNumuBkgSyst1 ("NumuBkg1","Numu 100% Background", !kIsNumuCC && kkIsFD, 1.0);
76 SystComponentScale kkNumuBkgSyst2 ("NumuBkg2","Numu 50% Background", !kIsNumuCC && kkIsFD, 0.5);
77 SystComponentScale kkNumuBkgSyst3 ("NumuBkg3","Numu 30% Background", !kIsNumuCC && kkIsFD, 0.3);
78 
79 MySAMuEnergyScaleSyst kkNumuMuESyst1 ("NumuMuE1", "Numu 2.0% MuE Scale", 0.02);
80 MySAMuEnergyScaleSyst kkNumuMuESyst2 ("NumuMuE2", "Numu 1.5% MuE Scale", 0.015);
81 
82 MyFitHadEnergyScaleSyst kkNumuHadESyst1 ("NumuHadE1", "Numu 5% HadE Scale", 0.05);
83 MyFitHadEnergyScaleSyst kkNumuHadESyst2 ("NumuHadE2", "Numu 3% HadE Scale", 0.03);
84 
85 SystComponentScale kkNumuNormSyst1("NumuNorm1","Numu 5% Normalization", kkIsFD, 0.05);
86 SystComponentScale kkNumuNormSyst2("NumuNorm2","Numu 2% Normalization", kkIsFD, 0.02);
87 
88 std::vector< const ISyst * > systsNumuFHC = {&kkNumuSigSyst1, &kkNumuBkgSyst1,
93 
94 std::vector< const ISyst * > systsNumuRHC = {&kkNumuSigSyst1, &kkNumuBkgSyst1,
99  &kkWrongSignBkg};
100 
101 // Test: reduce numu bkg by 1/2
102 const Var kkNumuBkgHalf ([](const caf::SRProxy* sr)
103  {
104  if((kkIsFD && !kIsNumuCC)(sr)) return 0.5;
105  return 1.;});
106 
107 
108 ////////////////////////////////////////////////////////////
109 /// make combinations of the systematics
110 ////////////////////////////////////////////////////////////
111 
112 std::vector<const ISyst*> GetSystsList (TString systType)
113 {
114  std::vector<const ISyst*> mySysts;
115 
116  if(systType=="stats") return {};
117 
118  //TODO need better conventions
119  if(systType=="_0"){
120  mySysts = {&kkNueSigSyst1, &kkNueBkgSyst1,
122  }
123  else if(systType=="_1"){
124  mySysts = {&kkNueSigSyst1, &kkNueBkgSyst1,
127  }
128  else{
129  //_12 is blessed, 0% numu bkg uncert
130  mySysts = {&kkNueSigSyst2, &kkNueBkgSyst2,
132  &kkNumuNormSyst2};
133 
134  //Normal || weighted numu bkg
135  //100 % numu bkg uncert
136  if(systType=="_2" || systType=="_3"){mySysts.push_back(&kkNumuBkgSyst1);}
137  //50% numu bkg uncert
138  if(systType=="_8" || systType=="_4"){mySysts.push_back(&kkNumuBkgSyst2);}
139  if(systType=="_10" || systType=="_6"){mySysts.push_back(&kkNumuBkgSyst2);
140  mySysts.push_back(&kkWrongSignBkg);}
141  //30% numu bkg uncert
142  if(systType=="_9" || systType=="_5"){mySysts.push_back(&kkNumuBkgSyst3);}
143  if(systType=="_11" || systType=="_7"){mySysts.push_back(&kkNumuBkgSyst3);
144  mySysts.push_back(&kkWrongSignBkg);}
145  }
146  return mySysts;
147 }
148 
149 
150 
MySAMuEnergyScaleSyst(std::string shortName, std::string latexName, const double scale)
const Cut kkIsFD([](const caf::SRProxy *sr){return sr->hdr.det==caf::kFARDET;})
std::string ShortName() const override
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
Numu systematics.
Far Detector at Ash River.
Definition: SREnums.h:11
MySAMuEnergyScaleSyst kkNumuMuESyst2("NumuMuE2","Numu 1.5% MuE Scale", 0.015)
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
SystComponentScale kkNumuNormSyst2("NumuNorm2","Numu 2% Normalization", kkIsFD, 0.02)
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
std::vector< const ISyst * > systsNumuFHC
const Cut kIsAntiNu([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return sr->mc.nu[0].pdg< 0;})
Is this truly an antineutrino?
Definition: TruthCuts.h:53
SystComponentScale kkNueSigSyst2("NueSig2","Nue 2% Signal", kIsSig, 0.02)
const Cut kIsBeamNue(CCFlavSel(12, 12))
Select CC .
SystComponentScale kkNumuBkgSyst1("NumuBkg1","Numu 100% Background",!kIsNumuCC &&kkIsFD, 1.0)
std::vector< const ISyst * > GetSystsList(TString systType)
make combinations of the systematics
const Var kkNumuBkgHalf([](const caf::SRProxy *sr){if((kkIsFD &&!kIsNumuCC)(sr)) return 0.5;return 1.;})
Uncertainty in the scale of a single component of the spectrum.
std::string LatexName() const override
SystComponentScale kkWrongSignBkg("WrongSign","20% Wrong Sign",(kIsNumuCC||kIsSig||kIsBeamNue)&&!kIsAntiNu, 0.20)
Nue/Numu RHC systematic.
Double_t scale
Definition: plot.C:25
SystComponentScale kkNumuBkgSyst3("NumuBkg3","Numu 30% Background",!kIsNumuCC &&kkIsFD, 0.3)
SystComponentScale kkNumuSigSyst1("NumuSig","Numu 7% Signal", kIsNumuCC &&kkIsFD, 0.07)
SystComponentScale kkNumuNormSyst1("NumuNorm1","Numu 5% Normalization", kkIsFD, 0.05)
std::vector< const ISyst * > systsNueFHC
std::string LatexName() const override
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
MyFitHadEnergyScaleSyst(std::string shortName, std::string latexName, const double scale)
caf::StandardRecord * sr
SystComponentScale kkNueBkgSyst2("NueBkg2","Nue 5% Background",!kIsSig &&kkIsFD, 0.05)
std::vector< const ISyst * > systsNumuRHC
std::vector< const ISyst * > systsNueRHC
MyFitHadEnergyScaleSyst kkNumuHadESyst2("NumuHadE2","Numu 3% HadE Scale", 0.03)
std::string ShortName() const override
MySAMuEnergyScaleSyst kkNumuMuESyst1("NumuMuE1","Numu 2.0% MuE Scale", 0.02)
SystComponentScale kkNueSigSyst1("NueSig1","Nue 5% Signal", kIsSig, 0.05)
Nue systematics.
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
MyFitHadEnergyScaleSyst kkNumuHadESyst1("NumuHadE1","Numu 5% HadE Scale", 0.05)
SystComponentScale kkNueBkgSyst1("NueBkg1","Nue 10% Background",!kIsSig &&kkIsFD, 0.10)
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
SystComponentScale kkNumuBkgSyst2("NumuBkg2","Numu 50% Background",!kIsNumuCC &&kkIsFD, 0.5)
enum BeamMode string