CMS 3D CMS Logo

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  typedef std::vector<T> JetCollection;
28 
29 public:
32 
33 private:
34  void produce(edm::Event&, const edm::EventSetup&) override;
35 
37 
41 
42  double dRmatch_Jet_;
44 
45  double dR2match_Jet_;
47 
48  struct objectEntryType {
50  const reco::Candidate::LorentzVector& unshiftedObjectP4,
51  double dRmatch)
52  : shiftedObjectP4_(shiftedObjectP4),
53  unshiftedObjectP4_(unshiftedObjectP4),
54  dRmatch_(dRmatch),
56  if (unshiftedObjectP4.energy() > 0.) {
57  shift_ = (shiftedObjectP4.energy() / unshiftedObjectP4.energy()) - 1.;
58  isValidMatch_ = true;
59  }
60  }
64  double shift_;
65  double dRmatch_;
67  };
68 
69  std::vector<objectEntryType> objects_;
70 };
71 
72 #endif
ShiftedJetProducerByMatchedObjectT::srcJets_
edm::EDGetTokenT< JetCollection > srcJets_
Definition: ShiftedJetProducerByMatchedObject.h:38
funct::false
false
Definition: Factorize.h:29
ShiftedJetProducerByMatchedObjectT::ShiftedJetProducerByMatchedObjectT
ShiftedJetProducerByMatchedObjectT(const edm::ParameterSet &)
Definition: ShiftedJetProducerByMatchedObject.cc:10
ShiftedJetProducerByMatchedObjectT::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition: ShiftedJetProducerByMatchedObject.h:62
edm::EDGetTokenT< JetCollection >
EDProducer.h
ShiftedJetProducerByMatchedObjectT::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition: ShiftedJetProducerByMatchedObject.h:63
CandidateFwd.h
ShiftedJetProducerByMatchedObjectT::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: ShiftedJetProducerByMatchedObject.cc:31
ShiftedJetProducerByMatchedObjectT::objectEntryType::isValidMatch_
bool isValidMatch_
Definition: ShiftedJetProducerByMatchedObject.h:66
ShiftedJetProducerByMatchedObjectT::objectEntryType::~objectEntryType
~objectEntryType()
Definition: ShiftedJetProducerByMatchedObject.h:61
ShiftedJetProducerByMatchedObjectT::dRmatch_Jet_
double dRmatch_Jet_
Definition: ShiftedJetProducerByMatchedObject.h:42
ShiftedJetProducerByMatchedObjectT::srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
Definition: ShiftedJetProducerByMatchedObject.h:40
ShiftedJetProducerByMatchedObjectT::JetCollection
std::vector< T > JetCollection
Definition: ShiftedJetProducerByMatchedObject.h:27
ShiftedJetProducerByMatchedObjectT::dR2match_Jet_
double dR2match_Jet_
Definition: ShiftedJetProducerByMatchedObject.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
ShiftedJetProducerByMatchedObjectT::objectEntryType
Definition: ShiftedJetProducerByMatchedObject.h:48
Event.h
ShiftedJetProducerByMatchedObjectT::srcUnshiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
Definition: ShiftedJetProducerByMatchedObject.h:39
edm::stream::EDProducer
Definition: EDProducer.h:38
ShiftedJetProducerByMatchedObjectT::~ShiftedJetProducerByMatchedObjectT
~ShiftedJetProducerByMatchedObjectT() override
Definition: ShiftedJetProducerByMatchedObject.cc:26
edm::EventSetup
Definition: EventSetup.h:58
ShiftedJetProducerByMatchedObjectT::dRmatch_Object_
double dRmatch_Object_
Definition: ShiftedJetProducerByMatchedObject.h:43
ShiftedJetProducerByMatchedObjectT
Definition: ShiftedJetProducerByMatchedObject.h:26
InputTag.h
ShiftedJetProducerByMatchedObjectT::objects_
std::vector< objectEntryType > objects_
Definition: ShiftedJetProducerByMatchedObject.h:69
ShiftedJetProducerByMatchedObjectT::objectEntryType::shift_
double shift_
Definition: ShiftedJetProducerByMatchedObject.h:64
ShiftedJetProducerByMatchedObjectT::dR2match_Object_
double dR2match_Object_
Definition: ShiftedJetProducerByMatchedObject.h:46
EventSetup.h
Candidate.h
ParameterSet.h
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
edm::Event
Definition: Event.h:73
ShiftedJetProducerByMatchedObjectT::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition: ShiftedJetProducerByMatchedObject.h:49
ShiftedJetProducerByMatchedObjectT::moduleLabel_
std::string moduleLabel_
Definition: ShiftedJetProducerByMatchedObject.h:36
ShiftedJetProducerByMatchedObjectT::objectEntryType::dRmatch_
double dRmatch_
Definition: ShiftedJetProducerByMatchedObject.h:65