#include <MassWindow.h>
Public Member Functions | |
backgroundFunctionBase * | backgroundFunction () const |
void | count (const double &mass, const double &weight=1.) |
double | events () const |
const std::vector< unsigned int > * | indexes () const |
bool | isIn (const double &mass) |
double | lowerBound () const |
double | mass () const |
MassWindow (const double ¢ralMass, const double &lowerBound, const double &upperBound, const std::vector< unsigned int > &indexes, backgroundFunctionBase *backgroundFunction) | |
void | resetCounter () |
double | upperBound () const |
Protected Attributes | |
backgroundFunctionBase * | backgroundFunction_ |
double | centralMass_ |
std::vector< unsigned int > | indexes_ |
double | lowerBound_ |
double | upperBound_ |
double | weightedEvents_ |
Holds the information relative to a mass window:
Definition at line 18 of file MassWindow.h.
MassWindow::MassWindow | ( | const double & | centralMass, |
const double & | lowerBound, | ||
const double & | upperBound, | ||
const std::vector< unsigned int > & | indexes, | ||
backgroundFunctionBase * | backgroundFunction | ||
) | [inline] |
Definition at line 21 of file MassWindow.h.
: centralMass_(centralMass), lowerBound_(lowerBound), upperBound_(upperBound), weightedEvents_(0.), indexes_(indexes), backgroundFunction_(backgroundFunction) {}
backgroundFunctionBase* MassWindow::backgroundFunction | ( | ) | const [inline] |
Definition at line 39 of file MassWindow.h.
References backgroundFunction_.
Referenced by BackgroundHandler::rescale().
{return backgroundFunction_;}
void MassWindow::count | ( | const double & | mass, |
const double & | weight = 1. |
||
) | [inline] |
Definition at line 27 of file MassWindow.h.
References lowerBound_, upperBound_, CommonMethods::weight(), and weightedEvents_.
Referenced by BackgroundHandler::countEventsInAllWindows().
{ if( mass > lowerBound_ && mass < upperBound_ ) { weightedEvents_ += weight; } }
double MassWindow::events | ( | ) | const [inline] |
Definition at line 38 of file MassWindow.h.
References weightedEvents_.
Referenced by BackgroundHandler::rescale().
{return weightedEvents_;}
const std::vector<unsigned int>* MassWindow::indexes | ( | ) | const [inline] |
Definition at line 40 of file MassWindow.h.
References indexes_.
Referenced by BackgroundHandler::rescale().
{return &indexes_;}
bool MassWindow::isIn | ( | const double & | mass | ) | [inline] |
Definition at line 34 of file MassWindow.h.
References lowerBound_, and upperBound_.
{ return( mass > lowerBound_ && mass < upperBound_ ); }
double MassWindow::lowerBound | ( | ) | const [inline] |
Definition at line 36 of file MassWindow.h.
References lowerBound_.
Referenced by BackgroundHandler::rescale().
{return lowerBound_;}
double MassWindow::mass | ( | ) | const [inline] |
void MassWindow::resetCounter | ( | ) | [inline] |
Definition at line 33 of file MassWindow.h.
References weightedEvents_.
Referenced by BackgroundHandler::countEventsInAllWindows().
{ weightedEvents_ = 0; }
double MassWindow::upperBound | ( | ) | const [inline] |
Definition at line 37 of file MassWindow.h.
References upperBound_.
Referenced by BackgroundHandler::rescale().
{return upperBound_;}
backgroundFunctionBase* MassWindow::backgroundFunction_ [protected] |
Definition at line 49 of file MassWindow.h.
Referenced by backgroundFunction().
double MassWindow::centralMass_ [protected] |
Definition at line 42 of file MassWindow.h.
Referenced by mass().
std::vector<unsigned int> MassWindow::indexes_ [protected] |
Definition at line 48 of file MassWindow.h.
Referenced by indexes().
double MassWindow::lowerBound_ [protected] |
Definition at line 43 of file MassWindow.h.
Referenced by count(), isIn(), and lowerBound().
double MassWindow::upperBound_ [protected] |
Definition at line 44 of file MassWindow.h.
Referenced by count(), isIn(), and upperBound().
double MassWindow::weightedEvents_ [protected] |
Definition at line 46 of file MassWindow.h.
Referenced by count(), events(), and resetCounter().