Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
PatUtils
plugins
ShiftedPFCandidateProducerByMatchedObject.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_PatUtils_ShiftedPFCandidateProducerByMatchedObject_h
2
#define PhysicsTools_PatUtils_ShiftedPFCandidateProducerByMatchedObject_h
3
13
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
14
#include "
FWCore/Framework/interface/Event.h
"
15
#include "
FWCore/Framework/interface/EventSetup.h
"
16
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
17
#include "
FWCore/Utilities/interface/InputTag.h
"
18
19
#include "
DataFormats/Candidate/interface/Candidate.h
"
20
21
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
22
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
23
24
#include "
DataFormats/Common/interface/Handle.h
"
25
#include "
DataFormats/Common/interface/View.h
"
26
#include "
DataFormats/Math/interface/deltaR.h
"
27
28
#include <string>
29
#include <vector>
30
31
class
ShiftedPFCandidateProducerByMatchedObject
:
public
edm::stream::EDProducer
<>
32
{
33
public
:
34
35
explicit
ShiftedPFCandidateProducerByMatchedObject
(
const
edm::ParameterSet
&);
36
~ShiftedPFCandidateProducerByMatchedObject
()
override
;
37
38
private
:
39
40
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
41
42
edm::EDGetTokenT<reco::PFCandidateCollection >
srcPFCandidates_
;
43
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcUnshiftedObjects_
;
44
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcShiftedObjects_
;
45
46
double
dRmatch_PFCandidate_
;
47
double
dR2match_PFCandidate_
;
48
double
dRmatch_Object_
;
49
double
dR2match_Object_
;
50
51
struct
objectEntryType
52
{
53
objectEntryType
(
const
reco::Candidate::LorentzVector
& shiftedObjectP4,
54
const
reco::Candidate::LorentzVector
& unshiftedObjectP4,
double
dRmatch
)
55
:
shiftedObjectP4_
(shiftedObjectP4),
56
unshiftedObjectP4_
(unshiftedObjectP4),
57
dRmatch_
(dRmatch),
58
isValidMatch_
(
false
)
59
{
60
if
( unshiftedObjectP4.energy() > 0. ) {
61
shift_
= (shiftedObjectP4.energy()/unshiftedObjectP4.energy()) - 1.;
62
isValidMatch_
=
true
;
63
}
64
}
65
~objectEntryType
() {}
66
reco::Candidate::LorentzVector
shiftedObjectP4_
;
67
reco::Candidate::LorentzVector
unshiftedObjectP4_
;
68
double
dRmatch_
;
69
double
shift_
;
70
bool
isValidMatch_
;
71
};
72
73
std::vector<objectEntryType>
objects_
;
74
};
75
76
#endif
77
78
79
80
ShiftedPFCandidateProducerByMatchedObject::objectEntryType
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:51
CaloRecoTauDiscriminationAgainstMuon_cfi.dRmatch
dRmatch
Definition:
CaloRecoTauDiscriminationAgainstMuon_cfi.py:20
funct::false
false
Definition:
Factorize.h:35
Event.h
ShiftedPFCandidateProducerByMatchedObject::dR2match_PFCandidate_
double dR2match_PFCandidate_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:47
EventSetup.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:53
ShiftedPFCandidateProducerByMatchedObject::~ShiftedPFCandidateProducerByMatchedObject
~ShiftedPFCandidateProducerByMatchedObject() override
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:19
ShiftedPFCandidateProducerByMatchedObject::dRmatch_Object_
double dRmatch_Object_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:48
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shift_
double shift_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:69
edm::EDGetTokenT< reco::PFCandidateCollection >
ShiftedPFCandidateProducerByMatchedObject::srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:44
ParameterSet.h
ShiftedPFCandidateProducerByMatchedObject
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:31
Candidate.h
EDProducer.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::dRmatch_
double dRmatch_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:68
PFCandidate.h
deltaR.h
ShiftedPFCandidateProducerByMatchedObject::dRmatch_PFCandidate_
double dRmatch_PFCandidate_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:46
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:67
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::~objectEntryType
~objectEntryType()
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:65
View.h
edm::EventSetup
Definition:
EventSetup.h:52
ShiftedPFCandidateProducerByMatchedObject::srcUnshiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:43
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:66
ShiftedPFCandidateProducerByMatchedObject::objects_
std::vector< objectEntryType > objects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:73
ShiftedPFCandidateProducerByMatchedObject::srcPFCandidates_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidates_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:42
edm::stream::EDProducer
Definition:
EDProducer.h:38
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:37
ShiftedPFCandidateProducerByMatchedObject::dR2match_Object_
double dR2match_Object_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:49
InputTag.h
ShiftedPFCandidateProducerByMatchedObject::ShiftedPFCandidateProducerByMatchedObject
ShiftedPFCandidateProducerByMatchedObject(const edm::ParameterSet &)
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:5
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:70
ShiftedPFCandidateProducerByMatchedObject::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:24
PFCandidateFwd.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::isValidMatch_
bool isValidMatch_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:70
Handle.h
Generated for CMSSW Reference Manual by
1.8.11