CMS 3D CMS Logo

ShiftedPFCandidateProducerForPFMVAMEt.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMVAMEt_h
2 #define PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMVAMEt_h
3 
24 
29 
30 #include <string>
31 #include <vector>
32 
34 public:
37 
38 private:
40 
41  void produce(edm::Event&, const edm::EventSetup&) override;
42 
44 
48 
51 
54 
55  struct objectEntryType {
57  const reco::Candidate::LorentzVector& unshiftedObjectP4,
58  double dRmatch)
59  : shiftedObjectP4_(shiftedObjectP4),
60  unshiftedObjectP4_(unshiftedObjectP4),
61  dRmatch_(dRmatch),
63  if (unshiftedObjectP4.energy() > 0.) {
64  shift_ = (shiftedObjectP4.energy() / unshiftedObjectP4.energy()) - 1.;
65  isValidMatch_ = true;
66  }
67  }
71  double dRmatch_;
72  double shift_;
74  };
75 
76  std::vector<objectEntryType> objects_;
77 };
78 
79 #endif
ShiftedPFCandidateProducerForPFMVAMEt::ShiftedPFCandidateProducerForPFMVAMEt
ShiftedPFCandidateProducerForPFMVAMEt(const edm::ParameterSet &)
Definition: ShiftedPFCandidateProducerForPFMVAMEt.cc:7
ShiftedPFCandidateProducerForPFMVAMEt::dRmatch_PFCandidate_
double dRmatch_PFCandidate_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:49
funct::false
false
Definition: Factorize.h:29
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::shift_
double shift_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:72
PFCandidate.h
edm::EDGetTokenT< reco::PFCandidateCollection >
EDProducer.h
ShiftedPFCandidateProducerForPFMVAMEt::dRmatch_Object_
double dRmatch_Object_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:50
ShiftedPFCandidateProducerForPFMVAMEt::dR2match_PFCandidate_
double dR2match_PFCandidate_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:52
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:55
ShiftedPFCandidateProducerForPFMVAMEt::moduleLabel_
std::string moduleLabel_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:43
ShiftedPFCandidateProducerForPFMVAMEt::dR2match_Object_
double dR2match_Object_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:53
ShiftedPFCandidateProducerForPFMVAMEt::srcShiftedObjectsToken_
edm::EDGetTokenT< CandidateView > srcShiftedObjectsToken_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:56
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::~objectEntryType
~objectEntryType()
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:68
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::dRmatch_
double dRmatch_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:71
edm::View
Definition: CaloClusterFwd.h:14
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ShiftedPFCandidateProducerForPFMVAMEt
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:33
ShiftedPFCandidateProducerForPFMVAMEt::~ShiftedPFCandidateProducerForPFMVAMEt
~ShiftedPFCandidateProducerForPFMVAMEt() override
Definition: ShiftedPFCandidateProducerForPFMVAMEt.cc:21
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:70
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
InputTag.h
ShiftedPFCandidateProducerForPFMVAMEt::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: ShiftedPFCandidateProducerForPFMVAMEt.cc:25
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::isValidMatch_
bool isValidMatch_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:73
EventSetup.h
ShiftedPFCandidateProducerForPFMVAMEt::srcPFCandidatesToken_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:45
ShiftedPFCandidateProducerForPFMVAMEt::CandidateView
edm::View< reco::Candidate > CandidateView
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:39
ShiftedPFCandidateProducerForPFMVAMEt::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:69
Candidate.h
View.h
ParameterSet.h
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
ShiftedPFCandidateProducerForPFMVAMEt::srcUnshiftedObjectsToken_
edm::EDGetTokenT< CandidateView > srcUnshiftedObjectsToken_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:46
ShiftedPFCandidateProducerForPFMVAMEt::objects_
std::vector< objectEntryType > objects_
Definition: ShiftedPFCandidateProducerForPFMVAMEt.h:76
edm::Event
Definition: Event.h:73
PFCandidateFwd.h