Public Member Functions | Protected Attributes | List of all members
ana::UnfoldIterative Class Reference

#include "/cvmfs/"

Inheritance diagram for ana::UnfoldIterative:

Public Member Functions

 UnfoldIterative (const ReweightableSpectrum &rt, int nIterations)
virtual ~UnfoldIterative ()
virtual Spectrum Truth (const Spectrum &reco) override

Protected Attributes

const ReweightableSpectrumfRT
int fNIterations

Detailed Description

Definition at line 9 of file UnfoldIterative.h.

Constructor & Destructor Documentation

ana::UnfoldIterative::UnfoldIterative ( const ReweightableSpectrum rt,
int  nIterations 
rtReco-vs-True matrix

Definition at line 8 of file UnfoldIterative.cxx.

References ana::assert().

11  {
12  assert(nIterations > 0);
13  }
const ReweightableSpectrum & fRT
unsigned int nIterations
Definition: UnfoldXSec.C:132
assert(nhit_max >=nhit_nbins)
ana::UnfoldIterative::~UnfoldIterative ( )

Definition at line 16 of file UnfoldIterative.cxx.

17  {
18  }

Member Function Documentation

Spectrum ana::UnfoldIterative::Truth ( const Spectrum reco)

Implements ana::IUnfold.

Definition at line 21 of file UnfoldIterative.cxx.

References ana::Spectrum::FakeData(), fNIterations, fRT, MECModelEnuComparisons::i, ana::Spectrum::POT(), ana::ReweightableSpectrum::ReweightToRecoSpectrum(), ana::ReweightableSpectrum::ReweightToTrueSpectrum(), and ana::ReweightableSpectrum::WeightingVariable().

Referenced by make_nominal_xs(), make_xs(), make_xs_1D(), ana::ICrossSectionAnalysis::UnfoldedSignal(), ana::CrossSectionAnalysis::UnfoldedSignal(), and UnfoldInOut().

22  {
23  // Leave the member variable as a record of how the matrix started and work
24  // with this copy.
25  ReweightableSpectrum rt = fRT;
27  rt.ReweightToRecoSpectrum(reco);
29  Spectrum truth = rt.WeightingVariable();
31  for(int i = 2; i <= fNIterations; ++i){
32  rt = fRT; // put it back how it started
33  rt.ReweightToTrueSpectrum(truth); // project back the other way
34  rt.ReweightToRecoSpectrum(reco); // and then forward again
35  truth = rt.WeightingVariable();
36  }
38  return truth.FakeData(reco.POT());
39  }
const ReweightableSpectrum & fRT
void ReweightToRecoSpectrum(const Spectrum &target)
Recale bins so that Unweighted will return target.
std::vector< float > Spectrum
Definition: Constants.h:610
void ReweightToTrueSpectrum(const Spectrum &target)
Rescale bins so that WeightingVariable will return target.

Member Data Documentation

int ana::UnfoldIterative::fNIterations

Definition at line 23 of file UnfoldIterative.h.

Referenced by Truth().

const ReweightableSpectrum& ana::UnfoldIterative::fRT

Definition at line 21 of file UnfoldIterative.h.

Referenced by Truth().

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