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 Member Functions | Protected Attributes
smearFunctionBase Class Referenceabstract

#include <Functions.h>

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

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 2845 of file Functions.h.

Constructor & Destructor Documentation

smearFunctionBase::smearFunctionBase ( )
inline

Definition at line 2848 of file Functions.h.

References cotgth_, and gRandom_.

2848  {
2849  cotgth_ = 0.;
2850  gRandom_ = new TRandom();
2851  }
TRandom * gRandom_
Definition: Functions.h:2865
smearFunctionBase::~smearFunctionBase ( )
inlinepure virtual

Definition at line 2867 of file Functions.h.

2867 { } // 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)
inlineprotected

Definition at line 2854 of file Functions.h.

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

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

2854  {
2855  double theta;
2856  if (cotgth_!=0) {
2857  theta = atan(1/cotgth_);
2858  } else {
2859  theta = TMath::Pi()/2;
2860  }
2861  if (theta<0) theta += TMath::Pi();
2862  eta = -log(tan(theta/2));
2863  }
const double Pi
Geom::Theta< T > theta() const
T eta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22

Member Data Documentation

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

Definition at line 2865 of file Functions.h.

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