6 #ifndef ResolutionFunction_h
7 #define ResolutionFunction_h
26 identifier.Prepend(
"MuonAnalysis/MomentumScaleCalibration/data/");
27 identifier.Append(
".txt");
31 std::vector<int>::const_iterator idIt =
functionId_.begin();
42 std::vector<int>::const_iterator
id =
functionId_.begin();
67 double sigmaPt(
const U & track,
const int i=0)
const {
69 std::cout <<
"Error: wrong iteration number, there are " <<
iterationNum_ <<
"iterations, ther first one is 0" << std::endl;
78 std::cout <<
"Error: wrong iteration number, there are " <<
iterationNum_ <<
"iterations, ther first one is 0" << std::endl;
85 double sigmaPhi(
const U & track,
const int i=0)
const {
87 std::cout <<
"Error: wrong iteration number, there are " <<
iterationNum_ <<
"iterations, ther first one is 0" << std::endl;
107 #endif // ResolutionFunction_h
double sigmaPt(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
ResolutionFunction(const MuScleFitDBobject *dbObject)
double sigmaCotgTh(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
void convertToArrays(T **&function_, const std::vector< T * > &functionVec_)
Convert vectors to arrays for faster random access. The first pointer is replaced, thus it is taken by reference.
resolutionFunctionBase< double * > ** resolutionFunction_
virtual double sigmaPt(const double &pt, const double &eta, const T &parval)=0
std::vector< resolutionFunctionBase< double * > * > resolutionFunctionVec_
void readParameters(TString fileName)
Parser of the parameters file.
std::vector< int > functionId_
double sigmaPhi(const U &track, const int i=0) const
The second, optional, parameter is the iteration number.
virtual double sigmaCotgTh(const double &pt, const double &eta, const T &parval)=0
resolutionFunctionBase< double * > * resolutionFunctionService(const int identifier)
Service to build the resolution functor corresponding to the passed identifier.
virtual double sigmaPhi(const double &pt, const double &eta, const T &parval)=0
ResolutionFunction(TString identifier)