CMS 3D CMS Logo

Exhume::Weight Class Reference

#include <GeneratorInterface/ExhumeInterface/interface/Weight.h>

Inheritance diagram for Exhume::Weight:

Exhume::Event Exhume::TwoSpace Exhume::DiPhoton Exhume::GG Exhume::QQ

List of all members.

Public Member Functions

std::map< double, double > GetFuncMap ()
std::map< double, double > GetLineShape ()
double GetTotalIntegral ()
 Weight ()
virtual ~Weight ()

Protected Member Functions

void AddPoint (const double &, const double &)
double GetFunc (const double &xx_)
double GetValue (const double &xx_)
virtual double WeightFunc (const double &)=0
void WeightInit (const double &, const double &)

Protected Attributes

double Max_
double TotalIntegral

Private Attributes

std::map< double, double > FuncMap
std::map< double, double > LineShape
unsigned int NPoints


Detailed Description

Definition at line 14 of file Weight.h.


Constructor & Destructor Documentation

Exhume::Weight::Weight (  )  [inline]

Definition at line 18 of file Weight.h.

References NPoints.

00018 {NPoints = 1000;};

virtual Exhume::Weight::~Weight (  )  [inline, virtual]

Definition at line 19 of file Weight.h.

00019 {};


Member Function Documentation

void Exhume::Weight::AddPoint ( const double &  ,
const double &   
) [protected]

double Exhume::Weight::GetFunc ( const double &  xx_  )  [inline, protected]

Definition at line 36 of file Weight.h.

References FuncMap, Max_, and WeightFunc().

00036                                             {
00037       if(xx_ > Max_){
00038         return(WeightFunc(xx_) );
00039       }
00040 
00041       std::map<double, double>::iterator high_, low_;
00042       high_ = FuncMap.upper_bound(xx_);
00043       low_ = high_;
00044       low_--;
00045 
00046       return( low_->second + 
00047               (high_->second - low_->second) * (xx_ - low_->first)/
00048               (high_->first - low_->first));
00049     };

std::map<double, double> Exhume::Weight::GetFuncMap (  )  [inline]

Definition at line 20 of file Weight.h.

References FuncMap.

00020                                               {
00021       return(FuncMap);
00022     };

std::map<double, double> Exhume::Weight::GetLineShape (  )  [inline]

Definition at line 27 of file Weight.h.

References LineShape.

00027                                                 {
00028       return(LineShape);
00029     };

double Exhume::Weight::GetTotalIntegral (  )  [inline]

Definition at line 23 of file Weight.h.

References TotalIntegral.

00023                                     {
00024       return(TotalIntegral);
00025     };

double Exhume::Weight::GetValue ( const double &  xx_  )  [inline, protected]

Definition at line 51 of file Weight.h.

References LineShape.

00051                                              {
00052 
00053       std::map<double, double>::iterator high_, low_;
00054       high_ = LineShape.upper_bound(xx_);
00055       
00056       if(high_==LineShape.end())high_--;
00057 
00058       low_ = high_;
00059       low_--;
00060 
00061       return( low_->second + 
00062               (high_->second - low_->second) * (xx_ - low_->first)/
00063               (high_->first - low_->first));
00064     };

virtual double Exhume::Weight::WeightFunc ( const double &   )  [protected, pure virtual]

Implemented in Exhume::Event, and Exhume::TwoSpace.

Referenced by GetFunc().

void Exhume::Weight::WeightInit ( const double &  ,
const double &   
) [protected]


Member Data Documentation

std::map<double, double> Exhume::Weight::FuncMap [private]

Definition at line 73 of file Weight.h.

Referenced by GetFunc(), and GetFuncMap().

std::map<double, double> Exhume::Weight::LineShape [private]

Definition at line 74 of file Weight.h.

Referenced by GetLineShape(), and GetValue().

double Exhume::Weight::Max_ [protected]

Definition at line 67 of file Weight.h.

Referenced by GetFunc().

unsigned int Exhume::Weight::NPoints [private]

Definition at line 72 of file Weight.h.

Referenced by Weight().

double Exhume::Weight::TotalIntegral [protected]

Definition at line 68 of file Weight.h.

Referenced by GetTotalIntegral().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:46:54 2009 for CMSSW by  doxygen 1.5.4