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