PhysicsTools
IsolationAlgos
plugins
CandViewExtractor.cc
Go to the documentation of this file.
1
#include "
CandViewExtractor.h
"
2
3
#include "
DataFormats/RecoCandidate/interface/IsoDepositDirection.h
"
4
#include "
DataFormats/Common/interface/Handle.h
"
5
#include "
DataFormats/TrackReco/interface/Track.h
"
6
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
7
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
8
#include "
DataFormats/Math/interface/deltaR.h
"
9
10
using namespace
edm
;
11
using namespace
reco
;
12
using namespace
muonisolation
;
13
14
#include "CandViewExtractor.icc"
15
16
CandViewExtractor::CandViewExtractor(
const
ParameterSet
& par,
edm::ConsumesCollector
&& iC)
17
: theCandViewToken(iC.consumes<
View
<
Candidate
> >(par.getParameter<
edm
::
InputTag
>(
"inputCandView"
))),
18
theDepositLabel(par.getUntrackedParameter<
std
::
string
>(
"DepositLabel"
)),
19
theDiff_r(par.getParameter<double>(
"Diff_r"
)),
20
theDiff_z(par.getParameter<double>(
"Diff_z"
)),
21
theDR_Max(par.getParameter<double>(
"DR_Max"
)),
22
theDR_Veto(par.getParameter<double>(
"DR_Veto"
)) {}
23
/*
24
reco::IsoDeposit::Vetos CandViewExtractor::vetos(const edm::Event & ev,
25
const edm::EventSetup & evSetup, const reco::Candidate & cand) const
26
{
27
reco::isodeposit::Direction dir(cand.eta(),cand.phi());
28
return reco::IsoDeposit::Vetos(1,veto(dir));
29
}
30
*/
31
32
reco::IsoDeposit::Veto
CandViewExtractor::veto
(
const
reco::IsoDeposit::Direction
&
dir
)
const
{
33
reco::IsoDeposit::Veto
result
;
34
result
.vetoDir =
dir
;
35
result
.dR =
theDR_Veto
;
36
return
result
;
37
}
38
39
void
CandViewExtractor::initEvent
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& evSetup) {
40
ev
.getByToken(
theCandViewToken
,
theCandViewH
);
41
theCacheID
=
ev
.cacheIdentifier();
42
}
43
44
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
45
#include "
FWCore/Framework/interface/MakerMacros.h
"
46
47
#include "
PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h
"
48
#include "
PhysicsTools/IsolationAlgos/interface/IsoDepositExtractorFactory.h
"
49
#include "
CandViewExtractor.h
"
50
DEFINE_EDM_PLUGIN
(
IsoDepositExtractorFactory
,
muonisolation::CandViewExtractor
,
"CandViewExtractor"
);
Handle.h
MessageLogger.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
reco::IsoDeposit::Veto
Definition:
IsoDeposit.h:59
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
IsoDepositDirection.h
CandViewExtractor.h
MakerMacros.h
Track.h
TrackFwd.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
IsoDepositExtractor.h
edm::View
Definition:
CaloClusterFwd.h:14
edm::ParameterSet
Definition:
ParameterSet.h:47
deltaR.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
ModuleDef.h
muonisolation::CandViewExtractor
Definition:
CandViewExtractor.h:18
edm::EventSetup
Definition:
EventSetup.h:58
reco::Candidate
Definition:
Candidate.h:27
muonisolation
Definition:
CandViewExtractor.h:16
muonisolation::CandViewExtractor::theCacheID
edm::Event::CacheIdentifier_t theCacheID
Definition:
CandViewExtractor.h:58
std
Definition:
JetResolutionObject.h:76
muonisolation::CandViewExtractor::theCandViewToken
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandViewToken
Definition:
CandViewExtractor.h:55
muonisolation::CandViewExtractor::theCandViewH
edm::Handle< edm::View< reco::Candidate > > theCandViewH
Definition:
CandViewExtractor.h:57
reco::isodeposit::Direction
Definition:
IsoDepositDirection.h:19
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
IsoDepositExtractorFactory.h
muonisolation::CandViewExtractor::initEvent
void initEvent(const edm::Event &ev, const edm::EventSetup &evSetup) override
perform some constly initialization
Definition:
CandViewExtractor.cc:39
muonisolation::CandViewExtractor::theDR_Veto
double theDR_Veto
Definition:
CandViewExtractor.h:62
mps_fire.result
result
Definition:
mps_fire.py:311
muonisolation::CandViewExtractor::veto
reco::IsoDeposit::Veto veto(const reco::IsoDeposit::Direction &dir) const
Definition:
CandViewExtractor.cc:32
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
DeadROC_duringRun.dir
dir
Definition:
DeadROC_duringRun.py:23
Generated for CMSSW Reference Manual by
1.8.16