Public Member Functions | Protected Member Functions

ForIA::Analysis Class Reference

Analysis base class. More...

#include <Analysis.hh>

List of all members.

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)
IHistogrammerhistograms ()
string analysisPath (const std::string path)

Detailed Description

Analysis base class.

This is the analysis base class.

Definition at line 23 of file Analysis.hh.


Constructor & Destructor Documentation

ForIA::Analysis::Analysis ( IHistogrammer histogrammer,
const string &  name 
)

Base class constructor. It must be called by the derived class constructor.

Parameters:
histogrammerA pointer to an IHistogrammer, which will be used for histogramming
nameThe 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.


Member Function Documentation

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.

Parameters:
pathThe location of the histogram
nameThe name of the histogram
titleThe title of the histogram
nBinsThe number of bins in the histogram
xMinThe minimum of the x range
xMaxThe maximum of the x range
divideBinWidthsWhether 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.

Parameters:
nameThe name of the histogram
titleThe title of the histogram
nBinsThe number of bins in the histogram
xMinThe minimum of the x range
xMaxThe maximum of the x range
divideBinWidthsWhether 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.

Parameters:
pathThe location of the histogram
nameThe name of the histogram
titleThe title of the histogram
binsVector of bin edges
divideBinWidthsWhether 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.

Parameters:
nameThe name of the histogram
titleThe title of the histogram
binsVector of bin edges
divideBinWidthsWhether 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.

Parameters:
pathThe location of the histogram
nameThe name of the histogram
titleThe title of the histogram
xbinsThe x axis bin edges
ybinsThe y axis bin edges
divideBinWidthsWhether 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.

Parameters:
nameThe name of the histogram
titleThe title of the histogram
xbinsThe x axis bin edges
ybinsThe y axis bin edges
divideBinWidthsWhether 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.

Parameters:
pathThe location of the histogram
nameThe name of the histogram
titleThe title of the histogram
nBinsXThe number of bins in the x direction
xMinThe minimum of the x range
xMaxThe maximum of the x range
nBinsYThe number of bins in the y direction
yMinThe minimum of the y range
yMaxThe maximum of the y range
divideBinWidthsWhether 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.

Parameters:
nameThe name of the histogram
titleThe title of the histogram
nBinsXThe number of bins in the x direction
xMinThe minimum of the x range
xMaxThe maximum of the x range
nBinsYThe number of bins in the y direction
yMinThe minimum of the y range
yMaxThe maximum of the y range
divideBinWidthsWhether 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.

Parameters:
pathThe location of the histogram
nameThe name of the histogram
titleThe title of the histogram
nBinsXThe number of bins in the x direction
xMinThe minimum of the x range
xMaxThe maximum of the x range
nBinsYThe number of bins in the y direction
yMinThe minimum of the y range
yMaxThe maximum of the y range
nBinsZThe number of bins in the z direction
zMinThe minimum of the z range
zMaxThe maximum of the z range
divideBinWidthsWhether 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.

Parameters:
nameThe name of the histogram
titleThe title of the histogram
nBinsXThe number of bins in the x direction
xMinThe minimum of the x range
xMaxThe maximum of the x range
nBinsYThe number of bins in the y direction
yMinThe minimum of the y range
yMaxThe maximum of the y range
nBinsZThe number of bins in the z direction
zMinThe minimum of the z range
zMaxThe maximum of the z range
divideBinWidthsWhether 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

Parameters:
nameThe name of the profile
titleThe title of the profile
nBinsThe number of bins in the profile
xMinThe minimum of the x range
xMaxThe 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

Parameters:
pathThe location of the profile
nameThe name of the profile
titleThe title of the profile
nBinsThe number of bins in the profile
xMinThe minimum of the x range
xMaxThe 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

Parameters:
evtThe event to analyse
Returns:
true if analysis successful, false otherwise.
void ForIA::Analysis::executeClear ( const Event evt )

clear the previous event and call execute on the Event passed in

Parameters:
evtThe 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

Parameters:
pathThe location of the histogram
nameThe name of the histogram
valueThe value with which to fill the histogram
weightThe 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

Parameters:
nameThe name of the histogram
valueThe value with which to fill the histogram
weightThe 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

Parameters:
nameThe name of the histogram
xValThe x value with which to fill the histogram
yValThe y value with which to fill the histogram
weightThe 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

Parameters:
pathThe location of the histogram
nameThe name of the histogram
xValThe x value with which to fill the histogram
yValThe y value with which to fill the histogram
weightThe 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

Parameters:
pathThe location of the histogram
nameThe name of the histogram
xValThe x value with which to fill the histogram
yValThe y value with which to fill the histogram
zValThe z value with which to fill the histogram
weightThe 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

Parameters:
nameThe name of the histogram
xValThe x value with which to fill the histogram
yValThe y value with which to fill the histogram
zValThe z value with which to fill the histogram
weightThe 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

Parameters:
pathThe location of the profile
nameThe name of the profile
valueThe value with which to fill the profile
weightThe 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

Parameters:
nameThe name of the profile
valueThe value with which to fill the profile
weightThe 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.

Returns:
true if finalisation successful, false otherwise.
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

Returns:
true if initialisation successful, false otherwise
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

Parameters:
nameThe name of the histogram
intglThe 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

Parameters:
pathThe location of the histogram
nameThe name of the histogram
intglThe 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 "/"

Parameters:
nameThe name of the histogram
scaleThe 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

Parameters:
pathThe location of the histogram
nameThe name of the histogram
scaleThe 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.


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