NueSignalOnlyExtrap.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 HistAxis& axisNumuND,
20  const Cut& fdcut,
21  const Cut& numuNDcut,
22  const SystShifts& shiftMC,
23  const Var& weight)
24  : ModularExtrap(farMCswap,
25  farMCnonswap,
26  farMCtauswap,
27  axis,
28 
29  // Need background extrap comps to be empty
30  // First set all comps to be empty
31  // Then reset signal comps below
32  !kNoCut, //fdcut,
33  shiftMC,
34  weight)
35  {
36  // mu -> e ----
37  fMEextrap = std::unique_ptr<ModularExtrapComponent>(
38  new TruthReweight(
39  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
40  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
41  numuNDcut, numuDecomp, // numu selection in ND
42  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
43  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
44  )
45  );
46  // mubar -> ebar
47  fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
48  new TruthReweight(
49  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
50  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
51  numuNDcut, numuDecomp, // numu selection in ND
52  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
53  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
54  )
55  );
56  }
57 
58  //---------------------------------------------------------------------------
59 
61  const IDecomp& numuDecomp,
62  const HistAxis& axis,
63  const HistAxis& axisNumuND,
64  const Cut& fdcut,
65  const Cut& numuNDcut,
66  const SystShifts& shiftMC,
67  const Var& weight)
68  : NueSignalOnlyExtrap(loaders.GetLoader(caf::kNEARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap),
69  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kFluxSwap),
70  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap),
71  loaders.GetLoader(caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kTauSwap),
72  numuDecomp,
73  axis,
74  axisNumuND,
75  fdcut,
76  numuNDcut,
77  shiftMC,
78  weight)
79  {}
80 
81 }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
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
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
Definition: ModularExtrap.h:95
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::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
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:109
NueSignalOnlyExtrap(SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const IDecomp &numuDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &numuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)