CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SignAlgoResolutions.h
Go to the documentation of this file.
1 #ifndef RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
2 #define RECOMET_METALGORITHMS_SIGNALGORESOLUTIONS_H
3 
4 // -*- C++ -*-
5 //
6 // Package: METAlgorithms
7 // Class: SignAlgoResolutions
8 //
16 //
17 // Original Author: Kyle Story, Freya Blekman (Cornell University)
18 // Created: Fri Apr 18 11:58:33 CEST 2008
19 //
20 //
21 
33 
34 #include <map>
35 #include <iostream>
36 #include <vector>
37 
38 namespace metsig {
39 
42 
44 
45  public:
47  SignAlgoResolutions(const edm::ParameterSet &iConfig);
48 
49  void addResolutions(const edm::ParameterSet &iConfig);
50  double eval(const resolutionType & type, const resolutionFunc & func, const double & et, const double & phi, const double & eta, const double &p) const; // for example getvalue(caloHF,ET,et,phi,eta,p);
51  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,p);
52  metsig::SigInputObj evalPF(const reco::PFCandidate* candidate) const;
54  bool isFilled() const {return functionmap_.size()>0;}
55 
56  private:
57  double getfunc(const resolutionType & type,const resolutionFunc & func, std::vector<double> & x) const;
58  void addfunction(const resolutionType type, const resolutionFunc func, const std::vector<double>& parameters);
59  void initializeJetResolutions( const edm::ParameterSet &iConfig );
60 
61  typedef std::pair<metsig::resolutionType, metsig::resolutionFunc> functionCombo;
62  typedef std::vector<double> functionPars;
63  std::map<functionCombo,functionPars> functionmap_;
64 
65  double EtFunction( const functionPars &x, const functionPars & par) const;
66  double PhiFunction( const functionPars &x, const functionPars & par) const;
67  double PFunction( const functionPars &x, const functionPars &par) const;
68  double PhiConstFunction(const functionPars &x, const functionPars &par) const;
69  double ElectronPtResolution(const reco::PFCandidate *c) const;
70 
72  //temporary fix for low pT jet resolutions
73  //First index, eta bins, from 0 to 5;
74  //Second index, pt bins, from 3 to 23 GeV;
75  std::vector<double> jdpt[10];
76  std::vector<double> jdphi[10];
77 
81  };
82 }
83 #endif
type
Definition: HCALResponse.h:21
dictionary parameters
Definition: Parameters.py:2
double PhiFunction(const functionPars &x, const functionPars &par) const
void addfunction(const resolutionType type, const resolutionFunc func, const std::vector< double > &parameters)
double getfunc(const resolutionType &type, const resolutionFunc &func, std::vector< double > &x) const
metsig::SigInputObj evalPF(const reco::PFCandidate *candidate) const
std::vector< double > jdpt[10]
T eta() const
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
Jets made from PFObjects.
Definition: PFJet.h:21
double ElectronPtResolution(const reco::PFCandidate *c) const
double EtFunction(const functionPars &x, const functionPars &par) const
std::vector< double > functionPars
metsig::SigInputObj evalPFJet(const reco::PFJet *jet) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38
void initializeJetResolutions(const edm::ParameterSet &iConfig)
double PhiConstFunction(const functionPars &x, const functionPars &par) const
Definition: DDAxes.h:10
std::map< functionCombo, functionPars > functionmap_
PFEnergyResolution * pfresol_
std::vector< double > jdphi[10]
std::pair< metsig::resolutionType, metsig::resolutionFunc > functionCombo
double PFunction(const functionPars &x, const functionPars &par) const
void addResolutions(const edm::ParameterSet &iConfig)
Definition: DDAxes.h:10