TrivialSignalEstimator.h
Go to the documentation of this file.
1 #pragma once
2 
5 #include "CAFAna/Core/Spectrum.h"
6 
7 namespace ana
8 {
9  class SpectrumLoaderBase;
10  class SystShifts;
11 
12  /// Signal estimator using TrivialBkgdEstimator
13  /// Signal is selected MC minus total bkdgs
15  {
16  public:
18  const HistAxis * axis,
19  const Cut & sel,
20  std::vector<Cut> trueBkgds,
21  const SystShifts & shift = kNoShift,
22  const Var & weight = kUnweighted);
23 
24  const Spectrum * Signal(const Spectrum *) const override;
25  const Spectrum * Background() const override;
26  const Spectrum * BackgroundComponent(int) const override;
27  int GetNBkgdComponents() const override;
28 
29  ISignalEstimator * Clone() override;
30  void SaveTo(TDirectory *, const std::string& name) const override;
31 
32  static std::unique_ptr<TrivialSignalEstimator> LoadFrom(TDirectory *, const std::string& name);
33 
38 
40 
41  private:
42 
45  };
46 }
const XML_Char * name
Definition: expat.h:151
static std::unique_ptr< TrivialSignalEstimator > LoadFrom(TDirectory *, const std::string &name)
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
const Spectrum * Background() const override
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const Spectrum * BackgroundComponent(int) const override
const Spectrum * Signal(const Spectrum *) const override
int GetNBkgdComponents() const override
TrivialBkgdEstimator * fBkgdEst
const SystShifts kNoShift
Definition: SystShifts.cxx:21
ISignalEstimator * Clone() override
Base class for the various types of spectrum loader.
TrivialSignalEstimator & operator=(const TrivialSignalEstimator &)
TrivialSignalEstimator(SpectrumLoaderBase *loader_mc, const HistAxis *axis, const Cut &sel, std::vector< Cut > trueBkgds, const SystShifts &shift=kNoShift, const Var &weight=kUnweighted)
void SaveTo(TDirectory *, const std::string &name) const override
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
Definition: Var.h:96
Just return the MC prediction for the background.
enum BeamMode string