CMS 3D CMS Logo

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

Definition at line 20 of file MassWindow.h.

25  : centralMass_(centralMass),
28  weightedEvents_(0.),
double centralMass_
Definition: MassWindow.h:47
double upperBound_
Definition: MassWindow.h:49
backgroundFunctionBase * backgroundFunction_
Definition: MassWindow.h:54
const std::vector< unsigned int > * indexes() const
Definition: MassWindow.h:44
double weightedEvents_
Definition: MassWindow.h:51
double upperBound() const
Definition: MassWindow.h:41
double lowerBound() const
Definition: MassWindow.h:40
backgroundFunctionBase * backgroundFunction() const
Definition: MassWindow.h:43
std::vector< unsigned int > indexes_
Definition: MassWindow.h:53
double lowerBound_
Definition: MassWindow.h:48

Member Function Documentation

◆ backgroundFunction()

backgroundFunctionBase* MassWindow::backgroundFunction ( ) const
inline

Definition at line 43 of file MassWindow.h.

References backgroundFunction_.

43 { return backgroundFunction_; }
backgroundFunctionBase * backgroundFunction_
Definition: MassWindow.h:54

◆ count()

void MassWindow::count ( const double &  mass,
const double &  weight = 1. 
)
inline

Definition at line 32 of file MassWindow.h.

References lowerBound_, mass(), upperBound_, mps_merge::weight, and weightedEvents_.

32  {
33  if (mass > lowerBound_ && mass < upperBound_) {
35  }
36  }
double upperBound_
Definition: MassWindow.h:49
double weightedEvents_
Definition: MassWindow.h:51
double lowerBound_
Definition: MassWindow.h:48
double mass() const
Definition: MassWindow.h:39

◆ events()

double MassWindow::events ( ) const
inline

Definition at line 42 of file MassWindow.h.

References weightedEvents_.

42 { return weightedEvents_; }
double weightedEvents_
Definition: MassWindow.h:51

◆ indexes()

const std::vector<unsigned int>* MassWindow::indexes ( ) const
inline

Definition at line 44 of file MassWindow.h.

References indexes_.

44 { return &indexes_; }
std::vector< unsigned int > indexes_
Definition: MassWindow.h:53

◆ isIn()

bool MassWindow::isIn ( const double &  mass)
inline

Definition at line 38 of file MassWindow.h.

References lowerBound_, mass(), and upperBound_.

38 { return (mass > lowerBound_ && mass < upperBound_); }
double upperBound_
Definition: MassWindow.h:49
double lowerBound_
Definition: MassWindow.h:48
double mass() const
Definition: MassWindow.h:39

◆ lowerBound()

double MassWindow::lowerBound ( ) const
inline

Definition at line 40 of file MassWindow.h.

References lowerBound_.

40 { return lowerBound_; }
double lowerBound_
Definition: MassWindow.h:48

◆ mass()

double MassWindow::mass ( ) const
inline

Definition at line 39 of file MassWindow.h.

References centralMass_.

Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), count(), isIn(), and datamodel.Object::p4().

39 { return centralMass_; }
double centralMass_
Definition: MassWindow.h:47

◆ resetCounter()

void MassWindow::resetCounter ( )
inline

Definition at line 37 of file MassWindow.h.

References weightedEvents_.

37 { weightedEvents_ = 0; }
double weightedEvents_
Definition: MassWindow.h:51

◆ upperBound()

double MassWindow::upperBound ( ) const
inline

Definition at line 41 of file MassWindow.h.

References upperBound_.

41 { return upperBound_; }
double upperBound_
Definition: MassWindow.h:49

Member Data Documentation

◆ backgroundFunction_

backgroundFunctionBase* MassWindow::backgroundFunction_
protected

Definition at line 54 of file MassWindow.h.

Referenced by backgroundFunction().

◆ centralMass_

double MassWindow::centralMass_
protected

Definition at line 47 of file MassWindow.h.

Referenced by mass().

◆ indexes_

std::vector<unsigned int> MassWindow::indexes_
protected

Definition at line 53 of file MassWindow.h.

Referenced by indexes().

◆ lowerBound_

double MassWindow::lowerBound_
protected

Definition at line 48 of file MassWindow.h.

Referenced by count(), isIn(), and lowerBound().

◆ upperBound_

double MassWindow::upperBound_
protected

Definition at line 49 of file MassWindow.h.

Referenced by count(), isIn(), and upperBound().

◆ weightedEvents_

double MassWindow::weightedEvents_
protected

Definition at line 51 of file MassWindow.h.

Referenced by count(), events(), and resetCounter().