6 #ifndef MomentumScaleCorrector_h 7 #define MomentumScaleCorrector_h 36 identifier.Prepend(
"MuonAnalysis/MomentumScaleCalibration/data/");
37 identifier.Append(
".txt");
48 std::vector<int>::const_iterator
id =
functionId_.begin();
76 double pt = track.pt();
89 double pt = lorentzVector.Pt();
104 #endif // MomentumScaleCorrector_h scaleFunctionBase< double * > * scaleFunctionService(const int identifier)
Service to build the scale functor corresponding to the passed identifier.
virtual double scale(const double &pt, const double &eta, const double &phi, const int chg, const T &parScale) const =0
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.
scaleFunctionBase< double * > ** scaleFunction_
void readParameters(TString fileName)
Parser of the parameters file.
reco::Particle::LorentzVector lorentzVector
MomentumScaleCorrector(TString identifier)
std::vector< int > functionId_
double operator()(const U &track)
Method to do the corrections. It is templated to work with all the track types.
MomentumScaleCorrector(const MuScleFitDBobject *dbObject)
double correct(const U &lorentzVector)
Alternative method that can be used with lorentzVectors.
~MomentumScaleCorrector()
std::vector< scaleFunctionBase< double * > * > scaleFunctionVec_