6 #include "CAFAna/Core/Cut.h" 9 #include "CAFAna/Core/Var.h" 44 const std::map<std::string, Component>&
categories = {});
50 const std::map<std::string, Component>&
categories = {});
54 std::map<std::string, Component>&& compDescrs,
55 std::map<std::string, Spectrum>&& compSpecs)
64 const std::map<std::string, Component>& compDescrs,
65 const std::map<std::string, Spectrum>& compSpecs)
74 TLegend*
DrawLegend(
double drawThreshold = 0, TLegend *
leg =
nullptr)
const;
87 float Purity(
const std::set<std::string>& signalCatNames={})
const;
90 static std::unique_ptr<SpectrumComponents>
LoadFrom(TDirectory* dir,
const std::string& name);
const std::vector< Binning > & GetBinnings() const
const Spectrum & Tot() const
Cuts and Vars for the 2020 FD DiF Study.
static std::unique_ptr< SpectrumComponents > LoadFrom(TDirectory *dir, const std::string &name)
std::map< std::string, Component > & ComponentDescrs()
std::map< std::string, Component > fComponentDescr
std::vector< Binning > GetBinnings() const
float Purity(const std::set< std::string > &signalCatNames={}) const
Purity of the MC selection based on the MC subcategories.
Representation of a spectrum in any variable, with associated POT.
Component(const Cut &cut_, const std::string &blurb_="", int color_=kBlue)
TLegend * DrawLegend(double drawThreshold=0, TLegend *leg=nullptr) const
Draw legend on plots.
SpectrumComponents(Spectrum &&tot, std::map< std::string, Component > &&compDescrs, std::map< std::string, Spectrum > &&compSpecs)
Constructor for use in LoadFrom()
void DrawComponents(bool stacked=true, EBinType bintype=kBinContent, double POT=0, bool sameAll=true) const
Draw MC components distribution.
unsigned int NDimensions() const
const ana::Cut & Sel() const
dictionary categories
Naming schema histograms should follow a logical naming convention: <category>-<observable>-<reconstr...
SpectrumComponents(const Spectrum &tot, const std::map< std::string, Component > &compDescrs, const std::map< std::string, Spectrum > &compSpecs)
Constructor from copies...
std::vector< std::string > GetLabels() const
std::vector< double > POT
Base class for the various types of spectrum loader.
SpectrumComponents(const ana::Cut &baseCut, const ana::HistAxis &axis, ana::SpectrumLoaderBase &loader, const Var &wei=kUnweighted, const std::map< std::string, Component > &categories={})
SpectrumComponents makes a collection of Spectra differing by a single (often truth) Cut...
std::map< std::string, Spectrum > fComponentSpecs
unsigned int NDimensions() const
const std::vector< std::string > & GetLabels() const
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
const std::map< std::string, Component > & ComponentDescrs() const
const std::map< std::string, Spectrum > & ComponentSpecs() const
const Cut kNoCut
The simplest possible cut: pass everything, used as a default.
void SaveTo(TDirectory *dir, const std::string &name) const