Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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/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::EDProducer
32
{
33
public
:
34
35
explicit
ShiftedPFCandidateProducerByMatchedObject
(
const
edm::ParameterSet
&);
36
~ShiftedPFCandidateProducerByMatchedObject
();
37
38
private
:
39
40
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
41
42
std::string
moduleLabel_
;
43
44
edm::EDGetTokenT<edm::Handle<reco::PFCandidateCollection>
>
srcPFCandidates_
;
45
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcUnshiftedObjects_
;
46
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcShiftedObjects_
;
47
48
double
dRmatch_PFCandidate_
;
49
double
dR2match_PFCandidate_
;
50
double
dRmatch_Object_
;
51
double
dR2match_Object_
;
52
53
struct
objectEntryType
54
{
55
objectEntryType
(
const
reco::Candidate::LorentzVector
& shiftedObjectP4,
56
const
reco::Candidate::LorentzVector
& unshiftedObjectP4,
double
dRmatch)
57
:
shiftedObjectP4_
(shiftedObjectP4),
58
unshiftedObjectP4_
(unshiftedObjectP4),
59
dRmatch_
(dRmatch),
60
isValidMatch_
(
false
)
61
{
62
if
( unshiftedObjectP4.energy() > 0. ) {
63
shift_
= (shiftedObjectP4.energy()/unshiftedObjectP4.energy()) - 1.;
64
isValidMatch_
=
true
;
65
}
66
}
67
~objectEntryType
() {}
68
reco::Candidate::LorentzVector
shiftedObjectP4_
;
69
reco::Candidate::LorentzVector
unshiftedObjectP4_
;
70
double
dRmatch_
;
71
double
shift_
;
72
bool
isValidMatch_
;
73
};
74
75
std::vector<objectEntryType>
objects_
;
76
};
77
78
#endif
79
80
81
82
ShiftedPFCandidateProducerByMatchedObject::objectEntryType
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:53
Event.h
ShiftedPFCandidateProducerByMatchedObject::dR2match_PFCandidate_
double dR2match_PFCandidate_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:49
EventSetup.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:55
ShiftedPFCandidateProducerByMatchedObject::dRmatch_Object_
double dRmatch_Object_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:50
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shift_
double shift_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:71
Handle.h
edm::EDGetTokenT
Definition:
EDGetToken.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::EDProducer
Definition:
EDProducer.h:33
ShiftedPFCandidateProducerByMatchedObject::srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:46
ParameterSet.h
ShiftedPFCandidateProducerByMatchedObject
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:31
Candidate.h
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::dRmatch_
double dRmatch_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:70
PFCandidate.h
deltaR.h
ShiftedPFCandidateProducerByMatchedObject::dRmatch_PFCandidate_
double dRmatch_PFCandidate_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:48
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:69
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::~objectEntryType
~objectEntryType()
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:67
View.h
edm::EventSetup
Definition:
EventSetup.h:44
ShiftedPFCandidateProducerByMatchedObject::srcPFCandidates_
edm::EDGetTokenT< edm::Handle< reco::PFCandidateCollection > > srcPFCandidates_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:44
ShiftedPFCandidateProducerByMatchedObject::srcUnshiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:45
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:68
ShiftedPFCandidateProducerByMatchedObject::moduleLabel_
std::string moduleLabel_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:42
EDProducer.h
ShiftedPFCandidateProducerByMatchedObject::objects_
std::vector< objectEntryType > objects_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:75
ShiftedPFCandidateProducerByMatchedObject::~ShiftedPFCandidateProducerByMatchedObject
~ShiftedPFCandidateProducerByMatchedObject()
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:20
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:41
ShiftedPFCandidateProducerByMatchedObject::dR2match_Object_
double dR2match_Object_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:51
InputTag.h
ShiftedPFCandidateProducerByMatchedObject::ShiftedPFCandidateProducerByMatchedObject
ShiftedPFCandidateProducerByMatchedObject(const edm::ParameterSet &)
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:5
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::false
volatile std::atomic< bool > shutdown_flag false
Definition:
UnixSignalHandlers.cc:22
edm::Event
Definition:
Event.h:59
PFCandidateFwd.h
ShiftedPFCandidateProducerByMatchedObject::produce
void produce(edm::Event &, const edm::EventSetup &)
Definition:
ShiftedPFCandidateProducerByMatchedObject.cc:25
ShiftedPFCandidateProducerByMatchedObject::objectEntryType::isValidMatch_
bool isValidMatch_
Definition:
ShiftedPFCandidateProducerByMatchedObject.h:72
Generated for CMSSW Reference Manual by
1.8.5