CMS 3D CMS Logo

Public Member Functions

scaleFunctionType8< T > Class Template Reference

#include <Functions.h>

Inheritance diagram for scaleFunctionType8< T >:
scaleFunctionBase< T >

List of all members.

Public Member Functions

virtual void resetParameters (std::vector< double > *scaleVec) const
 This method is used to reset the scale parameters to neutral values (useful for iterations > 0)
virtual double scale (const double &pt, const double &eta, const double &phi, const int chg, const T &parScale) const
 scaleFunctionType8 ()
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parScale, const std::vector< int > &parScaleOrder, const int muonType)
 This method is used to differentiate parameters among the different functions.

Detailed Description

template<class T>
class scaleFunctionType8< T >

Definition at line 308 of file Functions.h.


Constructor & Destructor Documentation

template<class T >
scaleFunctionType8< T >::scaleFunctionType8 ( ) [inline]

Definition at line 310 of file Functions.h.

References scaleFunctionBase< T >::parNum_.

{ this->parNum_ = 4; }

Member Function Documentation

template<class T >
virtual void scaleFunctionType8< T >::resetParameters ( std::vector< double > *  scaleVec) const [inline, virtual]

This method is used to reset the scale parameters to neutral values (useful for iterations > 0)

Reimplemented from scaleFunctionBase< T >.

Definition at line 317 of file Functions.h.

References i, and scaleFunctionBase< T >::parNum_.

                                                                   {
    scaleVec->push_back(1);
    for( int i=1; i<this->parNum_; ++i ) {
      scaleVec->push_back(0);
    }
  }
template<class T >
virtual double scaleFunctionType8< T >::scale ( const double &  pt,
const double &  eta,
const double &  phi,
const int  chg,
const T parScale 
) const [inline, virtual]

Implements scaleFunctionBase< T >.

Definition at line 311 of file Functions.h.

                                                                                                                           {
    return( (parScale[0] + parScale[1]*pt +
             parScale[2]*std::fabs(eta) +
             parScale[3]*eta*eta)*pt );
  }
template<class T >
virtual void scaleFunctionType8< T >::setParameters ( double *  Start,
double *  Step,
double *  Mini,
double *  Maxi,
int *  ind,
TString *  parname,
const T parScale,
const std::vector< int > &  parScaleOrder,
const int  muonType 
) [inline, virtual]

This method is used to differentiate parameters among the different functions.

Implements scaleFunctionBase< T >.

Definition at line 323 of file Functions.h.

References scaleFunctionBase< T >::setPar().

                                                                                                                                                                                                {
    double thisStep[] = {0.00001, 0.000001, 0.0000001, 0.0000001};
    TString thisParName[] = {"Pt offset", "Pt slope", "Eta slope", "Eta quadr"};
    if( muonType == 1 ) {
      double thisMini[] = {0.9, -0.3, -0.3, -0.3};
      double thisMaxi[] = {1.1, 0.3, 0.3, 0.3};
      this->setPar( Start, Step, Mini, Maxi, ind, parname, parScale, parScaleOrder, thisStep, thisMini, thisMaxi, thisParName );
    } else {
      // double thisMini[] = {0.985, -0.002, -0.005, -0.005};
      // double thisMaxi[] = {1.015, 0.002, 0.005, 0.005};
      double thisMini[] = {0.9, -0.002, -0.01, -0.005};
      double thisMaxi[] = {1.1,  0.002,  0.01,  0.005};
      this->setPar( Start, Step, Mini, Maxi, ind, parname, parScale, parScaleOrder, thisStep, thisMini, thisMaxi, thisParName );
    }
  }