CMS 3D CMS Logo

List of all members | Public Member Functions
scaleFunction50< T > Class Template Reference

#include <MuScleFitCorrector_Functions.h>

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

Public Member Functions

virtual double scale (const double &pt, const double &eta, const double &phi, const int chg, const T &parScale) const
 
 scaleFunction50 ()
 
- Public Member Functions inherited from scaleFunctionBase< T >
virtual int parNum () const
 
virtual int parNum () const
 
virtual void resetParameters (std::vector< double > *scaleVec) const
 This method is used to reset the scale parameters to neutral values (useful for iterations > 0) More...
 
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)=0
 This method is used to differentiate parameters among the different functions. More...
 
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const std::vector< double > &parStep, const std::vector< double > &parMin, const std::vector< double > &parMax, const int muonType)
 
virtual ~scaleFunctionBase ()=0
 
virtual ~scaleFunctionBase ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from scaleFunctionBase< T >
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const std::vector< ParSet > &parSet)
 
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parScale, const std::vector< int > &parScaleOrder, double *thisStep, double *thisMini, double *thisMaxi, TString *thisParName)
 This method sets the parameters. More...
 
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const std::vector< ParameterSet > &parSet)
 
- Protected Attributes inherited from scaleFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class scaleFunction50< T >

Definition at line 76 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

template<class T >
scaleFunction50< T >::scaleFunction50 ( )
inline

Definition at line 78 of file MuScleFitCorrector_Functions.h.

78 { this->parNum_ = 27; }

Member Function Documentation

template<class T >
virtual double scaleFunction50< T >::scale ( const double &  pt,
const double &  eta,
const double &  phi,
const int  chg,
const T parScale 
) const
inlinevirtual

Implements scaleFunctionBase< T >.

Definition at line 79 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta, hcalRecAlgoESProd_cfi::phase, EnergyCorrector::pt, and funct::sin().

79  {
80  double ampl(0), phase(0), twist(0), ampl2(0), freq2(0), phase2(0);
81 
82  // very bwd bin
83  if ( eta < parScale[4] ) {
84  ampl = parScale[1]; phase = parScale[2]; ampl2 = parScale[21]; freq2 = parScale[22]; phase2 = parScale[23];
85  twist = parScale[3]*(eta-parScale[4])+parScale[7]*(parScale[4]-parScale[8])+parScale[11]*parScale[8];
86  // bwd bin
87  } else if ( parScale[4] <= eta && eta < parScale[8] ) {
88  ampl = parScale[5]; phase = parScale[6];
89  twist = parScale[7]*(eta-parScale[8])+parScale[11]*parScale[8] ;
90  // barrel bin
91  } else if ( parScale[8] <= eta && eta < parScale[12] ) {
92  ampl = parScale[9]; phase = parScale[10];
93  twist = parScale[11]*eta;
94  // fwd bin
95  } else if ( parScale[12] <= eta && eta < parScale[16] ) {
96  ampl = parScale[13]; phase = parScale[14];
97  twist = parScale[15]*(eta-parScale[12])+parScale[11]*parScale[12];
98  // very fwd bin
99  } else if ( parScale[16] < eta ) {
100  ampl = parScale[17]; phase = parScale[18]; ampl2 = parScale[24]; freq2 = parScale[25]; phase2 = parScale[26];
101  twist = parScale[19]*(eta-parScale[16])+parScale[15]*(parScale[16]-parScale[12])+parScale[11]*parScale[12];
102  }
103 
104  // apply the correction
105  double curv = (1.+parScale[0])*((double)chg/pt
106  -twist
107  -ampl*sin(phi+phase)
108  -ampl2*sin(freq2*phi+phase2)
109  -0.5*parScale[20]);
110  return 1./((double)chg*curv);
111  }
const float chg[109]
Definition: CoreSimTrack.cc:5
Sin< T >::type sin(const T &t)
Definition: Sin.h:22