NumuExtrap.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& numuDecomp,
18  const HistAxis& axis,
19  const Cut& fdcut,
20  const Cut& numuNDcut,
21  const SystShifts& shiftMC,
22  const Var& weight)
23  : ModularExtrap(farMCswap,
24  farMCnonswap,
25  farMCtauswap,
26  axis,
27  fdcut,
28  shiftMC,
29  weight)
30  {
31 
32  // mu -> mu ----
33  fMMextrap = std::unique_ptr<ModularExtrapComponent>(
34  new TruthReweight(
35  nearMC, axis, axis, fdcut, shiftMC, weight,
36  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
37  numuNDcut, numuDecomp, // numu selection in ND
38  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
39  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
40  )
41  );
42  // mubar -> mubar ---
43  fMMAntiextrap = std::unique_ptr<ModularExtrapComponent>(
44  new TruthReweight(
45  nearMC, axis, axis, fdcut, shiftMC, weight,
46  "mubar -> mubar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{#mu}",
47  numuNDcut, numuDecomp, // numu selection in ND
48  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
49  farMCnonswap, kIsNumuCC && kIsAntiNu // mubar->mubar in FD
50  )
51  );
52 
53  }
54 
55  //---------------------------------------------------------------------------
56 
58  const IDecomp& numuDecomp,
59  const HistAxis& axis,
60  const Cut& fdcut,
61  const Cut& ndcut,
62  const SystShifts& shiftMC,
63  const Var& weight)
64  : NumuExtrap(loaders.GetLoader(caf::kNEARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap),
65  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kFluxSwap),
66  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap),
67  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kTauSwap),
68  numuDecomp,
69  axis,
70  fdcut,
71  ndcut,
72  shiftMC,
73  weight
74  )
75  {}
76 
77 }
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
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
Extrapolates component using truth-over-truth method.
Base class for the various types of spectrum loader.
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
Definition: ModularExtrap.h:93
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
NumuExtrap(Loaders &loaders, const IDecomp &numuDecomp, const HistAxis &axis, const Cut &fdcut, const Cut &ndcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Creates a numu-like extrapolation.
Definition: NumuExtrap.cxx:57
Extrapolate each component using a separate ModularExtrapComponent.
Definition: ModularExtrap.h:23