CMS 3D CMS Logo

List of all members | Public Member Functions
smearFunctionType4 Class Reference

#include <Functions.h>

Inheritance diagram for smearFunctionType4:
smearFunctionBase

Public Member Functions

void smear (double &pt, double &eta, double &phi, const double *y, const std::vector< double > &parSmear) override
 
- Public Member Functions inherited from smearFunctionBase
 smearFunctionBase ()
 
virtual ~smearFunctionBase ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from smearFunctionBase
void smearEta (double &eta)
 
- Protected Attributes inherited from smearFunctionBase
double cotgth_
 
TRandom * gRandom_
 

Detailed Description

Definition at line 566 of file Functions.h.

Member Function Documentation

void smearFunctionType4::smear ( double &  pt,
double &  eta,
double &  phi,
const double *  y,
const std::vector< double > &  parSmear 
)
inlineoverridevirtual

Implements smearFunctionBase.

Definition at line 568 of file Functions.h.

References funct::cos(), JetChargeProducer_cfi::exp, funct::pow(), funct::sin(), and tmp.

568  {
569  pt = pt*(1.0+y[0]*parSmear[0]*pt+y[1]*parSmear[1]*std::fabs(eta)+y[5]*parSmear[5]*pow(pt,2));
570  phi = phi*(1.0+y[2]*parSmear[2]);
571  double tmp = 2*atan(exp(-eta));
572  cotgth_ = cos(tmp)/sin(tmp)*(1.0+y[3]*parSmear[3]+y[4]*parSmear[4]*std::fabs(eta));
573  smearEta(eta);
574  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void smearEta(double &eta)
Definition: Functions.h:508
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40