Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
PhysicsTools
PatUtils
plugins
ShiftedPFCandidateProducerForPFMEtMVA.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMEtMVA_h
2
#define PhysicsTools_PatUtils_ShiftedPFCandidateProducerForPFMEtMVA_h
3
19
#include "
FWCore/Framework/interface/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
ShiftedPFCandidateProducerForPFMEtMVA
:
public
edm::EDProducer
34
{
35
public
:
36
37
explicit
ShiftedPFCandidateProducerForPFMEtMVA
(
const
edm::ParameterSet
&);
38
~ShiftedPFCandidateProducerForPFMEtMVA
();
39
40
private
:
41
typedef
edm::View<reco::Candidate>
CandidateView
;
42
43
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
44
45
std::string
moduleLabel_
;
46
47
edm::EDGetTokenT<reco::PFCandidateCollection>
srcPFCandidatesToken_
;
48
edm::EDGetTokenT<CandidateView>
srcUnshiftedObjectsToken_
;
49
edm::EDGetTokenT<CandidateView>
srcShiftedObjectsToken_
;
50
51
double
dRmatch_PFCandidate_
;
52
double
dRmatch_Object_
;
53
54
struct
objectEntryType
55
{
56
objectEntryType
(
const
reco::Candidate::LorentzVector
& shiftedObjectP4,
57
const
reco::Candidate::LorentzVector
& unshiftedObjectP4,
double
dRmatch)
58
:
shiftedObjectP4_
(shiftedObjectP4),
59
unshiftedObjectP4_
(unshiftedObjectP4),
60
dRmatch_
(dRmatch),
61
isValidMatch_
(
false
)
62
{
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
80
81
82
83
ShiftedPFCandidateProducerForPFMEtMVA::objects_
std::vector< objectEntryType > objects_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:76
ShiftedPFCandidateProducerForPFMEtMVA::srcUnshiftedObjectsToken_
edm::EDGetTokenT< CandidateView > srcUnshiftedObjectsToken_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:48
ShiftedPFCandidateProducerForPFMEtMVA::~ShiftedPFCandidateProducerForPFMEtMVA
~ShiftedPFCandidateProducerForPFMEtMVA()
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.cc:18
Event.h
EventSetup.h
ShiftedPFCandidateProducerForPFMEtMVA::dRmatch_PFCandidate_
double dRmatch_PFCandidate_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:51
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:70
ShiftedPFCandidateProducerForPFMEtMVA::dRmatch_Object_
double dRmatch_Object_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:52
edm::EDGetTokenT< reco::PFCandidateCollection >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::dRmatch_
double dRmatch_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:71
edm::EDProducer
Definition:
EDProducer.h:33
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::~objectEntryType
~objectEntryType()
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:68
ParameterSet.h
Candidate.h
edm::View< reco::Candidate >
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:56
ShiftedPFCandidateProducerForPFMEtMVA::produce
void produce(edm::Event &, const edm::EventSetup &)
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.cc:23
PFCandidate.h
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:54
View.h
ShiftedPFCandidateProducerForPFMEtMVA::srcShiftedObjectsToken_
edm::EDGetTokenT< CandidateView > srcShiftedObjectsToken_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:49
edm::EventSetup
Definition:
EventSetup.h:44
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::isValidMatch_
bool isValidMatch_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:73
ShiftedPFCandidateProducerForPFMEtMVA::ShiftedPFCandidateProducerForPFMEtMVA
ShiftedPFCandidateProducerForPFMEtMVA(const edm::ParameterSet &)
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.cc:5
ShiftedPFCandidateProducerForPFMEtMVA::moduleLabel_
std::string moduleLabel_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:45
EDProducer.h
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::shift_
double shift_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:72
ShiftedPFCandidateProducerForPFMEtMVA
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:33
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:41
ShiftedPFCandidateProducerForPFMEtMVA::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:69
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::false
volatile std::atomic< bool > shutdown_flag false
Definition:
UnixSignalHandlers.cc:22
ShiftedPFCandidateProducerForPFMEtMVA::srcPFCandidatesToken_
edm::EDGetTokenT< reco::PFCandidateCollection > srcPFCandidatesToken_
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:47
edm::Event
Definition:
Event.h:59
PFCandidateFwd.h
ShiftedPFCandidateProducerForPFMEtMVA::CandidateView
edm::View< reco::Candidate > CandidateView
Definition:
ShiftedPFCandidateProducerForPFMEtMVA.h:41
Generated for CMSSW Reference Manual by
1.8.5