CMS 3D CMS Logo

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

#include <MuScleFitCorrector_Functions.h>

Inheritance diagram for resolutionFunction57< T >:
resolutionFunctionBase< T >

Public Member Functions

double centralParabola (const double &pt, const double &eta, const T &parval)
 
double getGEO (const double &pt, const double &eta, const T &parval)
 
double getMSC (const double &pt, const double &eta, const T &parval)
 
double leftLine (const double &pt, const double &eta, const T &parval)
 
double leftParabola (const double &pt, const double &eta, const T &parval)
 
double middleParabola (const double &pt, const double &eta, const T &parval)
 
 resolutionFunction57 ()
 
double rightLine (const double &pt, const double &eta, const T &parval)
 
double rightParabola (const double &pt, const double &eta, const T &parval)
 
virtual double sigmaPt (const double &pt, const double &eta, const T &parval)
 
- Public Member Functions inherited from resolutionFunctionBase< T >
virtual double covPt1Pt2 (const double &pt1, const double &eta1, const double &pt2, const double &eta2, const T &parval)
 
virtual int parNum () const
 
virtual int parNum () const
 
 resolutionFunctionBase ()
 
 resolutionFunctionBase ()
 
virtual void setParameters (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, const int muonType)
 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 double sigmaCotgTh (const double &pt, const double &eta, const T &parval)=0
 
virtual double sigmaPhi (const double &pt, const double &eta, const T &parval)=0
 
virtual double sigmaPtError (const double &pt, const double &eta, const T &parval, const T &parError)
 
virtual ~resolutionFunctionBase ()=0
 
virtual ~resolutionFunctionBase ()=0
 

Additional Inherited Members

- Protected Member Functions inherited from resolutionFunctionBase< T >
virtual void setPar (double *Start, double *Step, double *Mini, double *Maxi, int *ind, TString *parname, const T &parResol, const std::vector< int > &parResolOrder, 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 resolutionFunctionBase< T >
int parNum_
 

Detailed Description

template<class T>
class resolutionFunction57< T >

Definition at line 201 of file MuScleFitCorrector_Functions.h.

Constructor & Destructor Documentation

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

Definition at line 203 of file MuScleFitCorrector_Functions.h.

203 { this->parNum_ = 17; }

Member Function Documentation

template<class T >
double resolutionFunction57< T >::centralParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 218 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

218  {
219  return parval[4] + parval[5]*eta*eta;
220  }
template<class T >
double resolutionFunction57< T >::getGEO ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 205 of file MuScleFitCorrector_Functions.h.

205  {
206  // geometrical term
207  double qGEO(0);
208  if ( eta < parval[0] ) {
209  qGEO = parval[10]*(eta-parval[0])*(eta-parval[0])+parval[11];
210  } else if ( parval[0] <= eta && eta < parval[3] ) {
211  qGEO = parval[11];
212  } else {
213  qGEO = parval[12]*(eta-parval[3])*(eta-parval[3])+parval[11];
214  }
215  return qGEO;
216  }
template<class T >
double resolutionFunction57< T >::getMSC ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 251 of file MuScleFitCorrector_Functions.h.

251  {
252  // MSC term
253  double qMSC(0);
254  if ( eta < parval[0] ) {
255  qMSC = leftParabola(pt,eta,parval);
256  } else if ( parval[0] <= eta && eta < parval[13] ) {
257  qMSC = leftLine(pt,eta,parval);
258  } else if ( parval[13] <= eta && eta < parval[1] ) {
259  qMSC = middleParabola(pt,eta,parval);
260  } else if ( parval[1] <= eta && eta < parval[2] ) {
261  qMSC = centralParabola(pt,eta,parval);
262  } else if ( parval[2] <= eta && eta < parval[14] ) {
263  qMSC = middleParabola(pt,eta,parval);
264  } else if ( parval[14] <= eta && eta < parval[3] ) {
265  qMSC = rightLine(pt,eta,parval);
266  } else {
267  qMSC = rightParabola(pt,eta,parval);
268  }
269  return qMSC;
270  }
double centralParabola(const double &pt, const double &eta, const T &parval)
double rightParabola(const double &pt, const double &eta, const T &parval)
double leftLine(const double &pt, const double &eta, const T &parval)
double middleParabola(const double &pt, const double &eta, const T &parval)
double rightLine(const double &pt, const double &eta, const T &parval)
double leftParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::leftLine ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 234 of file MuScleFitCorrector_Functions.h.

234  {
235  double x_1 = parval[13];
236  double y_1 = middleParabola(pt, parval[13], parval);
237  double x_2 = parval[0];
238  double y_2 = leftParabola(pt, parval[0], parval);
239  return( (eta - x_1)*(y_2 - y_1)/(x_2 - x_1) + y_1 );
240  }
double middleParabola(const double &pt, const double &eta, const T &parval)
double leftParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::leftParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 226 of file MuScleFitCorrector_Functions.h.

226  {
227  return parval[6] + parval[7]*(eta-parval[0])*(eta-parval[0]);
228  }
template<class T >
double resolutionFunction57< T >::middleParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 222 of file MuScleFitCorrector_Functions.h.

References PVValHelper::eta.

222  {
223  return parval[15] + parval[16]*eta*eta;
224  }
template<class T >
double resolutionFunction57< T >::rightLine ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 242 of file MuScleFitCorrector_Functions.h.

242  {
243  double x_1 = parval[14];
244  double y_1 = middleParabola(pt, parval[14], parval);
245  double x_2 = parval[3];
246  double y_2 = rightParabola(pt, parval[3], parval);
247  return( (eta - x_1)*(y_2 - y_1)/(x_2 - x_1) + y_1 );
248  }
double rightParabola(const double &pt, const double &eta, const T &parval)
double middleParabola(const double &pt, const double &eta, const T &parval)
template<class T >
double resolutionFunction57< T >::rightParabola ( const double &  pt,
const double &  eta,
const T parval 
)
inline

Definition at line 230 of file MuScleFitCorrector_Functions.h.

230  {
231  return parval[8] + parval[9]*(eta-parval[3])*(eta-parval[3]);
232  }
template<class T >
virtual double resolutionFunction57< T >::sigmaPt ( const double &  pt,
const double &  eta,
const T parval 
)
inlinevirtual

Implements resolutionFunctionBase< T >.

Definition at line 272 of file MuScleFitCorrector_Functions.h.

References funct::pow(), and mathSSE::sqrt().

273  {
274  double qGEO = getGEO(pt, eta, parval);
275  double qMSC = getMSC(pt, eta, parval);
276  return sqrt(pow(qGEO*pt,2) + pow(qMSC,2));
277  }
double getMSC(const double &pt, const double &eta, const T &parval)
T sqrt(T t)
Definition: SSEVec.h:18
double getGEO(const double &pt, const double &eta, const T &parval)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40