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 &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 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 ~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< ParameterSet > &parSet)
 
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...
 
- Protected Attributes inherited from scaleFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class scaleFunction50< T >

Definition at line 81 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

◆ scaleFunction50()

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

Definition at line 83 of file MuScleFitCorrector_Functions.h.

83 { this->parNum_ = 27; }

References scaleFunctionBase< T >::parNum_.

Member Function Documentation

◆ scale()

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 84 of file MuScleFitCorrector_Functions.h.

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

References chg, PVValHelper::eta, HLT_2018_cff::phase, phi, DiDispStaMuonMonitor_cfi::pt, and funct::sin().

DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
HLT_2018_cff.phase
phase
Definition: HLT_2018_cff.py:5346
chg
const float chg[109]
Definition: CoreSimTrack.cc:5
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PVValHelper::eta
Definition: PVValidationHelpers.h:69
scaleFunctionBase::parNum_
int parNum_
Definition: Functions.h:79
DDAxes::phi