CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1FastjetCorrector Class Reference

#include <L1FastjetCorrector.h>

Inheritance diagram for L1FastjetCorrector:
JetCorrector

Public Member Functions

virtual double correction (const LorentzVector &fJet) const
 apply correction using Jet information only More...
 
virtual double correction (const reco::Jet &fJet) const
 apply correction using Jet information only More...
 
virtual double correction (const reco::Jet &fJet, const edm::Event &fEvent, const edm::EventSetup &fSetup) const
 apply correction using all event information More...
 
virtual bool eventRequired () const
 if correction needs event information More...
 
 L1FastjetCorrector (const JetCorrectorParameters &fParam, const edm::ParameterSet &fConfig)
 
virtual bool refRequired () const
 if correction needs the jet reference More...
 
virtual ~L1FastjetCorrector ()
 
- Public Member Functions inherited from JetCorrector
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, const edm::Event &fEvent, const edm::EventSetup &fSetup) const
 apply correction using all event information More...
 
virtual double correction (const reco::Jet &fJet, const edm::RefToBase< reco::Jet > &fJetRef, const edm::Event &fEvent, const edm::EventSetup &fSetup, LorentzVector &corrected) const
 Apply vectorial correction using all event information. More...
 
 JetCorrector ()
 
virtual bool vectorialCorrection () const
 if vectorial correction is provided More...
 
virtual ~JetCorrector ()
 

Private Attributes

FactorizedJetCorrectormCorrector
 
edm::InputTag srcRho_
 

Additional Inherited Members

- Public Types inherited from JetCorrector
typedef
reco::Particle::LorentzVector 
LorentzVector
 
- Static Public Member Functions inherited from JetCorrector
static const JetCorrectorgetJetCorrector (const std::string &fName, const edm::EventSetup &fSetup)
 retrieve corrector from the event setup. troughs exception if something is missing More...
 

Detailed Description

Definition at line 17 of file L1FastjetCorrector.h.

Constructor & Destructor Documentation

L1FastjetCorrector::L1FastjetCorrector ( const JetCorrectorParameters fParam,
const edm::ParameterSet fConfig 
)

Definition at line 23 of file L1FastjetCorrector.cc.

References JetCorrectorParameters::definitions(), JetCorrectorParameters::Definitions::level(), and mCorrector.

24  : srcRho_(fConfig.getParameter<edm::InputTag>("srcRho"))
25 {
26  if (fParam.definitions().level() != "L1FastJet")
27  throw cms::Exception("L1FastjetCorrector")<<" correction level: "<<fParam.definitions().level()<<" is not L1FastJet";
28  vector<JetCorrectorParameters> vParam;
29  vParam.push_back(fParam);
30  mCorrector = new FactorizedJetCorrector(vParam);
31 }
T getParameter(std::string const &) const
FactorizedJetCorrector * mCorrector
const Definitions & definitions() const
L1FastjetCorrector::~L1FastjetCorrector ( )
virtual

Definition at line 34 of file L1FastjetCorrector.cc.

References mCorrector.

35 {
36  delete mCorrector;
37 }
FactorizedJetCorrector * mCorrector

Member Function Documentation

double L1FastjetCorrector::correction ( const LorentzVector fJet) const
virtual

apply correction using Jet information only

Implements JetCorrector.

Definition at line 45 of file L1FastjetCorrector.cc.

References edm::hlt::Exception.

46 {
47  throw cms::Exception("EventRequired")
48  <<"Wrong interface correction(LorentzVector), event required!";
49  return 1.0;
50 }
double L1FastjetCorrector::correction ( const reco::Jet fJet) const
virtual

apply correction using Jet information only

Implements JetCorrector.

Definition at line 54 of file L1FastjetCorrector.cc.

References edm::hlt::Exception.

55 {
56  throw cms::Exception("EventRequired")
57  <<"Wrong interface correction(reco::Jet), event required!";
58  return 1.0;
59 }
double L1FastjetCorrector::correction ( const reco::Jet fJet,
const edm::Event fEvent,
const edm::EventSetup fSetup 
) const
virtual

apply correction using all event information

Reimplemented from JetCorrector.

Definition at line 63 of file L1FastjetCorrector.cc.

References reco::LeafCandidate::eta(), edm::Event::getByLabel(), FactorizedJetCorrector::getCorrection(), reco::Jet::jetArea(), mCorrector, reco::LeafCandidate::pt(), query::result, rho, FactorizedJetCorrector::setJetA(), FactorizedJetCorrector::setJetEta(), FactorizedJetCorrector::setJetPt(), FactorizedJetCorrector::setRho(), and srcRho_.

66 {
68  fEvent.getByLabel(srcRho_,rho);
69  double result(1.0);
70  mCorrector->setJetEta(fJet.eta());
71  mCorrector->setJetPt(fJet.pt());
72  mCorrector->setJetA(fJet.jetArea());
73  mCorrector->setRho(*rho);
75  return result;
76 }
FactorizedJetCorrector * mCorrector
Definition: DDAxes.h:10
virtual double eta() const
momentum pseudorapidity
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
virtual double pt() const
transverse momentum
virtual float jetArea() const
get jet area
Definition: Jet.h:106
virtual bool L1FastjetCorrector::eventRequired ( ) const
inlinevirtual

if correction needs event information

Implements JetCorrector.

Definition at line 36 of file L1FastjetCorrector.h.

36 { return true; }
virtual bool L1FastjetCorrector::refRequired ( ) const
inlinevirtual

if correction needs the jet reference

Implements JetCorrector.

Definition at line 39 of file L1FastjetCorrector.h.

39 { return false; }

Member Data Documentation

FactorizedJetCorrector* L1FastjetCorrector::mCorrector
private

Definition at line 44 of file L1FastjetCorrector.h.

Referenced by correction(), L1FastjetCorrector(), and ~L1FastjetCorrector().

edm::InputTag L1FastjetCorrector::srcRho_
private

Definition at line 43 of file L1FastjetCorrector.h.

Referenced by correction().