Public Member Functions | Private Member Functions | Private Attributes | List of all members
ana::xsec::UnfoldingVariable Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-25/NDAna/numucc_inc/UnfoldingVariable.h"

Public Member Functions

 UnfoldingVariable (ana::SpectrumLoaderBase *l, const ana::NuTruthHistAxis *th, const ana::HistAxis *rh, const ana::Cut *sc, const ana::NuTruthCut *tc, const ana::SystShifts *s, const ana::NuTruthVar *tw)
 Basic constructor. Require all variables for proper unfolding / xsec from fLoader loader. More...
 
void SaveSpectrums (TDirectory *d)
 Save each necessary Spectrum to its own subfolder of dir. More...
 

Private Member Functions

void CreateSpectrums ()
 Construct all necessary Spectrums for proper xsec unfolding. More...
 

Private Attributes

std::pair< ana::Spectrum *, ana::Spectrum * > fEff
 Efficiency object. More...
 
ana::SpectrumfMCSig
 Selected signal Spectrum in true variables. More...
 
ana::SpectrumfMCSigNuTrue
 NuTruth Signal Spectrum in true variables. More...
 
ana::SpectrumfMCSel_Reco
 Selection Spectrum in reco variables. More...
 
ana::SpectrumfMCSig_Reco
 Selected signal Spectrum in reco variables. More...
 
ana::ReweightableSpectrumfRecoTrue
 Unfolding matrix. More...
 
ana::TrivialBkgdEstimatorfBkg
 Background Estimator. More...
 
ana::IBkgdEstimatorfBkgdEst
 Parent object for background estimator (so we store as the parent class) More...
 
SpectrumLoaderBasefLoader
 Spectrum fLoader. More...
 
const ana::NuTruthHistAxisfTrueHistAxisST
 True HistAxis. More...
 
const ana::HistAxisfRecoHistAxis
 Reco HistAxis. More...
 
const ana::CutfSelectionCut
 Selection cuts. More...
 
const ana::NuTruthCutfTruthCutST
 Signal cut. More...
 
const ana::SystShiftsfShifts
 Shifts to apply. More...
 
const ana::NuTruthVarfWeightST
 Weights to apply. More...
 
ana::HistAxisfTrueHistAxis
 True HistAxis (constructed from NuTruthHistAxis) More...
 
ana::CutfTruthCut
 Signal Cut (constructed from NuTruthCut) More...
 
ana::VarfWeight
 Weightts to apply (constructed from NuTruthVar) More...
 

Detailed Description

Definition at line 28 of file UnfoldingVariable.h.

Constructor & Destructor Documentation

ana::xsec::UnfoldingVariable::UnfoldingVariable ( ana::SpectrumLoaderBase l,
const ana::NuTruthHistAxis th,
const ana::HistAxis rh,
const ana::Cut sc,
const ana::NuTruthCut tc,
const ana::SystShifts s,
const ana::NuTruthVar tw 
)

Basic constructor. Require all variables for proper unfolding / xsec from fLoader loader.

Immediately prepare the Spectrums

Definition at line 65 of file UnfoldingVariable.h.

References CreateSpectrums().

66  : fLoader(loader),
67  fTrueHistAxisST(truehist),
68  fRecoHistAxis(recohist),
69  fSelectionCut(selectCut),
70  fTruthCutST(truthCut),
71  fShifts(shifts),
72  fWeightST(trueWeight),
76 {
77  CreateSpectrums(); /// Immediately prepare the Spectrums
78 };
const ana::NuTruthCut * fTruthCutST
Signal cut.
const ana::Cut * fSelectionCut
Selection cuts.
ana::Var * fWeight
Weightts to apply (constructed from NuTruthVar)
const ana::HistAxis * fRecoHistAxis
Reco HistAxis.
SpectrumLoaderBase * fLoader
Spectrum fLoader.
const ana::NuTruthVar * fWeightST
Weights to apply.
void CreateSpectrums()
Construct all necessary Spectrums for proper xsec unfolding.
const ana::SystShifts * fShifts
Shifts to apply.
HistAxis HistAxisFromNuTruthHistAxis(NuTruthHistAxis ntha, double _default)
Definition: HistAxis.cxx:9
loader
Definition: demo0.py:10
ana::HistAxis * fTrueHistAxis
True HistAxis (constructed from NuTruthHistAxis)
Var VarFromNuTruthVar(const NuTruthVar &stv, double _default)
Definition: Var.cxx:7
ana::Cut * fTruthCut
Signal Cut (constructed from NuTruthCut)
Cut CutFromNuTruthCut(const NuTruthCut &stc)
Definition: Cut.cxx:7
const ana::NuTruthHistAxis * fTrueHistAxisST
True HistAxis.

Member Function Documentation

void ana::xsec::UnfoldingVariable::CreateSpectrums ( )
private

Construct all necessary Spectrums for proper xsec unfolding.

Definition at line 81 of file UnfoldingVariable.h.

References ana::Efficiency(), fBkg, fBkgdEst, fEff, fLoader, fMCSel_Reco, fMCSig, fMCSig_Reco, fMCSigNuTrue, fRecoHistAxis, fRecoTrue, fSelectionCut, fShifts, fTrueHistAxis, fTrueHistAxisST, fTruthCut, fTruthCutST, fWeight, and fWeightST.

Referenced by UnfoldingVariable().

81  {
82  const std::vector<Cut> bkgdCuts = {!(*(fTruthCut))};
83 
84  // Construct the core objects
91  // Construct the last few pointers from existing objects
92  fMCSig = fEff.first;
93  fMCSigNuTrue = fEff.second;
94  fBkgdEst = fBkg;
95 };
const ana::NuTruthCut * fTruthCutST
Signal cut.
ana::ReweightableSpectrum * fRecoTrue
Unfolding matrix.
ana::Spectrum * fMCSel_Reco
Selection Spectrum in reco variables.
const ana::Cut * fSelectionCut
Selection cuts.
ana::Var * fWeight
Weightts to apply (constructed from NuTruthVar)
Spectrum with the value of a second variable, allowing for reweighting
ana::Spectrum * fMCSig
Selected signal Spectrum in true variables.
ana::IBkgdEstimator * fBkgdEst
Parent object for background estimator (so we store as the parent class)
const ana::HistAxis * fRecoHistAxis
Reco HistAxis.
ana::Spectrum * fMCSig_Reco
Selected signal Spectrum in reco variables.
SpectrumLoaderBase * fLoader
Spectrum fLoader.
const ana::NuTruthVar * fWeightST
Weights to apply.
const ana::SystShifts * fShifts
Shifts to apply.
ana::TrivialBkgdEstimator * fBkg
Background Estimator.
std::vector< float > Spectrum
Definition: Constants.h:610
std::pair< ana::Spectrum *, ana::Spectrum * > fEff
Efficiency object.
std::pair< Spectrum *, Spectrum * > Efficiency(SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const Cut &seln, const NuTruthCut &truthSeln, const SystShifts &shift, const NuTruthVar &weight)
Definition: Efficiency.cxx:10
ana::Spectrum * fMCSigNuTrue
NuTruth Signal Spectrum in true variables.
ana::HistAxis * fTrueHistAxis
True HistAxis (constructed from NuTruthHistAxis)
Just return the MC prediction for the background.
ana::Cut * fTruthCut
Signal Cut (constructed from NuTruthCut)
const ana::NuTruthHistAxis * fTrueHistAxisST
True HistAxis.
void ana::xsec::UnfoldingVariable::SaveSpectrums ( TDirectory *  d)

Save each necessary Spectrum to its own subfolder of dir.

Definition at line 98 of file UnfoldingVariable.h.

References fBkgdEst, fMCSel_Reco, fMCSig, fMCSig_Reco, fMCSigNuTrue, fRecoTrue, ana::SaveTo(), and ana::Spectrum::SaveTo().

Referenced by specprod_numuccinc(), and specprod_systematics().

98  {
99  fMCSig-> SaveTo(dir->mkdir("MCSig"));
100  fMCSigNuTrue->SaveTo(dir->mkdir("MCSigNuTrue"));
101  fMCSel_Reco-> SaveTo(dir->mkdir("MCSel_Reco"));
102  fMCSig_Reco-> SaveTo(dir->mkdir("MCSig_Reco"));
103  fBkgdEst-> SaveTo(dir->mkdir("BkgdEst"));
104  fRecoTrue-> SaveTo(dir->mkdir("RecoTrue"));
105 };
void SaveTo(const osc::IOscCalc &x, TDirectory *dir, const std::string &name)
ana::ReweightableSpectrum * fRecoTrue
Unfolding matrix.
ana::Spectrum * fMCSel_Reco
Selection Spectrum in reco variables.
ana::Spectrum * fMCSig
Selected signal Spectrum in true variables.
ana::IBkgdEstimator * fBkgdEst
Parent object for background estimator (so we store as the parent class)
ana::Spectrum * fMCSig_Reco
Selected signal Spectrum in reco variables.
void SaveTo(TDirectory *dir, const std::string &name) const
Definition: Spectrum.cxx:506
ana::Spectrum * fMCSigNuTrue
NuTruth Signal Spectrum in true variables.
TDirectory * dir
Definition: macro.C:5

Member Data Documentation

ana::TrivialBkgdEstimator* ana::xsec::UnfoldingVariable::fBkg
private

Background Estimator.

Definition at line 39 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::IBkgdEstimator* ana::xsec::UnfoldingVariable::fBkgdEst
private

Parent object for background estimator (so we store as the parent class)

Definition at line 40 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

std::pair<ana::Spectrum*,ana::Spectrum*> ana::xsec::UnfoldingVariable::fEff
private

Efficiency object.

Definition at line 31 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

SpectrumLoaderBase* ana::xsec::UnfoldingVariable::fLoader
private

Spectrum fLoader.

Definition at line 43 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::Spectrum* ana::xsec::UnfoldingVariable::fMCSel_Reco
private

Selection Spectrum in reco variables.

Definition at line 34 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

ana::Spectrum* ana::xsec::UnfoldingVariable::fMCSig
private

Selected signal Spectrum in true variables.

Definition at line 32 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

ana::Spectrum* ana::xsec::UnfoldingVariable::fMCSig_Reco
private

Selected signal Spectrum in reco variables.

Definition at line 35 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

ana::Spectrum* ana::xsec::UnfoldingVariable::fMCSigNuTrue
private

NuTruth Signal Spectrum in true variables.

Definition at line 33 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

const ana::HistAxis* ana::xsec::UnfoldingVariable::fRecoHistAxis
private

Reco HistAxis.

Definition at line 45 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::ReweightableSpectrum* ana::xsec::UnfoldingVariable::fRecoTrue
private

Unfolding matrix.

Definition at line 36 of file UnfoldingVariable.h.

Referenced by CreateSpectrums(), and SaveSpectrums().

const ana::Cut* ana::xsec::UnfoldingVariable::fSelectionCut
private

Selection cuts.

Definition at line 46 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

const ana::SystShifts* ana::xsec::UnfoldingVariable::fShifts
private

Shifts to apply.

Definition at line 48 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::HistAxis* ana::xsec::UnfoldingVariable::fTrueHistAxis
private

True HistAxis (constructed from NuTruthHistAxis)

Definition at line 52 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

const ana::NuTruthHistAxis* ana::xsec::UnfoldingVariable::fTrueHistAxisST
private

True HistAxis.

Definition at line 44 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::Cut* ana::xsec::UnfoldingVariable::fTruthCut
private

Signal Cut (constructed from NuTruthCut)

Definition at line 53 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

const ana::NuTruthCut* ana::xsec::UnfoldingVariable::fTruthCutST
private

Signal cut.

Definition at line 47 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

ana::Var* ana::xsec::UnfoldingVariable::fWeight
private

Weightts to apply (constructed from NuTruthVar)

Definition at line 54 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().

const ana::NuTruthVar* ana::xsec::UnfoldingVariable::fWeightST
private

Weights to apply.

Definition at line 49 of file UnfoldingVariable.h.

Referenced by CreateSpectrums().


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