Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:38

0001 #ifndef TauJetCorrector_h
0002 #define TauJetCorrector_h
0003 #include "JetMETCorrections/Objects/interface/JetCorrector.h"
0004 #include <map>
0005 #include <string>
0006 #include <vector>
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 ///
0010 /// jet energy corrections from Taujet calibration
0011 ///
0012 
0013 class TauJetCorrector : public JetCorrector {
0014 public:
0015   TauJetCorrector(const edm::ParameterSet& fParameters);
0016   ~TauJetCorrector() override;
0017   double correction(const LorentzVector& fJet) const override;
0018   double correction(const reco::Jet&) const override;
0019 
0020   void setParameters(std::string, int);
0021   /// if correction needs event information
0022   bool eventRequired() const override { return false; }
0023 
0024 private:
0025   class ParametrizationTauJet {
0026   public:
0027     ParametrizationTauJet(int ptype, const std::vector<double>& x, double u) {
0028       type = ptype;
0029       theParam[type] = x;
0030       theEtabound[type] = u;
0031       //cout<<"ParametrizationTauJet "<<type<<" "<<u<<endl;
0032     };
0033 
0034     double value(double, double) const;
0035 
0036   private:
0037     int type;
0038     std::map<int, std::vector<double> > theParam;
0039     std::map<int, double> theEtabound;
0040   };
0041 
0042   typedef std::map<double, ParametrizationTauJet*> ParametersMap;
0043   ParametersMap parametrization;
0044   int type;
0045 };
0046 
0047 #endif