PhysicsTools
PatUtils
plugins
ShiftedPFCandidateProducerForPFMVAMEt.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMVAMEt_h
2
#define PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMVAMEt_h
3
19
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
20
#include "
FWCore/Framework/interface/Event.h
"
21
#include "
FWCore/Framework/interface/EventSetup.h
"
22
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
23
#include "
FWCore/Utilities/interface/InputTag.h
"
24
25
#include "
DataFormats/Common/interface/View.h
"
26
#include "
DataFormats/Candidate/interface/Candidate.h
"
27
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
28
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
29
30
#include <string>
31
#include <vector>
32
33
class
ShiftedPFCandidateProducerForPFMVAMEt
:
public
edm::stream::EDProducer
<> {
34
public
:
35
explicit
ShiftedPFCandidateProducerForPFMVAMEt
(
const
edm::ParameterSet
&);
36
~ShiftedPFCandidateProducerForPFMVAMEt
()
override
;
37
38
private
:
39
typedef
edm::View<reco::Candidate>
CandidateView
;
40
41
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
42
43
std::string
moduleLabel_
;
44
45
edm::EDGetTokenT<reco::PFCandidateCollection>
srcPFCandidatesToken_
;
46
edm::EDGetTokenT<CandidateView>
srcUnshiftedObjectsToken_
;
47
edm::EDGetTokenT<CandidateView>
srcShiftedObjectsToken_
;
48
49
double
dRmatch_PFCandidate_
;
50
double
dRmatch_Object_
;
51
52
double
dR2match_PFCandidate_
;
53
double
dR2match_Object_
;
54
55
struct
objectEntryType
{
56
objectEntryType
(
const
reco::Candidate::LorentzVector
& shiftedObjectP4,
57
const
reco::Candidate::LorentzVector
& unshiftedObjectP4,
58
double
dRmatch)
59
:
shiftedObjectP4_
(shiftedObjectP4),
60
unshiftedObjectP4_
(unshiftedObjectP4),
61
dRmatch_
(dRmatch),
62
isValidMatch_
(
false
) {
63
if
(unshiftedObjectP4.energy() > 0.) {
64
shift_
= (shiftedObjectP4.energy() / unshiftedObjectP4.energy()) - 1.;
65
isValidMatch_
=
true
;
66
}
67
}
68
~objectEntryType
() {}
69
reco::Candidate::LorentzVector
shiftedObjectP4_
;
70
reco::Candidate::LorentzVector
unshiftedObjectP4_
;
71
double
dRmatch_
;
72
double
shift_
;
73
bool
isValidMatch_
;
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:58
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
Generated for CMSSW Reference Manual by
1.8.16