CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
heppy::scaleFunction50< T > Class Template Reference

#include <MuScleFitCorrector_Functions.h>

Inheritance diagram for heppy::scaleFunction50< T >:
heppy::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 heppy::scaleFunctionBase< T >
virtual int parNum () const
 
virtual ~scaleFunctionBase ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from heppy::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)
 
- Protected Attributes inherited from heppy::scaleFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class heppy::scaleFunction50< T >

Definition at line 82 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements heppy::scaleFunctionBase< T >.

Definition at line 85 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta, PVValHelper::phase2, and funct::sin().

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