CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
resolutionFunctionBase< T > Class Template Referenceabstract

#include <Functions.h>

Inheritance diagram for resolutionFunctionBase< T >:
resolutionFunction45< T > resolutionFunction46< T > resolutionFunction57< T > resolutionFunctionType0< T > resolutionFunctionType45< T > resolutionFunctionType46< T > resolutionFunctionType47< T >

Public Member Functions

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 sigmaPt (const double &pt, const double &eta, const T &parval)=0
 
virtual double sigmaPt (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
 

Protected Member Functions

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

int parNum_
 

Detailed Description

template<class T>
class resolutionFunctionBase< T >

Resolution functions.
Need to use templates to make it work with both array and std::vector<double>.

Definition at line 676 of file Functions.h.

Constructor & Destructor Documentation

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

Definition at line 689 of file Functions.h.

689 {}
template<class T >
resolutionFunctionBase< T >::~resolutionFunctionBase ( )
inlinepure virtual

Definition at line 736 of file Functions.h.

736 { } // defined even though it's pure virtual; should be faster this way.
template<class T>
resolutionFunctionBase< T >::resolutionFunctionBase ( )
inline

Definition at line 125 of file MuScleFitCorrector_Functions.h.

125 {}
template<class T>
virtual resolutionFunctionBase< T >::~resolutionFunctionBase ( )
pure virtual

Member Function Documentation

template<class T>
virtual double resolutionFunctionBase< T >::covPt1Pt2 ( const double &  pt1,
const double &  eta1,
const double &  pt2,
const double &  eta2,
const T parval 
)
inlinevirtual

Reimplemented in resolutionFunctionType47< T >.

Definition at line 685 of file Functions.h.

Referenced by ErrorsPropagationAnalyzer::massResolution(), and MuScleFitUtils::massResolution().

686  {
687  return 0.;
688  }
template<class T>
virtual int resolutionFunctionBase< T >::parNum ( ) const
inlinevirtual

Definition at line 127 of file MuScleFitCorrector_Functions.h.

127 { return parNum_; }
template<class T>
virtual int resolutionFunctionBase< T >::parNum ( ) const
inlinevirtual
template<class T>
virtual void resolutionFunctionBase< T >::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 
)
inlineprotectedvirtual

This method sets the parameters.

Definition at line 708 of file Functions.h.

Referenced by resolutionFunctionType45< T >::setParameters(), resolutionFunctionType46< T >::setParameters(), and resolutionFunctionType47< T >::setParameters().

710  {
711  for( int iPar=0; iPar<this->parNum_; ++iPar ) {
712  Start[iPar] = parResol[iPar];
713  Step[iPar] = thisStep[iPar];
714  Mini[iPar] = thisMini[iPar];
715  Maxi[iPar] = thisMaxi[iPar];
716  ind[iPar] = parResolOrder[iPar];
717  parname[iPar] = thisParName[iPar];
718  }
719  }
template<class T>
virtual void resolutionFunctionBase< T >::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 
)
inlineprotectedvirtual

Definition at line 720 of file Functions.h.

721  {
722  if( int(parSet.size()) != this->parNum_ ) {
723  std::cout << "Error: wrong number of parameter initializations = " << parSet.size() << ". Number of parameters is " << this->parNum_ << std::endl;
724  exit(1);
725  }
726  for( int iPar=0; iPar<this->parNum_; ++iPar ) {
727  Start[iPar] = parResol[iPar];
728  Step[iPar] = parSet[iPar].step;
729  Mini[iPar] = parSet[iPar].mini;
730  Maxi[iPar] = parSet[iPar].maxi;
731  ind[iPar] = parResolOrder[iPar];
732  parname[iPar] = parSet[iPar].name;
733  }
734  }
tuple cout
Definition: gather_cfg.py:145
template<class T>
virtual void resolutionFunctionBase< T >::setParameters ( double *  Start,
double *  Step,
double *  Mini,
double *  Maxi,
int *  ind,
TString *  parname,
const T parResol,
const std::vector< int > &  parResolOrder,
const int  muonType 
)
inlinevirtual

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

Reimplemented in resolutionFunctionType47< T >, resolutionFunctionType46< T >, resolutionFunctionType45< T >, and resolutionFunctionType0< T >.

Definition at line 692 of file Functions.h.

Referenced by MuScleFitUtils::minimizeLikelihood().

693  {};
template<class T>
virtual void resolutionFunctionBase< T >::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 
)
inlinevirtual

Reimplemented in resolutionFunctionType47< T >, resolutionFunctionType46< T >, resolutionFunctionType45< T >, and resolutionFunctionType0< T >.

Definition at line 694 of file Functions.h.

700  {
701  std::cout << "The method setParameters must be implemented for this resolution function" << std::endl;
702  exit(1);
703  }
tuple cout
Definition: gather_cfg.py:145
template<class T>
virtual double resolutionFunctionBase< T >::sigmaCotgTh ( const double &  pt,
const double &  eta,
const T parval 
)
pure virtual
template<class T>
virtual double resolutionFunctionBase< T >::sigmaPhi ( const double &  pt,
const double &  eta,
const T parval 
)
pure virtual
template<class T>
virtual double resolutionFunctionBase< T >::sigmaPt ( const double &  pt,
const double &  eta,
const T parval 
)
pure virtual
template<class T>
virtual double resolutionFunctionBase< T >::sigmaPt ( const double &  pt,
const double &  eta,
const T parval 
)
pure virtual
template<class T>
virtual double resolutionFunctionBase< T >::sigmaPtError ( const double &  pt,
const double &  eta,
const T parval,
const T parError 
)
inlinevirtual

Member Data Documentation

template<class T>
int resolutionFunctionBase< T >::parNum_
protected