00001 #ifndef RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
00002 #define RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
00003
00004
00005
00006
00007
00008
00016
00017
00018
00019
00020
00021
00022
00023 #include "DataFormats/Math/interface/LorentzVector.h"
00024 #include "FWCore/Framework/interface/Event.h"
00025 #include "DataFormats/Common/interface/Handle.h"
00026 #include "FWCore/Framework/interface/EventSetup.h"
00027 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00028 #include <map>
00029 #include <iostream>
00030 #include <vector>
00031
00032 namespace metsig {
00033
00034 enum resolutionType { caloEE, caloEB, caloHE, caloHO, caloHF, caloHB, jet, electron, tau, muon };
00035 enum resolutionFunc { ET, PHI };
00036
00037 class SignAlgoResolutions{
00038
00039 public:
00040 SignAlgoResolutions():functionmap_(){;}
00041 SignAlgoResolutions(const edm::ParameterSet &iConfig);
00042
00043 void addResolutions(const edm::ParameterSet &iConfig);
00044 double eval(const resolutionType & type, const resolutionFunc & func, const double & et, const double & phi, const double & eta) const;
00045
00046 private:
00047 double getfunc(const resolutionType & type,const resolutionFunc & func, std::vector<double> & x) const;
00048 void addfunction(const resolutionType type, const resolutionFunc func, std::vector<double> parameters);
00049
00050 typedef std::pair<metsig::resolutionType, metsig::resolutionFunc> functionCombo;
00051 typedef std::vector<double> functionPars;
00052 std::map<functionCombo,functionPars> functionmap_;
00053
00054 double EtFunction( const functionPars &x, const functionPars & par) const;
00055 double PhiFunction( const functionPars &x, const functionPars & par) const;
00056 };
00057 }
00058 #endif