Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Atlfast::BinID Class Reference

#include <BinID.h>

List of all members.


Public Methods

 BinID ()
 BinID (int intID, double low1, double high1)
 BinID (int intID, double low1, double high1, double low2, double high2)
 BinID (int intID, vector< double > low, vector< double > high)
double low (int n=0) const
double high (int n=0) const
bool isInBin (const double &var) const
bool isInBin (const vector< double > &var) const
bool operator< (const BinID &other) const

Private Attributes

int m_int
vector< double > m_lowEdge
vector< double > m_highEdge

Constructor & Destructor Documentation

Atlfast::BinID::BinID   [inline]
 

Definition at line 11 of file BinID.h.

References m_highEdge, m_int, and m_lowEdge.

00011 : m_int(0),m_lowEdge(1, 0.),m_highEdge(1, 0.){}

Atlfast::BinID::BinID int    intID,
double    low1,
double    high1
 

Definition at line 5 of file BinID.cxx.

References m_highEdge, and m_lowEdge.

00005                                                 : m_int(intID) { 
00006   m_lowEdge.push_back(low1);
00007   m_highEdge.push_back(high1);
00008 }

Atlfast::BinID::BinID int    intID,
double    low1,
double    high1,
double    low2,
double    high2
 

Definition at line 10 of file BinID.cxx.

References m_highEdge, and m_lowEdge.

00010                                                                           :
00011   m_int(intID) {
00012   m_lowEdge.push_back(low1);
00013   m_lowEdge.push_back(low2);
00014   m_highEdge.push_back(high1);
00015   m_highEdge.push_back(high2);
00016 }

Atlfast::BinID::BinID int    intID,
vector< double >    low,
vector< double >    high
 

Definition at line 18 of file BinID.cxx.

00018                                                               :m_int(intID),
00019                                                                  m_lowEdge(low),
00020                                                                  m_highEdge(high) {}

Member Function Documentation

double Atlfast::BinID::low int    n = 0 const
 

Definition at line 23 of file BinID.cxx.

References m_lowEdge.

Referenced by Atlfast::LeptonBinData::getMatrix().

00023 {return m_lowEdge[n];}

double Atlfast::BinID::high int    n = 0 const
 

Definition at line 25 of file BinID.cxx.

References m_highEdge.

Referenced by Atlfast::LeptonBinData::getMatrix().

00025 {return m_highEdge[n];}

bool Atlfast::BinID::isInBin const double &    var const
 

Definition at line 27 of file BinID.cxx.

00027                                           {
00028   vector<double> vec(1, var);
00029   return this->isInBin(vec);
00030 }

bool Atlfast::BinID::isInBin const vector< double > &    var const
 

Definition at line 32 of file BinID.cxx.

References m_highEdge, and m_lowEdge.

00032                                                   {
00033   vector<double>::const_iterator vIter = var.begin();
00034   vector<double>::const_iterator vEnd = var.end();
00035   vector<double>::const_iterator lowIter = m_lowEdge.begin();
00036   vector<double>::const_iterator highIter = m_highEdge.begin();
00037   
00038   if (var.size() > m_lowEdge.size() ) {
00039     cout << "Warning: BinID - more variables than bin dimensions" << endl;
00040     return false;
00041   }
00042   for (;vIter != vEnd; ++vIter) {
00043     if ( (*vIter) < (*lowIter) || (*vIter) > (*highIter) ) {
00044       return false;
00045     }   
00046     ++lowIter;
00047     ++highIter;
00048   }
00049   return true;
00050 }

bool Atlfast::BinID::operator< const BinID &    other const
 

Definition at line 53 of file BinID.cxx.

References m_int.

00053                                               {
00054   return (m_int < other.m_int);
00055 }

Member Data Documentation

int Atlfast::BinID::m_int [private]
 

Definition at line 22 of file BinID.h.

Referenced by BinID(), and operator<().

vector<double> Atlfast::BinID::m_lowEdge [private]
 

Definition at line 23 of file BinID.h.

Referenced by BinID(), isInBin(), and low().

vector<double> Atlfast::BinID::m_highEdge [private]
 

Definition at line 24 of file BinID.h.

Referenced by BinID(), high(), and isInBin().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:18:51 2003 for AtlfastAlgs by doxygen1.3-rc1