CMS 3D CMS Logo

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

Constructor & Destructor Documentation

◆ smearFunctionBase()

smearFunctionBase::smearFunctionBase ( )
inline

Definition at line 636 of file Functions.h.

References cotgth_, and gRandom_.

636  {
637  cotgth_ = 0.;
638  gRandom_ = new TRandom();
639  }
TRandom * gRandom_
Definition: Functions.h:655

◆ ~smearFunctionBase()

smearFunctionBase::~smearFunctionBase ( )
inlinepure virtual

Definition at line 657 of file Functions.h.

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

Member Function Documentation

◆ smear()

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

◆ smearEta()

void smearFunctionBase::smearEta ( double &  eta)
inlineprotected

Definition at line 643 of file Functions.h.

References cotgth_, PVValHelper::eta, CrabHelper::log, Pi, funct::tan(), and tauSpinnerTable_cfi::theta.

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

643  {
644  double theta;
645  if (cotgth_ != 0) {
646  theta = atan(1 / cotgth_);
647  } else {
648  theta = TMath::Pi() / 2;
649  }
650  if (theta < 0)
651  theta += TMath::Pi();
652  eta = -log(tan(theta / 2));
653  }
const double Pi
Tan< T >::type tan(const T &t)
Definition: Tan.h:22

Member Data Documentation

◆ cotgth_

double smearFunctionBase::cotgth_
protected

◆ gRandom_

TRandom* smearFunctionBase::gRandom_
protected

Definition at line 655 of file Functions.h.

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