Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
PatUtils
plugins
ShiftedJetProducerByMatchedObject.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_PatUtils_ShiftedJetProducerByMatchedObject_h
2
#define PhysicsTools_PatUtils_ShiftedJetProducerByMatchedObject_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
#include "
DataFormats/Candidate/interface/CandidateFwd.h
"
21
22
#include <string>
23
#include <vector>
24
25
template
<
typename
T>
26
class
ShiftedJetProducerByMatchedObjectT
:
public
edm::stream::EDProducer
<>
27
{
28
typedef
std::vector<T>
JetCollection
;
29
30
public
:
31
32
explicit
ShiftedJetProducerByMatchedObjectT
(
const
edm::ParameterSet
&);
33
~ShiftedJetProducerByMatchedObjectT
();
34
35
private
:
36
37
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
38
39
std::string
moduleLabel_
;
40
41
edm::EDGetTokenT<JetCollection>
srcJets_
;
42
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcUnshiftedObjects_
;
43
edm::EDGetTokenT<edm::View<reco::Candidate>
>
srcShiftedObjects_
;
44
45
double
dRmatch_Jet_
;
46
double
dRmatch_Object_
;
47
48
double
dR2match_Jet_
;
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
shift_
;
69
double
dRmatch_
;
70
bool
isValidMatch_
;
71
};
72
73
std::vector<objectEntryType>
objects_
;
74
};
75
76
#endif
77
78
79
80
ShiftedJetProducerByMatchedObjectT::moduleLabel_
std::string moduleLabel_
Definition:
ShiftedJetProducerByMatchedObject.h:39
ShiftedJetProducerByMatchedObjectT
Definition:
ShiftedJetProducerByMatchedObject.h:26
ShiftedJetProducerByMatchedObjectT::objectEntryType::shift_
double shift_
Definition:
ShiftedJetProducerByMatchedObject.h:68
CaloRecoTauDiscriminationAgainstMuon_cfi.dRmatch
dRmatch
Definition:
CaloRecoTauDiscriminationAgainstMuon_cfi.py:20
funct::false
false
Definition:
Factorize.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
Event.h
EventSetup.h
ShiftedJetProducerByMatchedObjectT::objectEntryType::shiftedObjectP4_
reco::Candidate::LorentzVector shiftedObjectP4_
Definition:
ShiftedJetProducerByMatchedObject.h:66
ShiftedJetProducerByMatchedObjectT::dRmatch_Jet_
double dRmatch_Jet_
Definition:
ShiftedJetProducerByMatchedObject.h:45
ShiftedJetProducerByMatchedObjectT::produce
void produce(edm::Event &, const edm::EventSetup &)
Definition:
ShiftedJetProducerByMatchedObject.cc:34
edm::EDGetTokenT< JetCollection >
ShiftedJetProducerByMatchedObjectT::objectEntryType::isValidMatch_
bool isValidMatch_
Definition:
ShiftedJetProducerByMatchedObject.h:70
ShiftedJetProducerByMatchedObjectT::JetCollection
std::vector< T > JetCollection
Definition:
ShiftedJetProducerByMatchedObject.h:28
ParameterSet.h
Candidate.h
EDProducer.h
ShiftedJetProducerByMatchedObjectT::objectEntryType
Definition:
ShiftedJetProducerByMatchedObject.h:51
edm::EventSetup
Definition:
EventSetup.h:45
ShiftedJetProducerByMatchedObjectT::objects_
std::vector< objectEntryType > objects_
Definition:
ShiftedJetProducerByMatchedObject.h:73
ShiftedJetProducerByMatchedObjectT::srcShiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcShiftedObjects_
Definition:
ShiftedJetProducerByMatchedObject.h:43
ShiftedJetProducerByMatchedObjectT::objectEntryType::~objectEntryType
~objectEntryType()
Definition:
ShiftedJetProducerByMatchedObject.h:65
ShiftedJetProducerByMatchedObjectT::dR2match_Object_
double dR2match_Object_
Definition:
ShiftedJetProducerByMatchedObject.h:49
ShiftedJetProducerByMatchedObjectT::objectEntryType::dRmatch_
double dRmatch_
Definition:
ShiftedJetProducerByMatchedObject.h:69
ShiftedJetProducerByMatchedObjectT::dR2match_Jet_
double dR2match_Jet_
Definition:
ShiftedJetProducerByMatchedObject.h:48
ShiftedJetProducerByMatchedObjectT::objectEntryType::unshiftedObjectP4_
reco::Candidate::LorentzVector unshiftedObjectP4_
Definition:
ShiftedJetProducerByMatchedObject.h:67
ShiftedJetProducerByMatchedObjectT::srcUnshiftedObjects_
edm::EDGetTokenT< edm::View< reco::Candidate > > srcUnshiftedObjects_
Definition:
ShiftedJetProducerByMatchedObject.h:42
edm::stream::EDProducer
Definition:
EDProducer.h:33
ShiftedJetProducerByMatchedObjectT::dRmatch_Object_
double dRmatch_Object_
Definition:
ShiftedJetProducerByMatchedObject.h:46
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:37
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:36
CandidateFwd.h
ShiftedJetProducerByMatchedObjectT::srcJets_
edm::EDGetTokenT< JetCollection > srcJets_
Definition:
ShiftedJetProducerByMatchedObject.h:41
ShiftedJetProducerByMatchedObjectT::~ShiftedJetProducerByMatchedObjectT
~ShiftedJetProducerByMatchedObjectT()
Definition:
ShiftedJetProducerByMatchedObject.cc:28
edm::Event
Definition:
Event.h:66
ShiftedJetProducerByMatchedObjectT::ShiftedJetProducerByMatchedObjectT
ShiftedJetProducerByMatchedObjectT(const edm::ParameterSet &)
Definition:
ShiftedJetProducerByMatchedObject.cc:10
ShiftedJetProducerByMatchedObjectT::objectEntryType::objectEntryType
objectEntryType(const reco::Candidate::LorentzVector &shiftedObjectP4, const reco::Candidate::LorentzVector &unshiftedObjectP4, double dRmatch)
Definition:
ShiftedJetProducerByMatchedObject.h:53
Generated for CMSSW Reference Manual by
1.8.11