CMS 3D CMS Logo

SignAlgoResolutions.h

Go to the documentation of this file.
00001 #ifndef RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
00002 #define RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    METAlgorithms
00007 // Class:      SignAlgoResolutions
00008 // 
00016 //
00017 // Original Author:  Kyle Story, Freya Blekman (Cornell University)
00018 //         Created:  Fri Apr 18 11:58:33 CEST 2008
00019 // $Id: SignAlgoResolutions.h,v 1.1 2008/04/18 10:12:55 fblekman Exp $
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; // for example getvalue(caloHF,ET,et,phi,eta);
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

Generated on Tue Jun 9 17:44:06 2009 for CMSSW by  doxygen 1.5.4