#include <Analysis.hh>
Public Member Functions | |
Analysis (IHistogrammer *histogrammer, const string &name) | |
virtual | ~Analysis () |
Default destructor. | |
const string & | name () const |
Returns the name of this analysis. | |
virtual bool | initialise ()=0 |
void | executeClear (const Event &evt) |
virtual bool | finalise ()=0 |
bool | storesEvent () const |
Protected Member Functions | |
virtual bool | execute (const Event &evt)=0 |
void | storeEvent (bool doStore=true) |
bool | bookHistogram1D (const string &path, const string &name, const string &title, int nBins, double xMin, double xMax, bool divideBinWidths=true) |
bool | bookHistogram1D (const string &name, const string &title, int nBins, double xMin, double xMax, bool divideBinWidths=true) |
bool | bookHistogram1D (const string &path, const string &name, const string &title, const vector< double > &bins, bool divideBinWidths=true) |
bool | bookHistogram1D (const string &name, const string &title, const vector< double > &bins, bool divideBinWidths=true) |
void | bookProfile1D (const string &path, const string &name, const string &title, int nBins, double xMin, double xMax) |
void | bookProfile1D (const string &name, const string &title, int nBins, double xMin, double xMax) |
bool | bookHistogram2D (const string &path, const string &name, const string &title, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, bool divideBinWidths=true) |
bool | bookHistogram2D (const string &name, const string &title, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, bool divideBinWidths=true) |
bool | bookHistogram2D (const string &path, const string &name, const string &title, const vector< double > &xbins, const vector< double > &ybins, bool divideBinWidths=true) |
bool | bookHistogram2D (const string &name, const string &title, const vector< double > &xbins, const vector< double > &ybins, bool divideBinWidths=true) |
void | bookHistogram3D (const string &path, const string &name, const string &title, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, int nBinsZ, double zMin, double zMax, bool divideBinWidths=true) |
void | bookHistogram3D (const string &name, const string &title, int nBinsX, double xMin, double xMax, int nBinsY, double yMin, double yMax, int nBinsZ, double zMin, double zMax, bool divideBinWidths=true) |
bool | fillHistogram1D (const string &path, const string &name, double value, double weight) |
bool | fillHistogram1D (const string &name, double value, double weight) |
void | fillProfile1D (const string &path, const string &name, double xVal, double yVal, double weight) |
void | fillProfile1D (const string &name, double xVal, double yVal, double weight) |
bool | fillHistogram2D (const string &path, const string &name, double xVal, double yVal, double weight) |
bool | fillHistogram2D (const string &name, double xVal, double yVal, double weight) |
void | fillHistogram3D (const string &path, const string &name, double xVal, double yVal, double zVal, double weight) |
void | fillHistogram3D (const string &name, double xVal, double yVal, double zVal, double weight) |
void | normaliseHistogram1D (const string &path, const string &name, double intgl) |
void | normaliseHistogram1D (const string &name, double intgl) |
void | scaleHistogram1D (const string &path, const string &name, double scale) |
void | scaleHistogram1D (const string &name, double scale) |
IHistogrammer * | histograms () |
string | analysisPath (const std::string path) |
Analysis base class.
This is the analysis base class.
Definition at line 23 of file Analysis.hh.
ForIA::Analysis::Analysis | ( | IHistogrammer * | histogrammer, |
const string & | name | ||
) |
Base class constructor. It must be called by the derived class constructor.
histogrammer | A pointer to an IHistogrammer, which will be used for histogramming |
name | The name of the derived analysis, which will be used to load the analysis at runtime |
Definition at line 6 of file Analysis.cxx.
virtual ForIA::Analysis::~Analysis | ( | ) | [inline, virtual] |
Default destructor.
Definition at line 34 of file Analysis.hh.
string ForIA::Analysis::analysisPath | ( | const std::string | path ) | [inline, protected] |
The default path for this analysis. May be removed!
Definition at line 364 of file Analysis.hh.
bool ForIA::Analysis::bookHistogram1D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
int | nBins, | ||
double | xMin, | ||
double | xMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 1-D histogram at location path with uniform bins sizes.
path | The location of the histogram |
name | The name of the histogram |
title | The title of the histogram |
nBins | The number of bins in the histogram |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 40 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram1D | ( | const string & | name, |
const string & | title, | ||
int | nBins, | ||
double | xMin, | ||
double | xMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 1-D histogram at the default location "/" with uniform bins sizes.
name | The name of the histogram |
title | The title of the histogram |
nBins | The number of bins in the histogram |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 50 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram1D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
const vector< double > & | bins, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 1-D histogram at location path with variable bin widths.
path | The location of the histogram |
name | The name of the histogram |
title | The title of the histogram |
bins | Vector of bin edges |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 59 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram1D | ( | const string & | name, |
const string & | title, | ||
const vector< double > & | bins, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 1-D histogram at the default location "/" with variable bin widths.
name | The name of the histogram |
title | The title of the histogram |
bins | Vector of bin edges |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 67 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram2D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
const vector< double > & | xbins, | ||
const vector< double > & | ybins, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 2-D histogram at location path with variable bin widths.
path | The location of the histogram |
name | The name of the histogram |
title | The title of the histogram |
xbins | The x axis bin edges |
ybins | The y axis bin edges |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 115 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram2D | ( | const string & | name, |
const string & | title, | ||
const vector< double > & | xbins, | ||
const vector< double > & | ybins, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 2-D histogram at the default location "/" with variable bin widths.
name | The name of the histogram |
title | The title of the histogram |
xbins | The x axis bin edges |
ybins | The y axis bin edges |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 124 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram2D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
int | nBinsX, | ||
double | xMin, | ||
double | xMax, | ||
int | nBinsY, | ||
double | yMin, | ||
double | yMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 2-D histogram at location path with uniform bins sizes.
path | The location of the histogram |
name | The name of the histogram |
title | The title of the histogram |
nBinsX | The number of bins in the x direction |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
nBinsY | The number of bins in the y direction |
yMin | The minimum of the y range |
yMax | The maximum of the y range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 91 of file Analysis.cxx.
bool ForIA::Analysis::bookHistogram2D | ( | const string & | name, |
const string & | title, | ||
int | nBinsX, | ||
double | xMin, | ||
double | xMax, | ||
int | nBinsY, | ||
double | yMin, | ||
double | yMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 2-D histogram at the default location "/" with uniform bins sizes.
name | The name of the histogram |
title | The title of the histogram |
nBinsX | The number of bins in the x direction |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
nBinsY | The number of bins in the y direction |
yMin | The minimum of the y range |
yMax | The maximum of the y range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 103 of file Analysis.cxx.
void ForIA::Analysis::bookHistogram3D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
int | nBinsX, | ||
double | xMin, | ||
double | xMax, | ||
int | nBinsY, | ||
double | yMin, | ||
double | yMax, | ||
int | nBinsZ, | ||
double | zMin, | ||
double | zMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 3-D histogram at location path with uniform bins sizes.
path | The location of the histogram |
name | The name of the histogram |
title | The title of the histogram |
nBinsX | The number of bins in the x direction |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
nBinsY | The number of bins in the y direction |
yMin | The minimum of the y range |
yMax | The maximum of the y range |
nBinsZ | The number of bins in the z direction |
zMin | The minimum of the z range |
zMax | The maximum of the z range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 132 of file Analysis.cxx.
void ForIA::Analysis::bookHistogram3D | ( | const string & | name, |
const string & | title, | ||
int | nBinsX, | ||
double | xMin, | ||
double | xMax, | ||
int | nBinsY, | ||
double | yMin, | ||
double | yMax, | ||
int | nBinsZ, | ||
double | zMin, | ||
double | zMax, | ||
bool | divideBinWidths = true |
||
) | [protected] |
Book a 3-D histogram at location "/" with uniform bins sizes.
name | The name of the histogram |
title | The title of the histogram |
nBinsX | The number of bins in the x direction |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
nBinsY | The number of bins in the y direction |
yMin | The minimum of the y range |
yMax | The maximum of the y range |
nBinsZ | The number of bins in the z direction |
zMin | The minimum of the z range |
zMax | The maximum of the z range |
divideBinWidths | Whether to finalise the histogram by normalising to the bin widths (default = true) |
Definition at line 146 of file Analysis.cxx.
void ForIA::Analysis::bookProfile1D | ( | const string & | name, |
const string & | title, | ||
int | nBins, | ||
double | xMin, | ||
double | xMax | ||
) | [protected] |
Book a 1-D profile at the default location "/" with uniform bin sizes
name | The name of the profile |
title | The title of the profile |
nBins | The number of bins in the profile |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
Definition at line 83 of file Analysis.cxx.
void ForIA::Analysis::bookProfile1D | ( | const string & | path, |
const string & | name, | ||
const string & | title, | ||
int | nBins, | ||
double | xMin, | ||
double | xMax | ||
) | [protected] |
Book a 1-D profile at location path with uniform bin sizes
path | The location of the profile |
name | The name of the profile |
title | The title of the profile |
nBins | The number of bins in the profile |
xMin | The minimum of the x range |
xMax | The maximum of the x range |
Definition at line 75 of file Analysis.cxx.
virtual bool ForIA::Analysis::execute | ( | const Event & | evt ) | [protected, pure virtual] |
Execute this analysis on one event
evt | The event to analyse |
void ForIA::Analysis::executeClear | ( | const Event & | evt ) |
clear the previous event and call execute on the Event passed in
evt | The event to analyse |
Definition at line 13 of file Analysis.cxx.
bool ForIA::Analysis::fillHistogram1D | ( | const string & | path, |
const string & | name, | ||
double | value, | ||
double | weight | ||
) | [protected] |
Fill a 1-D histogram at a particular path with a given value and weight
path | The location of the histogram |
name | The name of the histogram |
value | The value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 159 of file Analysis.cxx.
bool ForIA::Analysis::fillHistogram1D | ( | const string & | name, |
double | value, | ||
double | weight | ||
) | [protected] |
Fill a 1-D histogram at the default path "/" with a given value and weight
name | The name of the histogram |
value | The value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 165 of file Analysis.cxx.
bool ForIA::Analysis::fillHistogram2D | ( | const string & | name, |
double | xVal, | ||
double | yVal, | ||
double | weight | ||
) | [protected] |
Fill a 2-D histogram at the default path "/" with given x-y values and weight
name | The name of the histogram |
xVal | The x value with which to fill the histogram |
yVal | The y value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 189 of file Analysis.cxx.
bool ForIA::Analysis::fillHistogram2D | ( | const string & | path, |
const string & | name, | ||
double | xVal, | ||
double | yVal, | ||
double | weight | ||
) | [protected] |
Fill a 2-D histogram at a particular path with given x-y values and weight
path | The location of the histogram |
name | The name of the histogram |
xVal | The x value with which to fill the histogram |
yVal | The y value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 183 of file Analysis.cxx.
void ForIA::Analysis::fillHistogram3D | ( | const string & | path, |
const string & | name, | ||
double | xVal, | ||
double | yVal, | ||
double | zVal, | ||
double | weight | ||
) | [protected] |
Fill a 3-D histogram at a particular path with given x-y-z values and weight
path | The location of the histogram |
name | The name of the histogram |
xVal | The x value with which to fill the histogram |
yVal | The y value with which to fill the histogram |
zVal | The z value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 195 of file Analysis.cxx.
void ForIA::Analysis::fillHistogram3D | ( | const string & | name, |
double | xVal, | ||
double | yVal, | ||
double | zVal, | ||
double | weight | ||
) | [protected] |
Fill a 3-D histogram at the default path "/" with given x-y-z values and weight
name | The name of the histogram |
xVal | The x value with which to fill the histogram |
yVal | The y value with which to fill the histogram |
zVal | The z value with which to fill the histogram |
weight | The weight with which to fill the histogram |
Definition at line 202 of file Analysis.cxx.
void ForIA::Analysis::fillProfile1D | ( | const string & | path, |
const string & | name, | ||
double | xVal, | ||
double | yVal, | ||
double | weight | ||
) | [protected] |
Fill a 1-D profile at a particular path with a given value and weight
path | The location of the profile |
name | The name of the profile |
value | The value with which to fill the profile |
weight | The weight with which to fill the profile |
Definition at line 171 of file Analysis.cxx.
void ForIA::Analysis::fillProfile1D | ( | const string & | name, |
double | xVal, | ||
double | yVal, | ||
double | weight | ||
) | [protected] |
Fill a 1-D profile at the default path "/" with a given value and weight
name | The name of the profile |
value | The value with which to fill the profile |
weight | The weight with which to fill the profile |
Definition at line 177 of file Analysis.cxx.
virtual bool ForIA::Analysis::finalise | ( | ) | [pure virtual] |
Finalise the analysis. Must be implemented by any derived analysis. This is the place where you normalise histograms, finalise cross sections etc.
IHistogrammer * ForIA::Analysis::histograms | ( | ) | [protected] |
Access to the histogramming class. May be removed!
Definition at line 35 of file Analysis.cxx.
virtual bool ForIA::Analysis::initialise | ( | ) | [pure virtual] |
Initialise the analysis. Must be implemented by any derived analysis to book histograms and set up other initial conditions
const string & ForIA::Analysis::name | ( | ) | const |
Returns the name of this analysis.
Definition at line 30 of file Analysis.cxx.
void ForIA::Analysis::normaliseHistogram1D | ( | const string & | name, |
double | intgl | ||
) | [protected] |
Normalise a histogram at the default path "/" to a given integral
name | The name of the histogram |
intgl | The area of the histogram after normalisation |
Definition at line 215 of file Analysis.cxx.
void ForIA::Analysis::normaliseHistogram1D | ( | const string & | path, |
const string & | name, | ||
double | intgl | ||
) | [protected] |
Normalise a histogram at a particular path to a given integral
path | The location of the histogram |
name | The name of the histogram |
intgl | The area of the histogram after normalisation |
Definition at line 209 of file Analysis.cxx.
void ForIA::Analysis::scaleHistogram1D | ( | const string & | name, |
double | scale | ||
) | [protected] |
Scale a histogram at the default path "/"
name | The name of the histogram |
scale | The scale to multiply each bin by |
Definition at line 227 of file Analysis.cxx.
void ForIA::Analysis::scaleHistogram1D | ( | const string & | path, |
const string & | name, | ||
double | scale | ||
) | [protected] |
Scale a histogram at a particular path
path | The location of the histogram |
name | The name of the histogram |
scale | The scale to multiply each bin by |
Definition at line 221 of file Analysis.cxx.
void ForIA::Analysis::storeEvent | ( | bool | doStore = true ) |
[protected] |
If called form ana analysis, then it will be set to store the event
Definition at line 24 of file Analysis.cxx.
bool ForIA::Analysis::storesEvent | ( | ) | const |
Returns true if an analysis wants to store the current event
Definition at line 20 of file Analysis.cxx.