CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

smearFunctionBase Class Reference

#include <Functions.h>

Inheritance diagram for smearFunctionBase:
smearFunctionType0 smearFunctionType1 smearFunctionType2 smearFunctionType3 smearFunctionType4 smearFunctionType5 smearFunctionType6 smearFunctionType7

List of all members.

Public Member Functions

virtual void smear (double &pt, double &eta, double &phi, const double *y, const std::vector< double > &parSmear)=0
 smearFunctionBase ()
virtual ~smearFunctionBase ()=0

Protected Member Functions

void smearEta (double &eta)

Protected Attributes

double cotgth_
TRandom * gRandom_

Detailed Description

Definition at line 1345 of file Functions.h.


Constructor & Destructor Documentation

smearFunctionBase::smearFunctionBase ( ) [inline]

Definition at line 1348 of file Functions.h.

References cotgth_, and gRandom_.

                      {
    cotgth_ = 0.;
    gRandom_ = new TRandom();
  }
smearFunctionBase::~smearFunctionBase ( ) [inline, pure virtual]

Definition at line 1367 of file Functions.h.

{ }  // defined even though it's pure virtual; should be faster this way.

Member Function Documentation

virtual void smearFunctionBase::smear ( double &  pt,
double &  eta,
double &  phi,
const double *  y,
const std::vector< double > &  parSmear 
) [pure virtual]
void smearFunctionBase::smearEta ( double &  eta) [inline, protected]

Definition at line 1354 of file Functions.h.

References cotgth_, funct::log(), Pi, funct::tan(), and theta().

Referenced by smearFunctionType3::smear(), smearFunctionType4::smear(), smearFunctionType5::smear(), smearFunctionType1::smear(), and smearFunctionType2::smear().

                              {
    double theta;
    if (cotgth_!=0) {
      theta = atan(1/cotgth_);
    } else {
      theta = TMath::Pi()/2;
    }
    if (theta<0) theta += TMath::Pi();
    eta = -log(tan(theta/2));
  }

Member Data Documentation

double smearFunctionBase::cotgth_ [protected]
TRandom* smearFunctionBase::gRandom_ [protected]

Definition at line 1365 of file Functions.h.

Referenced by smearFunctionType6::smear(), and smearFunctionBase().