CMS 3D CMS Logo

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 
47  jet,
49  tau,
58  };
60 
62  public:
64  SignAlgoResolutions(const edm::ParameterSet &iConfig);
65 
66  void addResolutions(const edm::ParameterSet &iConfig);
67  double eval(const resolutionType &type,
68  const resolutionFunc &func,
69  const double &et,
70  const double &phi,
71  const double &eta,
72  const double &p) const; // for example getvalue(caloHF,ET,et,phi,eta,p);
73  double eval(const resolutionType &type,
74  const resolutionFunc &func,
75  const double &et,
76  const double &phi,
77  const double &eta) const; // for example getvalue(caloHF,ET,et,phi,eta,p);
78  metsig::SigInputObj evalPF(const reco::PFCandidate *candidate) const;
80  bool isFilled() const { return !functionmap_.empty(); }
81 
82  private:
83  double getfunc(const resolutionType &type, const resolutionFunc &func, std::vector<double> &x) const;
84  void addfunction(const resolutionType type, const resolutionFunc func, const std::vector<double> &parameters);
85  void initializeJetResolutions(const edm::ParameterSet &iConfig);
86 
87  typedef std::pair<metsig::resolutionType, metsig::resolutionFunc> functionCombo;
88  typedef std::vector<double> functionPars;
89  std::map<functionCombo, functionPars> functionmap_;
90 
91  double EtFunction(const functionPars &x, const functionPars &par) const;
92  double PhiFunction(const functionPars &x, const functionPars &par) const;
93  double PFunction(const functionPars &x, const functionPars &par) const;
94  double PhiConstFunction(const functionPars &x, const functionPars &par) const;
95  double ElectronPtResolution(const reco::PFCandidate *c) const;
96 
98  //temporary fix for low pT jet resolutions
99  //First index, eta bins, from 0 to 5;
100  //Second index, pt bins, from 3 to 23 GeV;
101  std::vector<double> jdpt[10];
102  std::vector<double> jdphi[10];
103 
107  };
108 } // namespace metsig
109 #endif
metsig::caloHB
Definition: SignAlgoResolutions.h:46
metsig::caloHE
Definition: SignAlgoResolutions.h:43
PFEnergyResolution
Definition: PFEnergyResolution.h:30
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
Handle.h
metsig::SignAlgoResolutions::PhiFunction
double PhiFunction(const functionPars &x, const functionPars &par) const
Definition: SignAlgoResolutions.cc:356
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
metsig::TRACKP
Definition: SignAlgoResolutions.h:59
metsig::SignAlgoResolutions::PFunction
double PFunction(const functionPars &x, const functionPars &par) const
Definition: SignAlgoResolutions.cc:371
metsig::ET
Definition: SignAlgoResolutions.h:59
metsig::SignAlgoResolutions::evalPF
metsig::SigInputObj evalPF(const reco::PFCandidate *candidate) const
Definition: SignAlgoResolutions.cc:64
metsig::tau
Definition: SignAlgoResolutions.h:49
PFCandidate.h
metsig::SignAlgoResolutions::PhiConstFunction
double PhiConstFunction(const functionPars &x, const functionPars &par) const
Definition: SignAlgoResolutions.cc:376
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PFJet.h
metsig::SignAlgoResolutions::functionmap_
std::map< functionCombo, functionPars > functionmap_
Definition: SignAlgoResolutions.h:89
metsig::SignAlgoResolutions::getfunc
double getfunc(const resolutionType &type, const resolutionFunc &func, std::vector< double > &x) const
Definition: SignAlgoResolutions.cc:317
metsig::SignAlgoResolutions::pfresol_
PFEnergyResolution * pfresol_
Definition: SignAlgoResolutions.h:106
metsig::SignAlgoResolutions::SignAlgoResolutions
SignAlgoResolutions()
Definition: SignAlgoResolutions.h:63
metsig::SignAlgoResolutions::jdphi
std::vector< double > jdphi[10]
Definition: SignAlgoResolutions.h:102
metsig::SignAlgoResolutions::initializeJetResolutions
void initializeJetResolutions(const edm::ParameterSet &iConfig)
Definition: SignAlgoResolutions.cc:380
metsig::PFtype4
Definition: SignAlgoResolutions.h:54
metsig::SignAlgoResolutions::functionPars
std::vector< double > functionPars
Definition: SignAlgoResolutions.h:88
JetResolution.h
metsig::SignAlgoResolutions::eval
double eval(const resolutionType &type, const resolutionFunc &func, const double &et, const double &phi, const double &eta, const double &p) const
Definition: SignAlgoResolutions.cc:49
metsig::SignAlgoResolutions::ElectronPtResolution
double ElectronPtResolution(const reco::PFCandidate *c) const
Definition: SignAlgoResolutions.cc:408
SigInputObj.h
metsig::caloEB
Definition: SignAlgoResolutions.h:42
PVValHelper::eta
Definition: PVValidationHelpers.h:70
metsig::PFtype3
Definition: SignAlgoResolutions.h:53
metsig::electron
Definition: SignAlgoResolutions.h:48
metsig
Definition: SigInputObj.h:27
metsig::PFtype6
Definition: SignAlgoResolutions.h:56
metsig::caloHO
Definition: SignAlgoResolutions.h:44
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
metsig::resolutionType
resolutionType
Definition: SignAlgoResolutions.h:40
metsig::PFtype1
Definition: SignAlgoResolutions.h:51
metsig::caloEE
Definition: SignAlgoResolutions.h:41
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
metsig::SignAlgoResolutions::isFilled
bool isFilled() const
Definition: SignAlgoResolutions.h:80
JetResolution
Definition: JetResolution.h:11
metsig::SignAlgoResolutions::ptResol_
JetResolution * ptResol_
Definition: SignAlgoResolutions.h:104
LorentzVector.h
metsig::SignAlgoResolutions::ptResolThreshold_
double ptResolThreshold_
Definition: SignAlgoResolutions.h:97
metsig::SignAlgoResolutions::EtFunction
double EtFunction(const functionPars &x, const functionPars &par) const
Definition: SignAlgoResolutions.cc:344
metsig::SignAlgoResolutions::addResolutions
void addResolutions(const edm::ParameterSet &iConfig)
Definition: SignAlgoResolutions.cc:151
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
metsig::PFtype2
Definition: SignAlgoResolutions.h:52
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
metsig::SignAlgoResolutions::jdpt
std::vector< double > jdpt[10]
Definition: SignAlgoResolutions.h:101
metsig::SignAlgoResolutions::addfunction
void addfunction(const resolutionType type, const resolutionFunc func, const std::vector< double > &parameters)
Definition: SignAlgoResolutions.cc:310
metsig::SignAlgoResolutions::functionCombo
std::pair< metsig::resolutionType, metsig::resolutionFunc > functionCombo
Definition: SignAlgoResolutions.h:87
metsig::PHI
Definition: SignAlgoResolutions.h:59
PFEnergyResolution.h
metsig::SignAlgoResolutions
Definition: SignAlgoResolutions.h:61
metsig::jet
Definition: SignAlgoResolutions.h:47
metsig::muon
Definition: SignAlgoResolutions.h:50
metsig::PFtype7
Definition: SignAlgoResolutions.h:57
EventSetup.h
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
metsig::resolutionFunc
resolutionFunc
Definition: SignAlgoResolutions.h:59
Candidate.h
ParameterSet.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
metsig::PFtype5
Definition: SignAlgoResolutions.h:55
metsig::SigInputObj
Definition: SigInputObj.h:29
metsig::SignAlgoResolutions::phiResol_
JetResolution * phiResol_
Definition: SignAlgoResolutions.h:105
metsig::caloHF
Definition: SignAlgoResolutions.h:45
metsig::SignAlgoResolutions::evalPFJet
metsig::SigInputObj evalPFJet(const reco::Jet *jet) const
Definition: SignAlgoResolutions.cc:121
metsig::CONSTPHI
Definition: SignAlgoResolutions.h:59