NueRHCExtrap.cxx
Go to the documentation of this file.
2 
3 #include "CAFAna/Core/Loaders.h"
9 
10 namespace ana
11 {
12  //---------------------------------------------------------------------------
13 
15  SpectrumLoaderBase& farMCswap,
16  SpectrumLoaderBase& farMCnonswap,
17  SpectrumLoaderBase& farMCtauswap,
18  const IDecomp& nueDecomp,
19  const IDecomp& numuDecomp,
20  const HistAxis& axis,
21  const HistAxis& axisNumuND,
22  const Cut& fdcut,
23  const Cut& nueNDcut,
24  const Cut& numuNDcut,
25  const SystShifts& shiftMC,
26  const Var& weight)
27  : ModularExtrap(farMCswap,
28  farMCnonswap,
29  farMCtauswap,
30  axis,
31  fdcut,
32  shiftMC,
33  weight)
34  {
35  // mu -> mu ----
36  fMMextrap = std::unique_ptr<ModularExtrapComponent>(
37  new RecoReweight(
38  nearMC, axis, fdcut, shiftMC, weight,
39  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
40  nueNDcut, nueDecomp, // nue selection in ND
41  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
42  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
43  )
44  );
45  // mubar -> mubar ---
46  fMMAntiextrap = std::unique_ptr<ModularExtrapComponent>(
47  new RecoReweight(
48  nearMC, axis, fdcut, shiftMC, weight,
49  "mubar -> mubar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{#mu}",
50  nueNDcut, nueDecomp, // nue selection in ND
51  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numu truth in ND
52  farMCnonswap, kIsNumuCC && kIsAntiNu // mu->mu in FD
53  )
54  );
55 
56  // mu -> e ----
57  fMEextrap = std::unique_ptr<ModularExtrapComponent>(
58  new TruthReweight(
59  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
60  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
61  numuNDcut, numuDecomp, // numu selection in ND
62  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
63  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
64  )
65  );
66  // mubar -> ebar
67  fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
68  new TruthReweight(
69  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
70  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
71  numuNDcut, numuDecomp, // numu selection in ND
72  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
73  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
74  )
75  );
76 
77  // NC -> NC ----
78  fNCextrap = std::unique_ptr<ModularExtrapComponent>(
79  new RecoReweight(
80  nearMC, axis, fdcut, shiftMC, weight,
81  "NC -> NC", "NC #rightarrow NC",
82  nueNDcut, nueDecomp, // nue selection in ND
83  DecompResult::NC, kIsNC && !kIsAntiNu, // NC truth in ND
84  farMCswap, kIsNC && !kIsAntiNu, // NC->NC in FD
85  farMCnonswap, farMCtauswap // extra NC stats
86  )
87  );
88  // NC Anti -> NC Anti ---
89  fNCAntiextrap = std::unique_ptr<ModularExtrapComponent>(
90  new RecoReweight(
91  nearMC, axis, fdcut, shiftMC, weight,
92  "NCbar -> NCbar", "NC bar #rightarrow NC bar",
93  nueNDcut, nueDecomp, // nue selection in ND
94  DecompResult::NCbar, kIsNC && kIsAntiNu, // NC truth in ND
95  farMCswap, kIsNC && kIsAntiNu, // NC->NC in FD
96  farMCnonswap, farMCtauswap // extra NC stats
97  )
98  );
99 
100  // e -> e ----
101  fEEextrap = std::unique_ptr<ModularExtrapComponent>(
102  new RecoReweight(
103  nearMC, axis, fdcut, shiftMC, weight,
104  "e -> e", "#nu_{e} #rightarrow #nu_{e}",
105  nueNDcut, nueDecomp, // nue selection in ND
106  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
107  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
108  )
109  );
110 
111  // ebar -> ebar ---
112  fEEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
113  new RecoReweight(
114  nearMC, axis, fdcut, shiftMC, weight,
115  "ebar -> ebar", "#bar{#nu}_{e} #rightarrow #bar{#nu}_{e}",
116  nueNDcut, nueDecomp, // nue selection in ND
117  DecompResult::nuebar, kIsBeamNue && kIsAntiNu, // nue truth in ND
118  farMCnonswap, kIsBeamNue && kIsAntiNu // e->e in FD
119  )
120  );
121  }
122 
123  //---------------------------------------------------------------------------
124 
126  const IDecomp& nueDecomp,
127  const IDecomp& numuDecomp,
128  const HistAxis& axis,
129  const HistAxis& axisNumuND,
130  const Cut& fdcut,
131  const Cut& nueNDcut,
132  const Cut& numuNDcut,
133  const SystShifts& shiftMC,
134  const Var& weight)
135  : NueRHCExtrap(loaders.GetLoader(caf::kNEARDET,
136  Loaders::kMC,
137  ana::kBeam,
138  Loaders::kNonSwap),
139  loaders.GetLoader(caf::kFARDET,
140  Loaders::kMC,
141  ana::kBeam,
142  Loaders::kFluxSwap),
143  loaders.GetLoader(caf::kFARDET,
144  Loaders::kMC,
145  ana::kBeam,
146  Loaders::kNonSwap),
147  loaders.GetLoader(caf::kFARDET,
148  Loaders::kMC,
149  ana::kBeam,
150  Loaders::kTauSwap),
151  nueDecomp,
152  numuDecomp,
153  axis,
154  axisNumuND,
155  fdcut,
156  nueNDcut,
157  numuNDcut,
158  shiftMC,
159  weight)
160  {}
161 
162 }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
std::unique_ptr< ModularExtrapComponent > fMMextrap
Definition: ModularExtrap.h:92
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
Simple record of shifts applied to systematic parameters.
Definition: SystShifts.h:20
Collection of SpectrumLoaders for many configurations.
Definition: Loaders.h:23
std::unique_ptr< ModularExtrapComponent > fMEextrap
Definition: ModularExtrap.h:94
const Color_t kMC
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
const Cut kIsBeamNue(CCFlavSel(12, 12))
Select CC .
std::unique_ptr< ModularExtrapComponent > fNCextrap
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
Definition: ModularExtrap.h:95
const Cut kIsNC([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;assert(sr->mc.nnu==1);return!sr->mc.nu[0].iscc;})
Is this a Neutral Current event?
Definition: TruthCuts.h:8
Extrapolates component using truth-over-truth method.
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
std::unique_ptr< ModularExtrapComponent > fEEAntiextrap
Definition: ModularExtrap.h:91
Base class for the various types of spectrum loader.
std::unique_ptr< ModularExtrapComponent > fNCAntiextrap
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
Definition: ModularExtrap.h:93
Creates a nue-like extrapolation for RHC mode.
Definition: NueRHCExtrap.h:16
std::vector< Loaders * > loaders
Definition: syst_header.h:386
Standard interface to all decomposition techniques.
Definition: IDecomp.h:13
This module creates Common Analysis Files.
Definition: FileReducer.h:10
Extrapolate each component using a separate ModularExtrapComponent.
Definition: ModularExtrap.h:23
std::unique_ptr< ModularExtrapComponent > fEEextrap
Definition: ModularExtrap.h:90
NueRHCExtrap(SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const IDecomp &nueDecomp, const IDecomp &numuDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &nueNDcut, const Cut &numuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Extrapolates using reco-over-reco method.