Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ana::ModularExtrapSterile Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-07-07/CAFAna/Extrap/ExtrapSterile.h"

Inheritance diagram for ana::ModularExtrapSterile:
ana::ModularExtrap ana::IExtrap

Public Member Functions

 ModularExtrapSterile (const ModularExtrapSterile &)=delete
 
ModularExtrapSterileoperator= (const ModularExtrapSterile &)=delete
 
 ModularExtrapSterile (ModularExtrapSterile &&)=default
 
ModularExtrapSterileoperator= (ModularExtrapSterile &&)=default
 
virtual ~ModularExtrapSterile ()=default
 
void SaveTo (TDirectory *dir) const override
 
OscillatableSpectrum OscNCComponent () const
 Return the oscillatable NC component. More...
 
Spectrum NCTotalComponent () override
 Override the ModularExtrap method. More...
 
Ratio NCNueProportion () const
 Return the proportion of NCs that originate as a given neutrino flavor/sign. More...
 
Ratio NCAntiNueProportion () const
 
Ratio NCNumuProportion () const
 
Ratio NCAntiNumuProportion () const
 
void SavePlotsNue (TDirectory *dir, double potFD) const
 
void SavePlotsNueRHC (TDirectory *dir, double potFD) const
 
void SavePlotsNumu (TDirectory *dir, double potFD) const
 
OscillatableSpectrum NueSurvComponent () override
 Charged current electron neutrino survival ( $\nu_e\to\nu_e$) More...
 
OscillatableSpectrum AntiNueSurvComponent () override
 Charged current electron antineutrino survival ( $\bar\nu_e\to\bar\nu_e$) More...
 
OscillatableSpectrum NumuSurvComponent () override
 Charged current muon neutrino survival ( $\nu_\mu\to\nu_\mu$) More...
 
OscillatableSpectrum AntiNumuSurvComponent () override
 Charged current muon antineutrino survival ( $\bar\nu_\mu\to\bar\nu_\mu$) More...
 
OscillatableSpectrum NueAppComponent () override
 Charged current electron neutrino appearance ( $\nu_\mu\to\nu_e$) More...
 
OscillatableSpectrum AntiNueAppComponent () override
 Charged current electron antineutrino appearance ( $\bar\nu_\mu\to\bar\nu_e$) More...
 
OscillatableSpectrum NumuAppComponent () override
 Charged current muon neutrino appearance ( $\nu_e\to\nu_\mu$) More...
 
OscillatableSpectrum AntiNumuAppComponent () override
 Charged current muon antineutrino appearance ( $\bar\nu_e\to\bar\nu_\mu$) More...
 
OscillatableSpectrum TauFromMuComponent () override
 Charged current tau neutrino appearance from muon neutrino ( $\nu_\mu\to\nu_\tau$) More...
 
OscillatableSpectrum AntiTauFromMuComponent () override
 Charged current tau antineutrino appearance from muon antineutrino ( $\bar\nu_\mu\to\bar\nu_\tau$) More...
 
OscillatableSpectrum TauFromEComponent () override
 Charged current tau neutrino appearance from electron neutrino ( $\nu_e\to\nu_\tau$) More...
 
OscillatableSpectrum AntiTauFromEComponent () override
 Charged current tau antineutrino appearance from electron antineutrino ( $\bar\nu_e\to\bar\nu_\tau$) More...
 
Spectrum NCComponent () override
 
Spectrum NCAntiComponent () override
 
std::vector< ModularExtrapComponent * > GetModExtrapComponents () const
 
void DeDuplicateNueDecomps () const
 

Static Public Member Functions

static ModularExtrapSterile NCDisappearance (Loaders &loaders, const IDecomp &NCSurvDecomp, const IDecomp &NumuOscDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &NCNDcut, const Cut &NumuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a NC disappearance extrapolation. More...
 
static ModularExtrapSterile NCDisappearance (SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const IDecomp &NCSurvDecomp, const IDecomp &NumuOscDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &NCNDcut, const Cut &NumuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a NC disappearance extrapolation with individual spectrum loaders. More...
 
static ModularExtrapSterile TrivialExtrapNC (Loaders &loaders, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a NC disappearance "extrapolation" by returning FD MC. More...
 
static ModularExtrapSterile TrivialExtrapNC (SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 
static std::unique_ptr< ModularExtrapSterileLoadFrom (TDirectory *dir)
 
static ModularExtrap Nue (Loaders &loaders, 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)
 Creates a nue-like extrapolation. More...
 
static ModularExtrap Nue (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)
 Creates a nue-like extrapolation with individual spectrum loaders. More...
 
static ModularExtrap NueRHC (Loaders &loaders, 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)
 Creates a nue-like extrapolation for RHC mode. More...
 
static ModularExtrap NueRHC (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)
 Creates a nue-like extrapolation for RHC mode. More...
 
static ModularExtrap NueFlux (Loaders &loaders, const FluxDecomp &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)
 
static ModularExtrap NueFlux (SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const FluxDecomp &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)
 Creates a nue-like extrapolation for RHC mode. More...
 
static ModularExtrap NueSignal (Loaders &loaders, const IDecomp &numuDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &numuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a nue signal-only extrapolation. More...
 
static ModularExtrap NueSignal (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)
 Creates a nue signal-only extrapolation. More...
 
static ModularExtrap NueBkgd (const bool isRHC, Loaders &loaders, const IDecomp &nueDecomp, const HistAxis &axis, const Cut &fdcut, const Cut &nueNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a nue background-only extrapolation. More...
 
static ModularExtrap NueBkgd (const bool isRHC, SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const IDecomp &nueDecomp, const HistAxis &axis, const Cut &fdcut, const Cut &nueNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
 Creates a nue background-only extrapolation. More...
 
static ModularExtrap Numu (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. More...
 
static ModularExtrap Numu (SpectrumLoaderBase &nearMCLoader, SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, 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 with individual spectrum loaders. More...
 

Protected Member Functions

 ModularExtrapSterile (ModularExtrap &&load)
 Constructor necessary for loading an extrapolation from file. More...
 

Protected Attributes

std::unique_ptr< SpectrumfNCNueNumerator
 
std::unique_ptr< SpectrumfNCAntiNueNumerator
 
std::unique_ptr< SpectrumfNCNumuNumerator
 
std::unique_ptr< SpectrumfNCAntiNumuNumerator
 
std::unique_ptr< SpectrumfNCDenominator
 
std::unique_ptr< ModularExtrapComponentfEEextrap
 
std::unique_ptr< ModularExtrapComponentfEEAntiextrap
 
std::unique_ptr< ModularExtrapComponentfMMextrap
 
std::unique_ptr< ModularExtrapComponentfMMAntiextrap
 
std::unique_ptr< ModularExtrapComponentfMEextrap
 
std::unique_ptr< ModularExtrapComponentfMEAntiextrap
 
std::unique_ptr< ModularExtrapComponentfEMextrap
 
std::unique_ptr< ModularExtrapComponentfEMAntiextrap
 
std::unique_ptr< ModularExtrapComponentfNCTotalextrap
 
std::unique_ptr< ModularExtrapComponentfNCextrap
 
std::unique_ptr< ModularExtrapComponentfNCAntiextrap
 
std::unique_ptr< ModularExtrapComponentfMTextrap
 
std::unique_ptr< ModularExtrapComponentfMTAntiextrap
 
std::unique_ptr< ModularExtrapComponentfETextrap
 
std::unique_ptr< ModularExtrapComponentfETAntiextrap
 

Private Member Functions

 ModularExtrapSterile (SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC, const Var &weight)
 Sets up all components to use FD MC–internal use only. More...
 

Detailed Description

A ModularExtrap compatible with sterile oscillations. Only extrapolates one sample.

Definition at line 24 of file ExtrapSterile.h.

Constructor & Destructor Documentation

ana::ModularExtrapSterile::ModularExtrapSterile ( SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const HistAxis axis,
const Cut fdcut,
const SystShifts shiftMC,
const Var weight 
)
private

Sets up all components to use FD MC–internal use only.

Use a named constructor to create a ModularExtrapSterile.

Definition at line 185 of file ExtrapSterile.cxx.

Referenced by LoadFrom().

193  : ModularExtrap(
194  farMCswap,
195  farMCnonswap,
196  farMCtauswap,
197  axis,
198  fdcut,
199  shiftMC,
200  weight
201  ), // Sets up the components with default NoReweights
202 
203  // Set up Spectrum objects for NC Proportion Ratios
204  fNCNueNumerator(std::make_unique<Spectrum>(farMCnonswap, axis,
205  fdcut && kIsNC && !kIsAntiNu && kNCBeamNue,
206  shiftMC, weight)),
207  fNCAntiNueNumerator(std::make_unique<Spectrum>(farMCnonswap, axis,
208  fdcut && kIsNC && kIsAntiNu && kNCBeamNue,
209  shiftMC, weight)),
210  fNCNumuNumerator(std::make_unique<Spectrum>(farMCnonswap, axis,
211  fdcut && kIsNC && !kIsAntiNu && kNCBeamNumu,
212  shiftMC, weight)),
213  fNCAntiNumuNumerator(std::make_unique<Spectrum>(farMCnonswap, axis,
214  fdcut && kIsNC && kIsAntiNu && kNCBeamNumu,
215  shiftMC, weight)),
216  fNCDenominator(std::make_unique<Spectrum>(farMCnonswap, axis,
217  fdcut && kIsNC,
218  shiftMC, weight)) {
219  }
std::unique_ptr< Spectrum > fNCNueNumerator
const Var weight
std::unique_ptr< Spectrum > fNCNumuNumerator
std::unique_ptr< Spectrum > fNCAntiNumuNumerator
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< Spectrum > fNCDenominator
const Cut kNCBeamNue(NCFlavSel(12, 12))
Select NC .
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
const Cut kNCBeamNumu(NCFlavSel(14, 14))
Select NC .
std::unique_ptr< Spectrum > fNCAntiNueNumerator
ana::ModularExtrapSterile::ModularExtrapSterile ( const ModularExtrapSterile )
delete
ana::ModularExtrapSterile::ModularExtrapSterile ( ModularExtrapSterile &&  )
default
virtual ana::ModularExtrapSterile::~ModularExtrapSterile ( )
virtualdefault
ana::ModularExtrapSterile::ModularExtrapSterile ( ModularExtrap &&  load)
protected

Constructor necessary for loading an extrapolation from file.

Definition at line 222 of file ExtrapSterile.cxx.

223  : ModularExtrap(std::move(load)) { // Sets up the ModularExtrapComponents
224  }
void load(std::string lib)
Definition: load_libs.C:3

Member Function Documentation

OscillatableSpectrum ana::ModularExtrap::AntiNueAppComponent ( )
overridevirtualinherited

Charged current electron antineutrino appearance ( $\bar\nu_\mu\to\bar\nu_e$)

Implements ana::IExtrap.

Definition at line 924 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMEAntiextrap.

925  {return fMEAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
OscillatableSpectrum ana::ModularExtrap::AntiNueSurvComponent ( )
overridevirtualinherited

Charged current electron antineutrino survival ( $\bar\nu_e\to\bar\nu_e$)

Implements ana::IExtrap.

Definition at line 912 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEAntiextrap.

913  {return fEEAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fEEAntiextrap
OscillatableSpectrum ana::ModularExtrap::AntiNumuAppComponent ( )
overridevirtualinherited

Charged current muon antineutrino appearance ( $\bar\nu_e\to\bar\nu_\mu$)

Implements ana::IExtrap.

Definition at line 930 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEMAntiextrap.

931  {return fEMAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fEMAntiextrap
OscillatableSpectrum ana::ModularExtrap::AntiNumuSurvComponent ( )
overridevirtualinherited

Charged current muon antineutrino survival ( $\bar\nu_\mu\to\bar\nu_\mu$)

Implements ana::IExtrap.

Definition at line 918 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMMAntiextrap.

919  {return fMMAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
OscillatableSpectrum ana::ModularExtrap::AntiTauFromEComponent ( )
overridevirtualinherited

Charged current tau antineutrino appearance from electron antineutrino ( $\bar\nu_e\to\bar\nu_\tau$)

Implements ana::IExtrap.

Definition at line 951 of file ModularExtrap.cxx.

References ana::ModularExtrap::fETAntiextrap.

952  {return fETAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fETAntiextrap
OscillatableSpectrum ana::ModularExtrap::AntiTauFromMuComponent ( )
overridevirtualinherited

Charged current tau antineutrino appearance from muon antineutrino ( $\bar\nu_\mu\to\bar\nu_\tau$)

Implements ana::IExtrap.

Definition at line 945 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMTAntiextrap.

946  {return fMTAntiextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMTAntiextrap
void ana::ModularExtrap::DeDuplicateNueDecomps ( ) const
inherited

Definition at line 880 of file ModularExtrap.cxx.

References ana::assert(), ana::RecoReweight::fDecomp, ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCTotalextrap, ana::RecoReweight::GetDecomp(), ana::MichelDecomp::GetNueEstimateDecomp(), Munits::mm, make_root_from_grid_output::nc, and run_unfold_genie_multiprocess::ncmd.

Referenced by ana::PredictionSystNueSecondAna::DedupDecomps(), and ana::ModularExtrap::GetModExtrapComponents().

881  {
882  // TODO it would be far far better if the SaveTo/LoadFrom procedure didn't
883  // duplicate these in the first place.
884 
885  RecoReweight* mm = dynamic_cast<RecoReweight*>(fMMextrap.get());
886  RecoReweight* ee = dynamic_cast<RecoReweight*>(fEEextrap.get());
887  RecoReweight* nc = dynamic_cast<RecoReweight*>(fNCTotalextrap.get());
888 
889  assert(mm && ee && nc);
890 
891  const MichelDecomp* eemd = dynamic_cast<const MichelDecomp*>(ee->GetDecomp());
892  const MichelDecomp* ncmd = dynamic_cast<const MichelDecomp*>(nc->GetDecomp());
893 
894  // Probably this is the proportional decomp case
895  if(!eemd || !ncmd) return;
896 
897  delete eemd->GetNueEstimateDecomp();
898  delete ncmd->GetNueEstimateDecomp();
899 
900  delete ee->fDecomp;
901  delete nc->fDecomp;
902 
903  ee->fDecomp = mm->fDecomp;
904  nc->fDecomp = mm->fDecomp;
905  }
std::unique_ptr< ModularExtrapComponent > fMMextrap
std::unique_ptr< ModularExtrapComponent > fNCTotalextrap
static constexpr Double_t mm
Definition: Munits.h:136
assert(nhit_max >=nhit_nbins)
std::unique_ptr< ModularExtrapComponent > fEEextrap
std::vector<ModularExtrapComponent*> ana::ModularExtrap::GetModExtrapComponents ( ) const
inlineinherited

Definition at line 233 of file ModularExtrap.h.

References ana::ModularExtrap::DeDuplicateNueDecomps(), ana::ModularExtrap::fEEAntiextrap, ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fEMAntiextrap, ana::ModularExtrap::fEMextrap, ana::ModularExtrap::fETAntiextrap, ana::ModularExtrap::fETextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fMTAntiextrap, ana::ModularExtrap::fMTextrap, ana::ModularExtrap::fNCAntiextrap, ana::ModularExtrap::fNCextrap, ana::ModularExtrap::fNCTotalextrap, ana::ModularExtrap::ModularExtrap(), and ana::weight.

Referenced by ana::PredictionSystNueSecondAna::DedupDecomps(), ana::PredictionSystNueSecondAna::FreePrediction(), ana::GetDecomp(), and make_files_for_decomp_plots().

234  {
235  return {
236  fEEextrap.get(), fEEAntiextrap.get(),
237  fMMextrap.get(), fMMAntiextrap.get(),
238  fMEextrap.get(), fMEAntiextrap.get(),
239  fEMextrap.get(), fEMAntiextrap.get(),
240  //nc
241  fNCTotalextrap.get(), fNCextrap.get(), fNCAntiextrap.get(),
242  //end nc
243  fMTextrap.get(), fMTAntiextrap.get(),
244  fETextrap.get(), fETAntiextrap.get()};
245  }
std::unique_ptr< ModularExtrapComponent > fMMextrap
std::unique_ptr< ModularExtrapComponent > fMEextrap
std::unique_ptr< ModularExtrapComponent > fEMAntiextrap
std::unique_ptr< ModularExtrapComponent > fNCextrap
std::unique_ptr< ModularExtrapComponent > fMTAntiextrap
std::unique_ptr< ModularExtrapComponent > fNCTotalextrap
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
std::unique_ptr< ModularExtrapComponent > fEMextrap
std::unique_ptr< ModularExtrapComponent > fEEAntiextrap
std::unique_ptr< ModularExtrapComponent > fNCAntiextrap
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
std::unique_ptr< ModularExtrapComponent > fETAntiextrap
std::unique_ptr< ModularExtrapComponent > fEEextrap
std::unique_ptr< ModularExtrapComponent > fMTextrap
std::unique_ptr< ModularExtrapComponent > fETextrap
std::unique_ptr< ModularExtrapSterile > ana::ModularExtrapSterile::LoadFrom ( TDirectory *  dir)
static

Definition at line 275 of file ExtrapSterile.cxx.

References fNCAntiNueNumerator, fNCAntiNumuNumerator, fNCDenominator, fNCNueNumerator, fNCNumuNumerator, LOAD_SPECT, ana::ModularExtrap::LoadFrom(), ModularExtrapSterile(), runNovaSAM::release, and runNovaSAM::ret.

Referenced by ana::LoadFrom< IExtrap >().

275  {
276  std::unique_ptr<ModularExtrapSterile> ret(
277  new ModularExtrapSterile( std::move( *(ModularExtrap::LoadFrom(dir).release()) ) )
278  );
279 
280  // This is a lot of repetitive typing. Define a macro
281 #define LOAD_SPECT(FIELD, LABEL) assert(dir->GetDirectory(LABEL)); ret->FIELD = std::move(Spectrum::LoadFrom(dir->GetDirectory(LABEL)));
282 
283  LOAD_SPECT(fNCNueNumerator, "NCNue");
284  LOAD_SPECT(fNCAntiNueNumerator, "NCAntiNue");
285  LOAD_SPECT(fNCNumuNumerator, "NCNumu");
286  LOAD_SPECT(fNCAntiNumuNumerator, "NCAntiNumu");
287  LOAD_SPECT(fNCDenominator, "AllNC");
288 
289  return ret;
290  }
std::unique_ptr< Spectrum > fNCNueNumerator
std::unique_ptr< Spectrum > fNCNumuNumerator
std::unique_ptr< Spectrum > fNCAntiNumuNumerator
std::unique_ptr< Spectrum > fNCDenominator
#define LOAD_SPECT(FIELD, LABEL)
ModularExtrapSterile(SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC, const Var &weight)
Sets up all components to use FD MC–internal use only.
TDirectory * dir
Definition: macro.C:5
std::unique_ptr< Spectrum > fNCAntiNueNumerator
static std::unique_ptr< ModularExtrap > LoadFrom(TDirectory *dir)
Spectrum ana::ModularExtrap::NCAntiComponent ( )
overridevirtualinherited

Implements ana::IExtrap.

Definition at line 936 of file ModularExtrap.cxx.

References ana::ModularExtrap::fNCAntiextrap.

Referenced by ana::ModularExtrap::NCTotalComponent().

937  {return fNCAntiextrap->Return().Unoscillated();}
std::unique_ptr< ModularExtrapComponent > fNCAntiextrap
Ratio ana::ModularExtrapSterile::NCAntiNueProportion ( ) const

Definition at line 242 of file ExtrapSterile.cxx.

References fNCAntiNueNumerator, and fNCDenominator.

Referenced by ana::PredictionSterile::PredictComponent().

242  {
243  return Ratio(*fNCAntiNueNumerator.get(), *fNCDenominator.get());
244  }
std::unique_ptr< Spectrum > fNCDenominator
std::unique_ptr< Spectrum > fNCAntiNueNumerator
Ratio ana::ModularExtrapSterile::NCAntiNumuProportion ( ) const

Definition at line 252 of file ExtrapSterile.cxx.

References fNCAntiNumuNumerator, and fNCDenominator.

Referenced by ana::PredictionSterile::PredictComponent().

252  {
253  return Ratio(*fNCAntiNumuNumerator.get(), *fNCDenominator.get());
254  }
std::unique_ptr< Spectrum > fNCAntiNumuNumerator
std::unique_ptr< Spectrum > fNCDenominator
Spectrum ana::ModularExtrap::NCComponent ( )
overridevirtualinherited

Implements ana::IExtrap.

Definition at line 933 of file ModularExtrap.cxx.

References ana::ModularExtrap::fNCextrap.

Referenced by ana::ModularExtrap::NCTotalComponent().

934  {return fNCextrap->Return().Unoscillated();}
std::unique_ptr< ModularExtrapComponent > fNCextrap
ModularExtrapSterile ana::ModularExtrapSterile::NCDisappearance ( Loaders loaders,
const IDecomp NCSurvDecomp,
const IDecomp NumuOscDecomp,
const HistAxis axis,
const HistAxis axisNumuND,
const Cut fdcut,
const Cut NCNDcut,
const Cut NumuNDcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
static

Creates a NC disappearance extrapolation.

NCSurvDecomp and NCNDcut are for survival components selected as NCs. NumuOscDecomp and NumuNDCut are for components oscillated from numus, which then get selected as NCs.

Definition at line 19 of file ExtrapSterile.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by AnaResultsLoad(), ExtendedAxesLoad(), ana::SterileGenerator::Generate(), MakeNus17Prediction(), MakeNusPrediction(), SideBandLoad(), sterile_demo(), SystsBirksLoad(), SystsCalibAbsLoad(), SystsCalibAbsLoad17(), SystsCalibAbsMethod17(), SystsCalibRelLoad(), SystsCalibRelLoad17(), SystsDecompLoad(), SystsDecompLoad17(), SystsGENIELoad(), SystsGENIELoad17(), SystsMCStatsLoad(), SystsNoiseLoad(), and SystsPPFXLoad17().

30  {
32  loaders.GetLoader(
34  loaders.GetLoader(
36  loaders.GetLoader(
38  loaders.GetLoader(
40  NCSurvDecomp,
41  NumuOscDecomp,
42  axis,
43  axisNumuND,
44  fdcut,
45  NCNDcut,
46  NumuNDcut,
47  shiftMC,
48  weight
49  );
50  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
std::vector< Loaders * > loaders
Definition: syst_header.h:385
static ModularExtrapSterile NCDisappearance(Loaders &loaders, const IDecomp &NCSurvDecomp, const IDecomp &NumuOscDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &NCNDcut, const Cut &NumuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Creates a NC disappearance extrapolation.
ModularExtrapSterile ana::ModularExtrapSterile::NCDisappearance ( SpectrumLoaderBase nearMCLoader,
SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const IDecomp NCSurvDecomp,
const IDecomp NumuOscDecomp,
const HistAxis axis,
const HistAxis axisNumuND,
const Cut fdcut,
const Cut NCNDcut,
const Cut NumuNDcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
static

Creates a NC disappearance extrapolation with individual spectrum loaders.

NCSurvDecomp and NCNDcut are for survival components selected as NCs. NumuOscDecomp and NumuNDCut are for components oscillated from numus, which then get selected as NCs.

Definition at line 53 of file ExtrapSterile.cxx.

References ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCextrap, ana::kIsAntiNu, ana::kIsBeamNue(), ana::kIsNC, ana::kIsNumuCC(), ana::kIsSig(), ana::NCtot, ana::nue, ana::numu, and ana::numubar.

67  {
68  // Initialize all components with NoReweights,
69  // make sure other objects exist
70  ModularExtrapSterile extrap(
71  farMCswap,
72  farMCnonswap,
73  farMCtauswap,
74  axis,
75  fdcut,
76  shiftMC,
77  weight
78  );
79 
80  // NC -> NC ----
81  extrap.fNCextrap = std::unique_ptr<ModularExtrapComponent>(
82  new RecoReweight(
83  nearMC, axis, fdcut, shiftMC, weight,
84  "NC -> NC", "NC #rightarrow NC",
85  NCNDcut, NCSurvDecomp, // NC selection in ND
86  DecompResult::NCtot, kIsNC, // NC truth in ND
87  farMCswap, kIsNC, // NC->NC in FD
88  farMCnonswap, farMCtauswap // extra NC stats
89  )
90  );
91 
92  // mu -> mu ----
93  extrap.fMMextrap = std::unique_ptr<ModularExtrapComponent>(
94  new RecoReweight(
95  nearMC, axis, fdcut, shiftMC, weight,
96  "mu -> mu", "#mu #rightarrow #mu",
97  NCNDcut, NCSurvDecomp, // NC selection in ND
98  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
99  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
100  )
101  );
102 
103  // mu -> e ----
104  extrap.fMEextrap = std::unique_ptr<ModularExtrapComponent>(
105  new TruthReweight(
106  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
107  "mu -> e", "#mu #rightarrow e",
108  NumuNDcut, NumuOscDecomp, // numu selection in ND
109  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
110  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
111  )
112  );
113  extrap.fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
114  new TruthReweight(
115  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
116  "mubar -> ebar", "#bar{#mu} #rightarrow #bar{e}",
117  NumuNDcut, NumuOscDecomp, // numu selection in ND
118  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
119  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
120  )
121  );
122 
123  // e -> e ----
124  extrap.fEEextrap = std::unique_ptr<ModularExtrapComponent>(
125  new RecoReweight(
126  nearMC, axis, fdcut, shiftMC, weight,
127  "e -> e", "e #rightarrow e",
128  NCNDcut, NCSurvDecomp, // NC selection in ND
129  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
130  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
131  )
132  );
133 
134  return extrap;
135  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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 .
ModularExtrapSterile(SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC, const Var &weight)
Sets up all components to use FD MC–internal use only.
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
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
Ratio ana::ModularExtrapSterile::NCNueProportion ( ) const

Return the proportion of NCs that originate as a given neutrino flavor/sign.

Definition at line 237 of file ExtrapSterile.cxx.

References fNCDenominator, and fNCNueNumerator.

Referenced by ana::PredictionSterile::PredictComponent().

237  {
238  return Ratio(*fNCNueNumerator.get(), *fNCDenominator.get());
239  }
std::unique_ptr< Spectrum > fNCNueNumerator
std::unique_ptr< Spectrum > fNCDenominator
Ratio ana::ModularExtrapSterile::NCNumuProportion ( ) const

Definition at line 247 of file ExtrapSterile.cxx.

References fNCDenominator, and fNCNumuNumerator.

Referenced by ana::PredictionSterile::PredictComponent().

247  {
248  return Ratio(*fNCNumuNumerator.get(), *fNCDenominator.get());
249  }
std::unique_ptr< Spectrum > fNCNumuNumerator
std::unique_ptr< Spectrum > fNCDenominator
Spectrum ana::ModularExtrapSterile::NCTotalComponent ( )
overridevirtual

Override the ModularExtrap method.

Implements ana::IExtrap.

Definition at line 232 of file ExtrapSterile.cxx.

References OscNCComponent(), and ana::OscillatableSpectrum::Unoscillated().

232  {
233  return OscNCComponent().Unoscillated();
234  }
OscillatableSpectrum OscNCComponent() const
Return the oscillatable NC component.
ModularExtrap ana::ModularExtrap::Nue ( Loaders loaders,
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 
)
staticinherited

Creates a nue-like extrapolation.

numuDecomp and numuNDCut are for the signal component (mu->e). nueDecomp and nueNDCut are for the backgound components.

Definition at line 14 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by ana::NuePropExtrapGenerator::Generate(), ana::NueComboExtrapGenerator::Generate(), make_nue_filesyst_pred(), make_nueFDprediction(), make_nueFDprediction_kinematics(), make_nueFDprediction_kinematics_FHC(), make_nueFDprediction_kinematics_FHC_REW(), make_nueFDprediction_kinematics_REW(), MichelDecompTest(), modularextrap_demo_nue(), test_micheldecomp(), and test_nueextrapsyst().

25  {
26  return ModularExtrap::Nue(
27  loaders.GetLoader(
29  loaders.GetLoader(
31  loaders.GetLoader(
33  loaders.GetLoader(
35  nueDecomp,
36  numuDecomp,
37  axis,
38  axisNumuND,
39  fdcut,
40  nueNDcut,
41  numuNDcut,
42  shiftMC,
43  weight
44  );
45  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
static ModularExtrap Nue(Loaders &loaders, 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)
Creates a nue-like extrapolation.
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ModularExtrap ana::ModularExtrap::Nue ( 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 
)
staticinherited

Creates a nue-like extrapolation with individual spectrum loaders.

numuDecomp and numuNDCut are for the signal component (mu->e). nueDecomp and nueNDCut are for the backgound components.

Definition at line 210 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCAntiextrap, ana::ModularExtrap::fNCextrap, ana::kIsAntiNu, ana::kIsBeamNue(), ana::kIsNC, ana::kIsNumuCC(), ana::kIsSig(), ana::NC, ana::NCbar, ana::nue, ana::numu, and ana::numubar.

224  {
225 
226  ModularExtrap extrap(
227  farMCswap,
228  farMCnonswap,
229  farMCtauswap,
230  axis,
231  fdcut,
232  shiftMC,
233  weight
234  );
235 
236  // mu -> mu ----
237  extrap.fMMextrap = std::unique_ptr<ModularExtrapComponent>(
238  new RecoReweight(
239  nearMC, axis, fdcut, shiftMC, weight,
240  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
241  nueNDcut, nueDecomp, // nue selection in ND
242  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
243  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
244  )
245  );
246 
247  // mu -> e ----
248  extrap.fMEextrap = std::unique_ptr<ModularExtrapComponent>(
249  new TruthReweight(
250  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
251  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
252  numuNDcut, numuDecomp, // numu selection in ND
253  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
254  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
255  )
256  );
257 
258  // mubar -> ebar
259  extrap.fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
260  new TruthReweight(
261  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
262  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
263  numuNDcut, numuDecomp, // numu selection in ND
264  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
265  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
266  )
267  );
268 
269 
270  // NC -> NC ----
271  extrap.fNCextrap = std::unique_ptr<ModularExtrapComponent>(
272  new RecoReweight(
273  nearMC, axis, fdcut, shiftMC, weight,
274  "NC -> NC", "NC #rightarrow NC",
275  nueNDcut, nueDecomp, // nue selection in ND
276  DecompResult::NC, kIsNC && !kIsAntiNu, // NC truth in ND
277  farMCswap, kIsNC && !kIsAntiNu, // NC->NC in FD
278  farMCnonswap, farMCtauswap // extra NC stats
279  )
280  );
281 
282  // NCAnti -> NCAnti ---
283  extrap.fNCAntiextrap = std::unique_ptr<ModularExtrapComponent>(
284  new RecoReweight(
285  nearMC, axis, fdcut, shiftMC, weight,
286  "NCbar -> NCbar", "NC bar #rightarrow NC bar",
287  nueNDcut, nueDecomp, // nue selection in ND
288  DecompResult::NCbar, kIsNC && kIsAntiNu, // NC Anti truth in ND
289  farMCswap, kIsNC && kIsAntiNu, // NC Anti->NC Anti in FD
290  farMCnonswap, farMCtauswap // extra NC Anti stats
291  )
292  );
293 
294 
295  // e -> e ----
296  extrap.fEEextrap = std::unique_ptr<ModularExtrapComponent>(
297  new RecoReweight(
298  nearMC, axis, fdcut, shiftMC, weight,
299  "e -> e", "#nu_{e} #rightarrow #nu_{e}",
300  nueNDcut, nueDecomp, // nue selection in ND
301  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
302  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
303  )
304  );
305 
306  return extrap;
307 
308  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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 .
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
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
OscillatableSpectrum ana::ModularExtrap::NueAppComponent ( )
overridevirtualinherited

Charged current electron neutrino appearance ( $\nu_\mu\to\nu_e$)

Implements ana::IExtrap.

Definition at line 921 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMEextrap.

922  {return fMEextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMEextrap
ModularExtrap ana::ModularExtrap::NueBkgd ( const bool  isRHC,
Loaders loaders,
const IDecomp nueDecomp,
const HistAxis axis,
const Cut fdcut,
const Cut nueNDcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
staticinherited

Creates a nue background-only extrapolation.

Definition at line 115 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by ana::NueBkgdComboExtrapGenerator::Generate(), and ana::NueBkgdPropExtrapGenerator::Generate().

124  {
125  return ModularExtrap::NueBkgd(
126  isRHC,
127  loaders.GetLoader(
129  loaders.GetLoader(
131  loaders.GetLoader(
133  loaders.GetLoader(
135  nueDecomp,
136  axis,
137  fdcut,
138  nueNDcut,
139  shiftMC,
140  weight
141  );
142  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
static ModularExtrap NueBkgd(const bool isRHC, Loaders &loaders, const IDecomp &nueDecomp, const HistAxis &axis, const Cut &fdcut, const Cut &nueNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Creates a nue background-only extrapolation.
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ModularExtrap ana::ModularExtrap::NueBkgd ( const bool  isRHC,
SpectrumLoaderBase nearMCLoader,
SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const IDecomp nueDecomp,
const HistAxis axis,
const Cut fdcut,
const Cut nueNDcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
staticinherited

Creates a nue background-only extrapolation.

Definition at line 525 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEAntiextrap, ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCAntiextrap, ana::ModularExtrap::fNCextrap, ana::kIsAntiNu, ana::kIsBeamNue(), ana::kIsNC, ana::kIsNumuCC(), ana::kIsSig(), ana::kNoCut, ana::NC, ana::NCbar, ana::nue, ana::nuebar, ana::numu, and ana::numubar.

537  {
538 
539  ModularExtrap extrap(
540  farMCswap,
541  farMCnonswap,
542  farMCtauswap,
543  axis,
544  fdcut,
545  shiftMC,
546  weight
547  );
548 
549  // Reset signal extrap comps to be empty
550  extrap.fMEextrap = std::unique_ptr<ModularExtrapComponent>(
551  new NoReweight(
552  farMCswap, axis, !kNoCut, shiftMC, weight, kIsSig && !kIsAntiNu ) );
553  extrap.fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
554  new NoReweight(
555  farMCswap, axis, !kNoCut, shiftMC, weight, kIsSig && kIsAntiNu ) );
556 
557  // mu -> mu ----
558  extrap.fMMextrap = std::unique_ptr<ModularExtrapComponent>(
559  new RecoReweight(
560  nearMC, axis, fdcut, shiftMC, weight,
561  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
562  nueNDcut, nueDecomp, // nue selection in ND
563  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
564  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
565  )
566  );
567  // mubar -> mubar ---
568  if ( isRHC ) {
569  extrap.fMMAntiextrap = std::unique_ptr<ModularExtrapComponent>(
570  new RecoReweight(
571  nearMC, axis, fdcut, shiftMC, weight,
572  "mubar -> mubar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{#mu}",
573  nueNDcut, nueDecomp, // nue selection in ND
574  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numu truth in ND
575  farMCnonswap, kIsNumuCC && kIsAntiNu // mu->mu in FD
576  )
577  );
578  }
579  // NC -> NC ----
580  extrap.fNCextrap = std::unique_ptr<ModularExtrapComponent>(
581  new RecoReweight(
582  nearMC, axis, fdcut, shiftMC, weight,
583  "NC -> NC", "NC #rightarrow NC",
584  nueNDcut, nueDecomp, // nue selection in ND
585  DecompResult::NC, kIsNC && !kIsAntiNu, // NC truth in ND
586  farMCswap, kIsNC && !kIsAntiNu, // NC->NC in FD
587  farMCnonswap, farMCtauswap // extra NC stats
588  )
589  );
590  // NC Anti -> NC Anti ---
591  extrap.fNCAntiextrap = std::unique_ptr<ModularExtrapComponent>(
592  new RecoReweight(
593  nearMC, axis, fdcut, shiftMC, weight,
594  "NCbar -> NCbar", "NC bar #rightarrow NC bar",
595  nueNDcut, nueDecomp, // nue selection in ND
596  DecompResult::NCbar, kIsNC && kIsAntiNu, // NC truth in ND
597  farMCswap, kIsNC && kIsAntiNu, // NC->NC in FD
598  farMCnonswap, farMCtauswap // extra NC stats
599  )
600  );
601  // e -> e ----
602  extrap.fEEextrap = std::unique_ptr<ModularExtrapComponent>(
603  new RecoReweight(
604  nearMC, axis, fdcut, shiftMC, weight,
605  "e -> e", "#nu_{e} #rightarrow #nu_{e}",
606  nueNDcut, nueDecomp, // nue selection in ND
607  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
608  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
609  )
610  );
611  // ebar -> ebar ---
612  if ( isRHC ) {
613  extrap.fEEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
614  new RecoReweight(
615  nearMC, axis, fdcut, shiftMC, weight,
616  "ebar -> ebar", "#bar{#nu}_{e} #rightarrow #bar{#nu}_{e}",
617  nueNDcut, nueDecomp, // nue selection in ND
618  DecompResult::nuebar, kIsBeamNue && kIsAntiNu, // nue truth in ND
619  farMCnonswap, kIsBeamNue && kIsAntiNu // e->e in FD
620  )
621  );
622  }
623 
624  return extrap;
625  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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 .
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
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:117
ModularExtrap ana::ModularExtrap::NueFlux ( Loaders loaders,
const FluxDecomp 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 
)
staticinherited

Definition at line 146 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

157  {
158  return ModularExtrap::NueFlux(
159  loaders.GetLoader(
161  loaders.GetLoader(
163  loaders.GetLoader(
165  loaders.GetLoader(
167  nueDecomp,
168  numuDecomp,
169  axis,
170  axisNumuND,
171  fdcut,
172  nueNDcut,
173  numuNDcut,
174  shiftMC,
175  weight
176  );
177  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
static ModularExtrap NueFlux(Loaders &loaders, const FluxDecomp &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)
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ModularExtrap ana::ModularExtrap::NueFlux ( SpectrumLoaderBase nearMCLoader,
SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const FluxDecomp 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 
)
staticinherited

Creates a nue-like extrapolation for RHC mode.

Definition at line 310 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEAntiextrap, ana::kIsAntiNu, ana::kIsBeamNue(), and ana::ModularExtrap::NueRHC().

324  {
326  nearMC,
327  farMCswap,
328  farMCnonswap,
329  farMCtauswap,
330  nueDecomp,
331  numuDecomp,
332  axis,
333  axisNumuND,
334  fdcut,
335  nueNDcut,
336  numuNDcut,
337  shiftMC,
338  weight
339  );
340 
341  extrap.fEEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
342  new FluxReweight(
343  nearMC, axis, fdcut, shiftMC, weight,
344  "ebar -> ebar", "#bar{#nu}_{e} #rightarrow #bar{#nu}_{e}",
345  nueNDcut, nueDecomp, // nue selection in ND
346  farMCnonswap, kIsBeamNue && kIsAntiNu // e->e in FD
347  )
348  );
349  return extrap;
350  }
const Var weight
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 .
static ModularExtrap NueRHC(Loaders &loaders, 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)
Creates a nue-like extrapolation for RHC mode.
ModularExtrap ana::ModularExtrap::NueRHC ( Loaders loaders,
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 
)
staticinherited

Creates a nue-like extrapolation for RHC mode.

Definition at line 49 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by ana::NuePropExtrapRHCGenerator::Generate(), make_nueFDprediction_kinematics_RHC(), make_nueFDprediction_kinematics_RHC_REW(), and ana::ModularExtrap::NueFlux().

60  {
61  return ModularExtrap::NueRHC(
62  loaders.GetLoader(
64  loaders.GetLoader(
66  loaders.GetLoader(
68  loaders.GetLoader(
70  nueDecomp,
71  numuDecomp,
72  axis,
73  axisNumuND,
74  fdcut,
75  nueNDcut,
76  numuNDcut,
77  shiftMC,
78  weight
79  );
80  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
static ModularExtrap NueRHC(Loaders &loaders, 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)
Creates a nue-like extrapolation for RHC mode.
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ModularExtrap ana::ModularExtrap::NueRHC ( 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 
)
staticinherited

Creates a nue-like extrapolation for RHC mode.

Definition at line 353 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEAntiextrap, ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCAntiextrap, ana::ModularExtrap::fNCextrap, ana::kIsAntiNu, ana::kIsBeamNue(), ana::kIsNC, ana::kIsNumuCC(), ana::kIsSig(), ana::NC, ana::NCbar, ana::nue, ana::nuebar, ana::numu, and ana::numubar.

367  {
368 
369  ModularExtrap extrap(
370  farMCswap,
371  farMCnonswap,
372  farMCtauswap,
373  axis,
374  fdcut,
375  shiftMC,
376  weight
377  );
378  // mu -> mu ----
379  extrap.fMMextrap = std::unique_ptr<ModularExtrapComponent>(
380  new RecoReweight(
381  nearMC, axis, fdcut, shiftMC, weight,
382  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
383  nueNDcut, nueDecomp, // nue selection in ND
384  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
385  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
386  )
387  );
388  // mubar -> mubar ---
389  extrap.fMMAntiextrap = std::unique_ptr<ModularExtrapComponent>(
390  new RecoReweight(
391  nearMC, axis, fdcut, shiftMC, weight,
392  "mubar -> mubar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{#mu}",
393  nueNDcut, nueDecomp, // nue selection in ND
394  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numu truth in ND
395  farMCnonswap, kIsNumuCC && kIsAntiNu // mu->mu in FD
396  )
397  );
398 
399  // mu -> e ----
400  extrap.fMEextrap = std::unique_ptr<ModularExtrapComponent>(
401  new TruthReweight(
402  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
403  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
404  numuNDcut, numuDecomp, // numu selection in ND
405  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
406  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
407  )
408  );
409  // mubar -> ebar
410  extrap.fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
411  new TruthReweight(
412  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
413  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
414  numuNDcut, numuDecomp, // numu selection in ND
415  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
416  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
417  )
418  );
419 
420  // NC -> NC ----
421  extrap.fNCextrap = std::unique_ptr<ModularExtrapComponent>(
422  new RecoReweight(
423  nearMC, axis, fdcut, shiftMC, weight,
424  "NC -> NC", "NC #rightarrow NC",
425  nueNDcut, nueDecomp, // nue selection in ND
426  DecompResult::NC, kIsNC && !kIsAntiNu, // NC truth in ND
427  farMCswap, kIsNC && !kIsAntiNu, // NC->NC in FD
428  farMCnonswap, farMCtauswap // extra NC stats
429  )
430  );
431  // NC Anti -> NC Anti ---
432  extrap.fNCAntiextrap = std::unique_ptr<ModularExtrapComponent>(
433  new RecoReweight(
434  nearMC, axis, fdcut, shiftMC, weight,
435  "NCbar -> NCbar", "NC bar #rightarrow NC bar",
436  nueNDcut, nueDecomp, // nue selection in ND
437  DecompResult::NCbar, kIsNC && kIsAntiNu, // NC truth in ND
438  farMCswap, kIsNC && kIsAntiNu, // NC->NC in FD
439  farMCnonswap, farMCtauswap // extra NC stats
440  )
441  );
442 
443  // e -> e ----
444  extrap.fEEextrap = std::unique_ptr<ModularExtrapComponent>(
445  new RecoReweight(
446  nearMC, axis, fdcut, shiftMC, weight,
447  "e -> e", "#nu_{e} #rightarrow #nu_{e}",
448  nueNDcut, nueDecomp, // nue selection in ND
449  DecompResult::nue, kIsBeamNue && !kIsAntiNu, // nue truth in ND
450  farMCnonswap, kIsBeamNue && !kIsAntiNu // e->e in FD
451  )
452  );
453 
454  // ebar -> ebar ---
455  extrap.fEEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
456  new RecoReweight(
457  nearMC, axis, fdcut, shiftMC, weight,
458  "ebar -> ebar", "#bar{#nu}_{e} #rightarrow #bar{#nu}_{e}",
459  nueNDcut, nueDecomp, // nue selection in ND
460  DecompResult::nuebar, kIsBeamNue && kIsAntiNu, // nue truth in ND
461  farMCnonswap, kIsBeamNue && kIsAntiNu // e->e in FD
462  )
463  );
464 
465  return extrap;
466 
467  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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 .
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
const Cut kIsSig(CCFlavSel(12, 14))
Select CC .
ModularExtrap ana::ModularExtrap::NueSignal ( Loaders loaders,
const IDecomp numuDecomp,
const HistAxis axis,
const HistAxis axisNumuND,
const Cut fdcut,
const Cut numuNDcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
staticinherited

Creates a nue signal-only extrapolation.

Definition at line 84 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by ana::NueSignalExtrapGenerator::Generate().

93  {
95  loaders.GetLoader(
97  loaders.GetLoader(
99  loaders.GetLoader(
101  loaders.GetLoader(
103  numuDecomp,
104  axis,
105  axisNumuND,
106  fdcut,
107  numuNDcut,
108  shiftMC,
109  weight
110  );
111  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
std::vector< Loaders * > loaders
Definition: syst_header.h:385
static ModularExtrap NueSignal(Loaders &loaders, const IDecomp &numuDecomp, const HistAxis &axis, const HistAxis &axisNumuND, const Cut &fdcut, const Cut &numuNDcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Creates a nue signal-only extrapolation.
ModularExtrap ana::ModularExtrap::NueSignal ( 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 
)
staticinherited

Creates a nue signal-only extrapolation.

Definition at line 471 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::kIsAntiNu, ana::kIsNumuCC(), ana::kIsSig(), ana::kNoCut, ana::numu, and ana::numubar.

483  {
484 
485  ModularExtrap extrap(
486  farMCswap,
487  farMCnonswap,
488  farMCtauswap,
489  axis,
490  // Need background extrap comps to be empty
491  // First set all comps to be empty
492  // Then reset signal comps below
493  !kNoCut, //fdcut,
494  shiftMC,
495  weight
496  );
497 
498  // mu -> e ----
499  extrap.fMEextrap = std::unique_ptr<ModularExtrapComponent>(
500  new TruthReweight(
501  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
502  "mu -> e", "#nu_{#mu} #rightarrow #nu_{e}",
503  numuNDcut, numuDecomp, // numu selection in ND
504  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
505  farMCswap, kIsSig && !kIsAntiNu // mu->e in FD
506  )
507  );
508  // mubar -> ebar
509  extrap.fMEAntiextrap = std::unique_ptr<ModularExtrapComponent>(
510  new TruthReweight(
511  nearMC, axis, axisNumuND, fdcut, shiftMC, weight,
512  "mubar -> ebar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{e}",
513  numuNDcut, numuDecomp, // numu selection in ND
514  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
515  farMCswap, kIsSig && kIsAntiNu // mubar->ebar in FD
516  )
517  );
518 
519  return extrap;
520 
521  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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 kIsSig(CCFlavSel(12, 14))
Select CC .
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
Definition: Cut.h:117
OscillatableSpectrum ana::ModularExtrap::NueSurvComponent ( )
overridevirtualinherited

Charged current electron neutrino survival ( $\nu_e\to\nu_e$)

Implements ana::IExtrap.

Definition at line 909 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEextrap.

910  {return fEEextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fEEextrap
ModularExtrap ana::ModularExtrap::Numu ( Loaders loaders,
const IDecomp numuDecomp,
const HistAxis axis,
const Cut fdcut,
const Cut ndcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
staticinherited

Creates a numu-like extrapolation.

Definition at line 181 of file ModularExtrap.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

Referenced by ana::NumuExtrapGenerator::Generate(), and modularextrap_demo_numu().

189  {
190  return ModularExtrap::Numu(
191  loaders.GetLoader(
193  loaders.GetLoader(
195  loaders.GetLoader(
197  loaders.GetLoader(
199  numuDecomp,
200  axis,
201  fdcut,
202  ndcut,
203  shiftMC,
204  weight
205  );
206  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
static ModularExtrap Numu(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.
std::vector< Loaders * > loaders
Definition: syst_header.h:385
ModularExtrap ana::ModularExtrap::Numu ( SpectrumLoaderBase nearMCLoader,
SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const IDecomp numuDecomp,
const HistAxis axis,
const Cut fdcut,
const Cut ndcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
staticinherited

Creates a numu-like extrapolation with individual spectrum loaders.

Definition at line 629 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, ana::kIsAntiNu, ana::kIsNumuCC(), ana::numu, and ana::numubar.

640  {
641 
642  ModularExtrap extrap(
643  farMCswap,
644  farMCnonswap,
645  farMCtauswap,
646  axis,
647  fdcut,
648  shiftMC,
649  weight
650  );
651 
652  // mu -> mu ----
653  extrap.fMMextrap = std::unique_ptr<ModularExtrapComponent>(
654  new TruthReweight(
655  nearMC, axis, axis, fdcut, shiftMC, weight,
656  "mu -> mu", "#nu_{#mu} #rightarrow #nu_{#mu}",
657  numuNDcut, numuDecomp, // numu selection in ND
658  DecompResult::numu, kIsNumuCC && !kIsAntiNu, // numu truth in ND
659  farMCnonswap, kIsNumuCC && !kIsAntiNu // mu->mu in FD
660  )
661  );
662  // mubar -> mubar ---
663  extrap.fMMAntiextrap = std::unique_ptr<ModularExtrapComponent>(
664  new TruthReweight(
665  nearMC, axis, axis, fdcut, shiftMC, weight,
666  "mubar -> mubar", "#bar{#nu}_{#mu} #rightarrow #bar{#nu}_{#mu}",
667  numuNDcut, numuDecomp, // numu selection in ND
668  DecompResult::numubar, kIsNumuCC && kIsAntiNu, // numubar truth in ND
669  farMCnonswap, kIsNumuCC && kIsAntiNu // mubar->mubar in FD
670  )
671  );
672 
673  return extrap;
674 
675  }
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
const Var weight
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
OscillatableSpectrum ana::ModularExtrap::NumuAppComponent ( )
overridevirtualinherited

Charged current muon neutrino appearance ( $\nu_e\to\nu_\mu$)

Implements ana::IExtrap.

Definition at line 927 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEMextrap.

928  {return fEMextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fEMextrap
OscillatableSpectrum ana::ModularExtrap::NumuSurvComponent ( )
overridevirtualinherited

Charged current muon neutrino survival ( $\nu_\mu\to\nu_\mu$)

Implements ana::IExtrap.

Definition at line 915 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMMextrap.

916  {return fMMextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMMextrap
ModularExtrapSterile& ana::ModularExtrapSterile::operator= ( const ModularExtrapSterile )
delete
ModularExtrapSterile& ana::ModularExtrapSterile::operator= ( ModularExtrapSterile &&  )
default
OscillatableSpectrum ana::ModularExtrapSterile::OscNCComponent ( ) const

Return the oscillatable NC component.

Definition at line 227 of file ExtrapSterile.cxx.

References ana::ModularExtrap::fNCextrap.

Referenced by NCTotalComponent(), and ana::PredictionSterile::PredictComponent().

227  {
228  return fNCextrap->Return();
229  }
std::unique_ptr< ModularExtrapComponent > fNCextrap
void ana::ModularExtrap::SavePlotsNue ( TDirectory *  dir,
double  potFD 
) const
inherited

Definition at line 709 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCTotalextrap, and tmp.

Referenced by modularextrap_demo_nue().

710  {
711  TDirectory* tmp = gDirectory;
712  dir->cd();
713  fMEextrap->SavePlots( dir->mkdir("MEextrap"), potFD );
714  fMEAntiextrap->SavePlots( dir->mkdir("MEAntiextrap"), potFD );
715  fEEextrap->SavePlots( dir->mkdir("EEextrap"), potFD );
716  fMMextrap->SavePlots( dir->mkdir("MMextrap"), potFD );
717  fNCTotalextrap->SavePlots( dir->mkdir("NCTotalextrap"), potFD );
718  tmp->cd();
719  }
std::unique_ptr< ModularExtrapComponent > fMMextrap
std::unique_ptr< ModularExtrapComponent > fMEextrap
Float_t tmp
Definition: plot.C:36
std::unique_ptr< ModularExtrapComponent > fNCTotalextrap
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
TDirectory * dir
Definition: macro.C:5
std::unique_ptr< ModularExtrapComponent > fEEextrap
void ana::ModularExtrap::SavePlotsNueRHC ( TDirectory *  dir,
double  potFD 
) const
inherited

Definition at line 723 of file ModularExtrap.cxx.

References ana::ModularExtrap::fEEAntiextrap, ana::ModularExtrap::fEEextrap, ana::ModularExtrap::fMEAntiextrap, ana::ModularExtrap::fMEextrap, ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, ana::ModularExtrap::fNCAntiextrap, ana::ModularExtrap::fNCextrap, and tmp.

724  {
725  TDirectory* tmp = gDirectory;
726  dir->cd();
727  fMEextrap->SavePlots( dir->mkdir("MEextrap"), potFD );
728  fMEAntiextrap->SavePlots( dir->mkdir("MEAntiextrap"), potFD );
729  fEEextrap->SavePlots( dir->mkdir("EEextrap"), potFD );
730  fEEAntiextrap->SavePlots( dir->mkdir("EEAntiextrap"), potFD );
731  fMMextrap->SavePlots( dir->mkdir("MMextrap"), potFD );
732  fMMAntiextrap->SavePlots( dir->mkdir("MMAntiextrap"), potFD );
733  fNCextrap->SavePlots( dir->mkdir("NCextrap"), potFD );
734  fNCAntiextrap->SavePlots( dir->mkdir("NCAntiextrap"), potFD );
735  tmp->cd();
736  }
std::unique_ptr< ModularExtrapComponent > fMMextrap
std::unique_ptr< ModularExtrapComponent > fMEextrap
Float_t tmp
Definition: plot.C:36
std::unique_ptr< ModularExtrapComponent > fNCextrap
std::unique_ptr< ModularExtrapComponent > fMEAntiextrap
std::unique_ptr< ModularExtrapComponent > fEEAntiextrap
std::unique_ptr< ModularExtrapComponent > fNCAntiextrap
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
TDirectory * dir
Definition: macro.C:5
std::unique_ptr< ModularExtrapComponent > fEEextrap
void ana::ModularExtrap::SavePlotsNumu ( TDirectory *  dir,
double  potFD 
) const
inherited

Definition at line 740 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMMAntiextrap, ana::ModularExtrap::fMMextrap, and tmp.

Referenced by make_extrap_figure_hists(), and modularextrap_demo_numu().

741  {
742  TDirectory* tmp = gDirectory;
743  dir->cd();
744  fMMextrap->SavePlots( dir->mkdir("MMextrap"), potFD );
745  fMMAntiextrap->SavePlots( dir->mkdir("MMAntiextrap"), potFD );
746  tmp->cd();
747  }
std::unique_ptr< ModularExtrapComponent > fMMextrap
Float_t tmp
Definition: plot.C:36
std::unique_ptr< ModularExtrapComponent > fMMAntiextrap
TDirectory * dir
Definition: macro.C:5
void ana::ModularExtrapSterile::SaveTo ( TDirectory *  dir) const
overridevirtual

Reimplemented from ana::IExtrap.

Definition at line 257 of file ExtrapSterile.cxx.

References fNCAntiNueNumerator, fNCAntiNumuNumerator, fNCDenominator, fNCNueNumerator, fNCNumuNumerator, ana::ModularExtrap::SaveTo(), and tmp.

Referenced by MakeNus17Prediction(), and MakeNusPrediction().

257  {
258  TDirectory* tmp = gDirectory;
259 
261 
262  dir->cd();
263  TObjString("ModularExtrapSterile").Write("type", TObject::kOverwrite);
264 
265  fNCNueNumerator->SaveTo(dir->mkdir("NCNue"));
266  fNCAntiNueNumerator->SaveTo(dir->mkdir("NCAntiNue"));
267  fNCNumuNumerator->SaveTo(dir->mkdir("NCNumu"));
268  fNCAntiNumuNumerator->SaveTo(dir->mkdir("NCAntiNumu"));
269  fNCDenominator->SaveTo(dir->mkdir("AllNC"));
270 
271  tmp->cd();
272  }
std::unique_ptr< Spectrum > fNCNueNumerator
std::unique_ptr< Spectrum > fNCNumuNumerator
std::unique_ptr< Spectrum > fNCAntiNumuNumerator
Float_t tmp
Definition: plot.C:36
std::unique_ptr< Spectrum > fNCDenominator
void SaveTo(TDirectory *dir) const override
TDirectory * dir
Definition: macro.C:5
std::unique_ptr< Spectrum > fNCAntiNueNumerator
OscillatableSpectrum ana::ModularExtrap::TauFromEComponent ( )
overridevirtualinherited

Charged current tau neutrino appearance from electron neutrino ( $\nu_e\to\nu_\tau$)

Implements ana::IExtrap.

Definition at line 948 of file ModularExtrap.cxx.

References ana::ModularExtrap::fETextrap.

949  {return fETextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fETextrap
OscillatableSpectrum ana::ModularExtrap::TauFromMuComponent ( )
overridevirtualinherited

Charged current tau neutrino appearance from muon neutrino ( $\nu_\mu\to\nu_\tau$)

Implements ana::IExtrap.

Definition at line 942 of file ModularExtrap.cxx.

References ana::ModularExtrap::fMTextrap.

943  {return fMTextrap->Return();}
std::unique_ptr< ModularExtrapComponent > fMTextrap
ModularExtrapSterile ana::ModularExtrapSterile::TrivialExtrapNC ( Loaders loaders,
const HistAxis axis,
const Cut fdcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
static

Creates a NC disappearance "extrapolation" by returning FD MC.

Definition at line 138 of file ExtrapSterile.cxx.

References allInOneTrainingPlots::axis, ana::Loaders::GetLoader(), ana::kBeam, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::weight.

144  {
146  loaders.GetLoader(
148  loaders.GetLoader(
150  loaders.GetLoader(
152  axis,
153  fdcut,
154  shiftMC,
155  weight
156  );
157  }
Far Detector at Ash River.
Definition: SREnums.h:11
const Var weight
std::vector< Loaders * > loaders
Definition: syst_header.h:385
static ModularExtrapSterile TrivialExtrapNC(Loaders &loaders, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC=kNoShift, const Var &weight=kUnweighted)
Creates a NC disappearance "extrapolation" by returning FD MC.
ModularExtrapSterile ana::ModularExtrapSterile::TrivialExtrapNC ( SpectrumLoaderBase farMCswapLoader,
SpectrumLoaderBase farMCnonswapLoader,
SpectrumLoaderBase farMCtauswapLoader,
const HistAxis axis,
const Cut fdcut,
const SystShifts shiftMC = kNoShift,
const Var weight = kUnweighted 
)
static

Creates a NC disappearance "extrapolation" by returning FD MC, using individual SpectrumLoaders

Definition at line 160 of file ExtrapSterile.cxx.

168  {
169  // Initialize all components with NoReweights,
170  // make sure other objects exist
171  ModularExtrapSterile extrap(
172  farMCswap,
173  farMCnonswap,
174  farMCtauswap,
175  axis,
176  fdcut,
177  shiftMC,
178  weight
179  );
180 
181  return extrap;
182  }
const Var weight
ModularExtrapSterile(SpectrumLoaderBase &farMCswapLoader, SpectrumLoaderBase &farMCnonswapLoader, SpectrumLoaderBase &farMCtauswapLoader, const HistAxis &axis, const Cut &fdcut, const SystShifts &shiftMC, const Var &weight)
Sets up all components to use FD MC–internal use only.

Member Data Documentation

std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fEEAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fEEextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fEMAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fEMextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fETAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fETextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMEAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMEextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMMAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMMextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMTAntiextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fMTextrap
protectedinherited
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fNCAntiextrap
protectedinherited
std::unique_ptr<Spectrum> ana::ModularExtrapSterile::fNCAntiNueNumerator
protected

Definition at line 124 of file ExtrapSterile.h.

Referenced by LoadFrom(), NCAntiNueProportion(), and SaveTo().

std::unique_ptr<Spectrum> ana::ModularExtrapSterile::fNCAntiNumuNumerator
protected

Definition at line 126 of file ExtrapSterile.h.

Referenced by LoadFrom(), NCAntiNumuProportion(), and SaveTo().

std::unique_ptr<Spectrum> ana::ModularExtrapSterile::fNCDenominator
protected
std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fNCextrap
protectedinherited
std::unique_ptr<Spectrum> ana::ModularExtrapSterile::fNCNueNumerator
protected

Definition at line 123 of file ExtrapSterile.h.

Referenced by LoadFrom(), NCNueProportion(), and SaveTo().

std::unique_ptr<Spectrum> ana::ModularExtrapSterile::fNCNumuNumerator
protected

Definition at line 125 of file ExtrapSterile.h.

Referenced by LoadFrom(), NCNumuProportion(), and SaveTo().

std::unique_ptr<ModularExtrapComponent> ana::ModularExtrap::fNCTotalextrap
protectedinherited

The documentation for this class was generated from the following files: