CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ShiftedJetProducerByMatchedObject.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatUtils_ShiftedJetProducerByMatchedObject_h
2 #define PhysicsTools_PatUtils_ShiftedJetProducerByMatchedObject_h
3 
18 
21 
22 #include <string>
23 #include <vector>
24 
25 template <typename T>
27 {
28  typedef std::vector<T> JetCollection;
29 
30  public:
31 
34 
35  private:
36 
37  void produce(edm::Event&, const edm::EventSetup&);
38 
40 
44 
45  double dRmatch_Jet_;
47 
48  double dR2match_Jet_;
50 
52  {
54  const reco::Candidate::LorentzVector& unshiftedObjectP4, double dRmatch)
55  : shiftedObjectP4_(shiftedObjectP4),
56  unshiftedObjectP4_(unshiftedObjectP4),
57  dRmatch_(dRmatch),
59  {
60  if ( unshiftedObjectP4.energy() > 0. ) {
61  shift_ = (shiftedObjectP4.energy()/unshiftedObjectP4.energy()) - 1.;
62  isValidMatch_ = true;
63  }
64  }
68  double shift_;
69  double dRmatch_;
71  };
72 
73  std::vector<objectEntryType> objects_;
74 };
75 
76 #endif
77 
78 
79 
80 
void produce(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
volatile std::atomic< bool > shutdown_flag false
ShiftedJetProducerByMatchedObjectT(const edm::ParameterSet &)
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)