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

Constructor & Destructor Documentation

smearFunctionBase::smearFunctionBase ( )
inline

Definition at line 502 of file Functions.h.

References cotgth_, and gRandom_.

502  {
503  cotgth_ = 0.;
504  gRandom_ = new TRandom();
505  }
TRandom * gRandom_
Definition: Functions.h:519
smearFunctionBase::~smearFunctionBase ( )
inlinepure virtual

Definition at line 521 of file Functions.h.

521 { } // 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 508 of file Functions.h.

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

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

508  {
509  double theta;
510  if (cotgth_!=0) {
511  theta = atan(1/cotgth_);
512  } else {
513  theta = TMath::Pi()/2;
514  }
515  if (theta<0) theta += TMath::Pi();
516  eta = -log(tan(theta/2));
517  }
const double Pi
Geom::Theta< T > theta() const
T eta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
tuple log
Definition: cmsBatch.py:347

Member Data Documentation

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

Definition at line 519 of file Functions.h.

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