Main Page
Namespaces
Classes
Package Documentation
RecoMuon
MuonIsolation
interface
SimpleCutsIsolator.h
Go to the documentation of this file.
1
#ifndef SimpleCutsIsolator_H
2
#define SimpleCutsIsolator_H
3
4
#include "
RecoMuon/MuonIsolation/interface/MuIsoBaseIsolator.h
"
5
#include "
RecoMuon/MuonIsolation/interface/Cuts.h
"
6
7
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
9
10
class
SimpleCutsIsolator
:
public
muonisolation::MuIsoBaseIsolator
{
11
public
:
12
SimpleCutsIsolator
(
const
edm::ParameterSet
& par,
edm::ConsumesCollector
&& iC):
13
theCuts
(par.getParameter<
std
::vector<double> > (
"EtaBounds"
),
14
par.getParameter<
std
::vector<double> > (
"ConeSizes"
),
15
par.getParameter<
std
::vector<double> > (
"Thresholds"
))
16
{
17
}
18
19
ResultType
resultType
()
const override
{
return
ISOL_BOOL_TYPE
;}
20
21
Result
result
(
const
DepositContainer
&
deposits
,
const
edm::Event
* =
nullptr
)
const override
{
22
Result
answer
(
ISOL_BOOL_TYPE
);
23
answer.
valBool
=
false
;
24
// fail miserably...
25
return
answer
;
26
}
27
28
Result
result
(
const
DepositContainer
&
deposits
,
const
reco::Track
& tk,
const
edm::Event
* =
nullptr
)
const override
{
29
Result
answer
(
ISOL_BOOL_TYPE
);
30
31
muonisolation::Cuts::CutSpec
cuts_here =
theCuts
(tk.
eta
());
32
33
double
conesize = cuts_here.
conesize
;
34
double
dephlt = 0;
35
unsigned
int
nDeps = deposits.size();
36
for
(
unsigned
int
iDep = 0; iDep < nDeps; ++iDep ){
37
dephlt += deposits[iDep].dep->depositWithin(conesize);
38
}
39
answer.
valFloat
= dephlt;
40
if
(dephlt<cuts_here.
threshold
) {
41
answer.
valBool
=
true
;
42
}
else
{
43
answer.
valBool
=
false
;
44
}
45
return
answer
;
46
}
47
48
private
:
49
50
// Isolation cuts
51
muonisolation::Cuts
theCuts
;
52
53
54
};
55
56
#endif
MuIsoBaseIsolator.h
muonisolation::Cuts::CutSpec::threshold
double threshold
Definition:
Cuts.h:15
std
Definition:
JetResolutionObject.h:80
muonisolation::MuIsoBaseIsolator::Result
Definition:
MuIsoBaseIsolator.h:34
SimpleCutsIsolator::SimpleCutsIsolator
SimpleCutsIsolator(const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
Definition:
SimpleCutsIsolator.h:12
ParameterSet.h
muonisolation::MuIsoBaseIsolator
Definition:
MuIsoBaseIsolator.h:12
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition:
TrackBase.h:684
muonisolation::Cuts::CutSpec::conesize
double conesize
Definition:
Cuts.h:15
Cuts.h
SimpleCutsIsolator::result
Result result(const DepositContainer &deposits, const reco::Track &tk, const edm::Event *=0) const override
Compute and return the isolation variable, with vetoes and the muon.
Definition:
SimpleCutsIsolator.h:28
muonisolation::MuIsoBaseIsolator::ResultType
ResultType
Definition:
MuIsoBaseIsolator.h:27
muonisolation::Cuts
Definition:
Cuts.h:12
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition:
CandIsolatorFromDeposits_cfi.py:4
muonisolation::MuIsoBaseIsolator::ISOL_BOOL_TYPE
Definition:
MuIsoBaseIsolator.h:30
SimpleCutsIsolator::theCuts
muonisolation::Cuts theCuts
Definition:
SimpleCutsIsolator.h:51
SimpleCutsIsolator::result
Result result(const DepositContainer &deposits, const edm::Event *=0) const override
Compute and return the isolation variable.
Definition:
SimpleCutsIsolator.h:21
muonisolation::MuIsoBaseIsolator::DepositContainer
std::vector< DepositAndVetos > DepositContainer
Definition:
MuIsoBaseIsolator.h:25
reco::Track
Definition:
Track.h:28
edm::ParameterSet
Definition:
ParameterSet.h:36
muonisolation::Cuts::CutSpec
Definition:
Cuts.h:15
edm::Event
Definition:
Event.h:71
SimpleCutsIsolator
Definition:
SimpleCutsIsolator.h:10
muonisolation::MuIsoBaseIsolator::Result::valFloat
float valFloat
Definition:
MuIsoBaseIsolator.h:42
ConsumesCollector.h
submit.answer
answer
Definition:
submit.py:45
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
muonisolation::MuIsoBaseIsolator::Result::valBool
bool valBool
Definition:
MuIsoBaseIsolator.h:43
SimpleCutsIsolator::resultType
ResultType resultType() const override
Definition:
SimpleCutsIsolator.h:19
Generated for CMSSW Reference Manual by
1.8.11