test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
MassWindow Class Reference

#include <MassWindow.h>

Public Member Functions

backgroundFunctionBasebackgroundFunction () 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 &centralMass, const double &lowerBound, const double &upperBound, const std::vector< unsigned int > &indexes, backgroundFunctionBase *backgroundFunction)
 
void resetCounter ()
 
double upperBound () const
 

Protected Attributes

backgroundFunctionBasebackgroundFunction_
 
double centralMass_
 
std::vector< unsigned int > indexes_
 
double lowerBound_
 
double upperBound_
 
double weightedEvents_
 

Detailed Description

Holds the information relative to a mass window:

Definition at line 18 of file MassWindow.h.

Constructor & Destructor Documentation

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.

22  :
24  indexes_(indexes), backgroundFunction_(backgroundFunction)
25  {}
double centralMass_
Definition: MassWindow.h:42
double upperBound_
Definition: MassWindow.h:44
backgroundFunctionBase * backgroundFunction_
Definition: MassWindow.h:49
double upperBound() const
Definition: MassWindow.h:37
double weightedEvents_
Definition: MassWindow.h:46
double lowerBound() const
Definition: MassWindow.h:36
std::vector< unsigned int > indexes_
Definition: MassWindow.h:48
const std::vector< unsigned int > * indexes() const
Definition: MassWindow.h:40
double lowerBound_
Definition: MassWindow.h:43

Member Function Documentation

backgroundFunctionBase* MassWindow::backgroundFunction ( ) const
inline

Definition at line 39 of file MassWindow.h.

References backgroundFunction_.

Referenced by BackgroundHandler::rescale().

39 {return backgroundFunction_;}
backgroundFunctionBase * backgroundFunction_
Definition: MassWindow.h:49
void MassWindow::count ( const double &  mass,
const double &  weight = 1. 
)
inline

Definition at line 27 of file MassWindow.h.

References lowerBound_, upperBound_, histoStyle::weight, and weightedEvents_.

Referenced by BackgroundHandler::countEventsInAllWindows().

28  {
29  if( mass > lowerBound_ && mass < upperBound_ ) {
31  }
32  }
double mass() const
Definition: MassWindow.h:35
double upperBound_
Definition: MassWindow.h:44
double weightedEvents_
Definition: MassWindow.h:46
double lowerBound_
Definition: MassWindow.h:43
int weight
Definition: histoStyle.py:50
double MassWindow::events ( ) const
inline

Definition at line 38 of file MassWindow.h.

References weightedEvents_.

Referenced by BackgroundHandler::rescale().

38 {return weightedEvents_;}
double weightedEvents_
Definition: MassWindow.h:46
const std::vector<unsigned int>* MassWindow::indexes ( ) const
inline

Definition at line 40 of file MassWindow.h.

References indexes_.

Referenced by BackgroundHandler::rescale().

40 {return &indexes_;}
std::vector< unsigned int > indexes_
Definition: MassWindow.h:48
bool MassWindow::isIn ( const double &  mass)
inline

Definition at line 34 of file MassWindow.h.

References lowerBound_, and upperBound_.

34 { return( mass > lowerBound_ && mass < upperBound_ ); }
double mass() const
Definition: MassWindow.h:35
double upperBound_
Definition: MassWindow.h:44
double lowerBound_
Definition: MassWindow.h:43
double MassWindow::lowerBound ( ) const
inline

Definition at line 36 of file MassWindow.h.

References lowerBound_.

Referenced by BackgroundHandler::rescale().

36 {return lowerBound_;}
double lowerBound_
Definition: MassWindow.h:43
double MassWindow::mass ( ) const
inline

Definition at line 35 of file MassWindow.h.

References centralMass_.

35 {return centralMass_;}
double centralMass_
Definition: MassWindow.h:42
void MassWindow::resetCounter ( )
inline

Definition at line 33 of file MassWindow.h.

References weightedEvents_.

Referenced by BackgroundHandler::countEventsInAllWindows().

33 { weightedEvents_ = 0; }
double weightedEvents_
Definition: MassWindow.h:46
double MassWindow::upperBound ( ) const
inline

Definition at line 37 of file MassWindow.h.

References upperBound_.

Referenced by BackgroundHandler::rescale().

37 {return upperBound_;}
double upperBound_
Definition: MassWindow.h:44

Member Data Documentation

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().