Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
IsolationAlgos
plugins
CandIsolatorFromDeposits.h
Go to the documentation of this file.
1
#ifndef MuonIsolationProducers_CandIsolatorFromDeposits_H
2
#define MuonIsolationProducers_CandIsolatorFromDeposits_H
3
4
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
8
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
9
#include "
DataFormats/MuonReco/interface/MuonFwd.h
"
10
#include "
DataFormats/RecoCandidate/interface/IsoDepositFwd.h
"
11
#include "
DataFormats/RecoCandidate/interface/IsoDeposit.h
"
12
#include "
PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h
"
13
14
#include "
DataFormats/Candidate/interface/Candidate.h
"
15
#include "
CommonTools/Utils/interface/StringObjectFunction.h
"
16
#include "
DataFormats/Common/interface/OwnVector.h
"
17
18
#include <string>
19
20
namespace
edm
{
class
Event
; }
21
namespace
edm
{
class
EventSetup
; }
22
23
class
CandIsolatorFromDeposits
:
public
edm::stream::EDProducer
<> {
24
25
public
:
26
typedef
edm::ValueMap<double>
CandDoubleMap
;
27
28
enum
Mode
{
Sum
,
SumRelative
, Sum2, Sum2Relative,
Max
, MaxRelative, Count, NearestDR,MeanDR,SumDR };
29
CandIsolatorFromDeposits
(
const
edm::ParameterSet
&);
30
31
~
CandIsolatorFromDeposits
()
override
;
32
33
void
produce(
edm::Event
&,
const
edm::EventSetup
&)
override
;
34
35
private
:
36
class
SingleDeposit
{
37
public
:
38
SingleDeposit
(
const
edm::ParameterSet
&,
edm::ConsumesCollector
&& iC) ;
39
void
cleanup
() ;
40
void
open(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
&iSetup) ;
41
double
compute
(
const
reco::CandidateBaseRef
&
cand
) ;
42
const
reco::IsoDepositMap
&
map
() {
return
*hDeps_; }
43
private
:
44
Mode
mode_
;
45
edm::EDGetTokenT<reco::IsoDepositMap>
srcToken_
;
46
double
deltaR_
;
47
bool
usesFunction_
;
48
double
weight_
;
49
StringObjectFunction<reco::Candidate>
weightExpr_
;
50
reco::isodeposit::AbsVetos
vetos_
;
51
reco::isodeposit::EventDependentAbsVetos
evdepVetos_
;
// note: these are a subset of the above. Don't delete twice!
52
bool
skipDefaultVeto_
;
53
edm::Handle<reco::IsoDepositMap>
hDeps_
;
// transient
54
};
55
// datamembers
56
std::vector<SingleDeposit>
sources_
;
57
58
};
59
#endif
CandIsolatorFromDeposits::SingleDeposit::usesFunction_
bool usesFunction_
Definition:
CandIsolatorFromDeposits.h:47
CandIsolatorFromDeposits::SingleDeposit::mode_
Mode mode_
Definition:
CandIsolatorFromDeposits.h:44
StringObjectFunction< reco::Candidate >
CandIsolatorFromDeposits::Mode
Mode
Definition:
CandIsolatorFromDeposits.h:28
edm::Handle< reco::IsoDepositMap >
IsoDepositFwd.h
CandIsolatorFromDeposits::SingleDeposit::weightExpr_
StringObjectFunction< reco::Candidate > weightExpr_
Definition:
CandIsolatorFromDeposits.h:49
edm::cleanup
static void cleanup(const Factory::MakerMap::value_type &v)
Definition:
Factory.cc:12
CandIsolatorFromDeposits::sources_
std::vector< SingleDeposit > sources_
Definition:
CandIsolatorFromDeposits.h:56
TrackFwd.h
CandIsolatorFromDeposits::CandDoubleMap
edm::ValueMap< double > CandDoubleMap
Definition:
CandIsolatorFromDeposits.h:26
CandIsolatorFromDeposits::SingleDeposit::hDeps_
edm::Handle< reco::IsoDepositMap > hDeps_
Definition:
CandIsolatorFromDeposits.h:53
edm::EDGetTokenT< reco::IsoDepositMap >
edm::RefToBase< Candidate >
reco::isodeposit::EventDependentAbsVetos
std::vector< EventDependentAbsVeto * > EventDependentAbsVetos
Definition:
EventDependentAbsVeto.h:15
StringObjectFunction.h
MuonFwd.h
ParameterSet.h
Candidate.h
CandIsolatorFromDeposits::SingleDeposit::skipDefaultVeto_
bool skipDefaultVeto_
Definition:
CandIsolatorFromDeposits.h:52
EDProducer.h
EventSetup
iEvent
int iEvent
Definition:
GenABIO.cc:230
CandIsolatorFromDeposits::SingleDeposit::map
const reco::IsoDepositMap & map()
Definition:
CandIsolatorFromDeposits.h:42
CandIsolatorFromDeposits::SingleDeposit::vetos_
reco::isodeposit::AbsVetos vetos_
Definition:
CandIsolatorFromDeposits.h:50
edm::EventSetup
Definition:
EventSetup.h:51
CandIsolatorFromDeposits
Definition:
CandIsolatorFromDeposits.h:23
CandIsolatorFromDeposits::SingleDeposit::srcToken_
edm::EDGetTokenT< reco::IsoDepositMap > srcToken_
Definition:
CandIsolatorFromDeposits.h:45
Max
T Max(T a, T b)
Definition:
MathUtil.h:44
edm::ValueMap
Definition:
ValueMap.h:105
CandIsolatorFromDeposits::SingleDeposit::weight_
double weight_
Definition:
CandIsolatorFromDeposits.h:48
edm::stream::EDProducer
Definition:
EDProducer.h:38
EventDependentAbsVeto.h
bookConverter.compute
def compute(min, max)
Definition:
bookConverter.py:106
Event
IsoDeposit.h
OwnVector.h
CandIsolatorFromDeposits::SingleDeposit
Definition:
CandIsolatorFromDeposits.h:36
edm
HLT enums.
Definition:
AlignableModifier.h:17
Sum
Definition:
SiPixelActionExecutor.h:22
reco::isodeposit::AbsVetos
std::vector< AbsVeto * > AbsVetos
Definition:
IsoDeposit.h:40
edm::ParameterSet
Definition:
ParameterSet.h:36
CandIsolatorFromDeposits::SingleDeposit::evdepVetos_
reco::isodeposit::EventDependentAbsVetos evdepVetos_
Definition:
CandIsolatorFromDeposits.h:51
cand
Definition:
decayParser.h:34
CandIsolatorFromDeposits::SumRelative
Definition:
CandIsolatorFromDeposits.h:28
edm::Event
Definition:
Event.h:70
CandIsolatorFromDeposits::SingleDeposit::deltaR_
double deltaR_
Definition:
CandIsolatorFromDeposits.h:46
ConsumesCollector.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11