All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Typedefs | Functions
Var.h File Reference
#include <functional>
#include <set>
#include <string>
#include "sbnana/CAFAna/Core/Binning.h"
#include "sbnanaobj/StandardRecord/Proxy/FwdDeclare.h"

Go to the source code of this file.

Classes

class  ana::_Var< T >
 Most useful for combining weights. More...
 
class  ana::_Var< T >
 Most useful for combining weights. More...
 

Namespaces

 caf
 Common Analysis Files.
 
 ana
 Oscillation analysis framework, runs over CAF files outside of ART.
 

Macros

#define SIMPLEVAR(CAFNAME)   Var([](const caf::SRSliceProxy* sr) -> double {return sr->CAFNAME;})
 For Vars where literally all you need is a single CAF variable. More...
 
#define SIMPLESPILLVAR(CAFNAME)   SpillVar([](const caf::SRSpillProxy* sr) -> double {return sr->CAFNAME;})
 
#define SpillTruthVar2D   Var2D
 
#define SpillTruthVar3D   Var3D
 

Typedefs

typedef _Var< caf::SRSliceProxyana::Var
 Representation of a variable to be retrieved from a caf::StandardRecord object. More...
 
typedef _Var< caf::SRSpillProxyana::SpillVar
 Equivalent of Var acting on caf::SRSpill. More...
 

Functions

template<class T >
_Var< T > ana::operator* (const _Var< T > &a, const _Var< T > &b)
 
template<class T >
_Var< T > ana::operator/ (const _Var< T > &a, const _Var< T > &b)
 
template<class T >
_Var< T > ana::operator+ (const _Var< T > &a, const _Var< T > &b)
 
template<class T >
_Var< T > ana::operator- (const _Var< T > &a, const _Var< T > &b)
 
const Var ana::kUnweighted ([](const caf::SRSliceProxy *){return 1;})
 The simplest possible Var, always 1. Used as a default weight. More...
 
const SpillVar ana::kSpillUnweighted ([](const caf::SRSpillProxy *){return 1;})
 
template<class T >
_Var< T > ana::Var2D (const _Var< T > &a, const Binning &binsa, const _Var< T > &b, const Binning &binsb)
 Variable formed from two input variables. More...
 
template<class T >
_Var< T > ana::Var2D (const _Var< T > &a, int na, double a0, double a1, const _Var< T > &b, int nb, double b0, double b1)
 Variable formed from two input variables. More...
 
template<class T >
_Var< T > ana::Var3D (const _Var< T > &a, const Binning &binsa, const _Var< T > &b, const Binning &binsb, const _Var< T > &c, const Binning &binsc)
 This is just like a Var2D, but useful for 3D Spectra. More...
 
template<class T >
_Var< T > ana::Var3D (const _Var< T > &a, int na, double a0, double a1, const _Var< T > &b, int nb, double b0, double b1, const _Var< T > &c, int nc, double c0, double c1)
 This is just like a Var2D, but useful for 3D Spectra. More...
 
Var ana::Scaled (const Var &v, double s)
 Use to rescale another variable. More...
 
Var ana::Constant (double c)
 Use to weight events up and down by some factor. More...
 
Var ana::Sqrt (const Var &v)
 Use to take sqrt of a var. More...
 

Macro Definition Documentation

#define SIMPLESPILLVAR (   CAFNAME)    SpillVar([](const caf::SRSpillProxy* sr) -> double {return sr->CAFNAME;})

Definition at line 84 of file Var.h.

#define SIMPLEVAR (   CAFNAME)    Var([](const caf::SRSliceProxy* sr) -> double {return sr->CAFNAME;})

For Vars where literally all you need is a single CAF variable.

eg Var myVar = SIMPLEVAR(my.var.str); NB lack of quotes quotes around my.var.str

Definition at line 82 of file Var.h.

#define SpillTruthVar2D   Var2D

Definition at line 120 of file Var.h.

#define SpillTruthVar3D   Var3D

Definition at line 121 of file Var.h.