CMS 3D CMS Logo

ShiftedPFCandidateProducerByMatchedObject.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatUtils_ShiftedPFCandidateProducerByMatchedObject_h
2 #define PhysicsTools_PatUtils_ShiftedPFCandidateProducerByMatchedObject_h
3 
18 
20 
23 
27 
28 #include <string>
29 #include <vector>
30 
32 public:
35 
36 private:
37  void produce(edm::Event&, const edm::EventSetup&) override;
38 
42 
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 dRmatch_;
65  double shift_;
67  };
68 
69  std::vector<objectEntryType> objects_;
70 };
71 
72 #endif
Handle.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType
Definition: ShiftedPFCandidateProducerByMatchedObject.h:48
funct::false
false
Definition: Factorize.h:29
PFCandidate.h
ShiftedPFCandidateProducerByMatchedObject::dR2match_PFCandidate_
double dR2match_PFCandidate_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:44
edm::EDGetTokenT< reco::PFCandidateCollection >
EDProducer.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:62
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:63
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::~objectEntryType
~objectEntryType()
Definition: ShiftedPFCandidateProducerByMatchedObject.h:61
ShiftedPFCandidateProducerByMatchedObject::~ShiftedPFCandidateProducerByMatchedObject
~ShiftedPFCandidateProducerByMatchedObject() override
Definition: ShiftedPFCandidateProducerByMatchedObject.cc:17
ShiftedPFCandidateProducerByMatchedObject::srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:41
ShiftedPFCandidateProducerByMatchedObject::dRmatch_PFCandidate_
double dRmatch_PFCandidate_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:43
ShiftedPFCandidateProducerByMatchedObject::dRmatch_Object_
double dRmatch_Object_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:45
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
deltaR.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition: ShiftedPFCandidateProducerByMatchedObject.h:49
ShiftedPFCandidateProducerByMatchedObject::srcPFCandidates_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidates_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:39
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::dRmatch_
double dRmatch_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:64
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
ShiftedPFCandidateProducerByMatchedObject
Definition: ShiftedPFCandidateProducerByMatchedObject.h:31
InputTag.h
ShiftedPFCandidateProducerByMatchedObject::objects_
std::vector< objectEntryType > objects_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:69
ShiftedPFCandidateProducerByMatchedObject::srcUnshiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:40
ShiftedPFCandidateProducerByMatchedObject::dR2match_Object_
double dR2match_Object_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:46
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::isValidMatch_
bool isValidMatch_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:66
EventSetup.h
Candidate.h
View.h
ParameterSet.h
ShiftedPFCandidateProducerByMatchedObject::ShiftedPFCandidateProducerByMatchedObject
ShiftedPFCandidateProducerByMatchedObject(const edm::ParameterSet &)
Definition: ShiftedPFCandidateProducerByMatchedObject.cc:5
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shift_
double shift_
Definition: ShiftedPFCandidateProducerByMatchedObject.h:65
edm::Event
Definition: Event.h:73
ShiftedPFCandidateProducerByMatchedObject::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: ShiftedPFCandidateProducerByMatchedObject.cc:21
PFCandidateFwd.h