NueExtrap.cxx
Go to the documentation of this file.
2 
3 #include "CAFAna/Core/Loaders.h"
8 
9 namespace ana
10 {
11  //---------------------------------------------------------------------------
12 
14  SpectrumLoaderBase& farMCswap,
15  SpectrumLoaderBase& farMCnonswap,
16  SpectrumLoaderBase& farMCtauswap,
17  const IDecomp& nueDecomp,
18  const IDecomp& numuDecomp,
19  const HistAxis& axis,
20  const HistAxis& axisNumuND,
21  const Cut& fdcut,
22  const Cut& nueNDcut,
23  const Cut& numuNDcut,
24  const SystShifts& shiftMC,
25  const Var& weight)
26  : ModularExtrap(farMCswap,
27  farMCnonswap,
28  farMCtauswap,
29  axis,
30  fdcut,
31  shiftMC,
32  weight)
33  {
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 
46  // mu -> e ----
47  fMEextrap = std::unique_ptr<ModularExtrapComponent>(
48  new TruthReweight(
49  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
50  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
51  numuNDcut, numuDecomp, // numu selection in ND
52  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
53  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
54  )
55  );
56 
57  // mubar -> ebar
58  fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
59  new TruthReweight(
60  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
61  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
62  numuNDcut, numuDecomp, // numu selection in ND
63  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
64  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
65  )
66  );
67 
68 
69  // NC -> NC ----
70  fNCextrap = std::unique_ptr<ModularExtrapComponent>(
71  new RecoReweight(
72  nearMC, axis, fdcut, shiftMC, weight,
73  "NC -> NC", "NC #rightarrow NC",
74  nueNDcut, nueDecomp, // nue selection in ND
75  DecompResult::NC, kIsNC && !kIsAntiNu, // NC truth in ND
76  farMCswap, kIsNC && !kIsAntiNu, // NC->NC in FD
77  farMCnonswap, farMCtauswap // extra NC stats
78  )
79  );
80 
81  // NCAnti -> NCAnti ---
82  fNCAntiextrap = std::unique_ptr<ModularExtrapComponent>(
83  new RecoReweight(
84  nearMC, axis, fdcut, shiftMC, weight,
85  "NCbar -> NCbar", "NC bar #rightarrow NC bar",
86  nueNDcut, nueDecomp, // nue selection in ND
87  DecompResult::NCbar, kIsNC && kIsAntiNu, // NC Anti truth in ND
88  farMCswap, kIsNC && kIsAntiNu, // NC Anti->NC Anti in FD
89  farMCnonswap, farMCtauswap // extra NC Anti stats
90  )
91  );
92 
93 
94  // e -> e ----
95  fEEextrap = std::unique_ptr<ModularExtrapComponent>(
96  new RecoReweight(
97  nearMC, axis, fdcut, shiftMC, weight,
98  "e -> e", "#nu_{e} #rightarrow #nu_{e}",
99  nueNDcut, nueDecomp, // nue selection in ND
100  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
101  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
102  )
103  );
104  }
105 
106  //---------------------------------------------------------------------------
107 
109  const IDecomp& nueDecomp,
110  const IDecomp& numuDecomp,
111  const HistAxis& axis,
112  const HistAxis& axisNumuND,
113  const Cut& fdcut,
114  const Cut& nueNDcut,
115  const Cut& numuNDcut,
116  const SystShifts& shiftMC,
117  const Var& weight)
118  : NueExtrap(loaders.GetLoader(caf::kNEARDET,
119  Loaders::kMC,
120  ana::kBeam,
121  Loaders::kNonSwap),
122  loaders.GetLoader(caf::kFARDET,
123  Loaders::kMC,
124  ana::kBeam,
125  Loaders::kFluxSwap),
126  loaders.GetLoader(caf::kFARDET,
127  Loaders::kMC,
128  ana::kBeam,
129  Loaders::kNonSwap),
130  loaders.GetLoader(caf::kFARDET,
131  Loaders::kMC,
132  ana::kBeam,
133  Loaders::kTauSwap),
134  nueDecomp,
135  numuDecomp,
136  axis,
137  axisNumuND,
138  fdcut,
139  nueNDcut,
140  numuNDcut,
141  shiftMC,
142  weight)
143  {}
144 
145 }
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
NueExtrap(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)
Definition: NueExtrap.cxx:13
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 .
Base class for the various types of spectrum loader.
std::unique_ptr< ModularExtrapComponent > fNCAntiextrap
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
Extrapolates using reco-over-reco method.