CMS 3D CMS Logo

PATCaloJetMETcorrInputProducer.cc
Go to the documentation of this file.
2 
4 
6 
8 
10 {
11  template <>
13  {
14  public:
15 
16  void operator()(const pat::Jet& jet) const
17  {
18  // check that pat::Jet is of Calo-type
19  if ( !jet.isCaloJet() )
20  throw cms::Exception("InvalidInput")
21  << "Input pat::Jet is not of Calo-type !!\n";
22  }
23  bool isPatJet(const pat::Jet& jet) const {
24  return true;
25  }
26  };
27 
28  template <>
30  {
31  public:
33 
35  {
36  if ( jet.jecSetsAvailable() ) return jet.correctedP4("Uncorrected");
37  else return jet.p4();
38  }
39  };
40 }
41 
43 
45 
const LorentzVector correctedP4(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.h:158
reco::Candidate::LorentzVector operator()(const pat::Jet &jet) const
bool jecSetsAvailable() const
Definition: Jet.h:131
Definition: HeavyIon.h:7
bool isCaloJet() const
check to see if the jet is a reco::CaloJet
Definition: Jet.h:254
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Definition: Jet.py:1
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
Analysis-level calorimeter jet class.
Definition: Jet.h:80
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
CaloJetMETcorrInputProducerT< pat::Jet, PATJetCorrExtractor > PATCaloJetMETcorrInputProducer