/
L1OffsetCorrector.h
50 lines (40 loc) · 1.77 KB
/
L1OffsetCorrector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// L1Offset jet corrector class. Inherits from JetCorrector.h
#ifndef L1OffsetCorrector_h
#define L1OffsetCorrector_h
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "JetMETCorrections/Objects/interface/JetCorrector.h"
#include "CondFormats/JetMETObjects/interface/FactorizedJetCorrector.h"
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h"
//----- classes declaration -----------------------------------
namespace edm
{
class ParameterSet;
}
class FactorizedJetCorrector;
//----- LXXXCorrector interface -------------------------------
class L1OffsetCorrector : public JetCorrector
{
public:
//----- constructors---------------------------------------
L1OffsetCorrector(const JetCorrectorParameters& fConfig, const edm::ParameterSet& fParameters);
//----- destructor ----------------------------------------
virtual ~L1OffsetCorrector();
//----- apply correction using Jet information only -------
virtual double correction(const LorentzVector& fJet) const;
//----- apply correction using Jet information only -------
virtual double correction(const reco::Jet& fJet) const;
//----- apply correction using all event information
virtual double correction(const reco::Jet& fJet,
const edm::Event& fEvent,
const edm::EventSetup& fSetup) const;
//----- if correction needs event information -------------
virtual bool eventRequired() const {return true;}
//----- if correction needs a jet reference -------------
virtual bool refRequired() const { return false; }
private:
//----- member data ---------------------------------------
std::string mVertexCollName;
int mMinVtxNdof;
FactorizedJetCorrector* mCorrector;
};
#endif