RecoEgamma
EgammaIsolationAlgos
plugins
EgammaTowerExtractor.h
Go to the documentation of this file.
1
#ifndef EgammaTowerIsolation_h
2
#define EgammaTowerIsolation_h
3
4
//*****************************************************************************
5
// File: EgammaTowerExtractor.h
6
// ----------------------------------------------------------------------------
7
// OrigAuth: Matthias Mozer
8
// Institute: IIHE-VUB
9
//=============================================================================
10
//*****************************************************************************
11
12
//C++ includes
13
#include <vector>
14
#include <functional>
15
16
//CMSSW includes
17
#include "
DataFormats/Candidate/interface/Candidate.h
"
18
#include "
DataFormats/CaloTowers/interface/CaloTowerCollection.h
"
19
20
#include "
FWCore/Framework/interface/Event.h
"
21
#include "
FWCore/Framework/interface/EventSetup.h
"
22
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
23
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
24
#include "
FWCore/Utilities/interface/InputTag.h
"
25
26
#include "
DataFormats/TrackReco/interface/Track.h
"
27
#include "
DataFormats/TrackReco/interface/TrackFwd.h
"
28
29
#include "
PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h
"
30
#include "
DataFormats/RecoCandidate/interface/IsoDeposit.h
"
31
32
namespace
egammaisolation
{
33
34
class
EgammaTowerExtractor
:
public
reco::isodeposit::IsoDepositExtractor
{
35
public
:
36
enum
HcalDepth
{
AllDepths
= -1,
Undefined
= 0,
Depth1
= 1,
Depth2
= 2 };
37
38
public
:
39
EgammaTowerExtractor
(
const
edm::ParameterSet
& par,
edm::ConsumesCollector
&& iC) :
EgammaTowerExtractor
(par, iC) {}
40
EgammaTowerExtractor
(
const
edm::ParameterSet
& par,
edm::ConsumesCollector
& iC)
41
:
extRadius2_
(par.getParameter<double>(
"extRadius"
)),
42
intRadius_
(par.getParameter<double>(
"intRadius"
)),
43
etLow_
(par.getParameter<double>(
"etMin"
)),
44
caloTowerToken
(iC.consumes<
CaloTowerCollection
>(par.getParameter<
edm
::
InputTag
>(
"caloTowers"
))),
45
depth_
(par.getParameter<
int
>(
"hcalDepth"
)) {
46
extRadius2_
*=
extRadius2_
;
47
//lets just check we have a valid depth
48
//should we throw an exception or just warn and then fail gracefully later?
49
if
(
depth_
!=
AllDepths
&&
depth_
!=
Depth1
&&
depth_
!=
Depth2
) {
50
throw
cms::Exception
(
"Configuration Error"
)
51
<<
"hcalDepth passed to EgammaTowerExtractor is invalid "
<< std::endl;
52
}
53
}
54
55
~EgammaTowerExtractor
()
override
;
56
57
void
fillVetos
(
const
edm::Event
&
ev
,
const
edm::EventSetup
& evSetup,
const
reco::TrackCollection
&
tracks
)
override
{
58
}
59
reco::IsoDeposit
deposit
(
const
edm::Event
&
ev
,
60
const
edm::EventSetup
& evSetup,
61
const
reco::Track
&
track
)
const override
{
62
throw
cms::Exception
(
"Configuration Error"
)
63
<<
"This extractor "
<< (
typeid
(
this
).
name
()) <<
" is not made for tracks"
;
64
}
65
reco::IsoDeposit
deposit
(
const
edm::Event
&
ev
,
66
const
edm::EventSetup
& evSetup,
67
const
reco::Candidate
&
c
)
const override
;
68
69
private
:
70
double
extRadius2_
;
71
double
intRadius_
;
72
double
etLow_
;
73
74
edm::EDGetTokenT<CaloTowerCollection>
caloTowerToken
;
75
int
depth_
;
76
//const CaloTowerCollection *towercollection_ ;
77
};
78
}
// namespace egammaisolation
79
#endif
egammaisolation::EgammaTowerExtractor::Depth2
Definition:
EgammaTowerExtractor.h:36
PDWG_EXOHSCP_cff.tracks
tracks
Definition:
PDWG_EXOHSCP_cff.py:28
HLT_FULL_cff.track
track
Definition:
HLT_FULL_cff.py:11713
egammaisolation::EgammaTowerExtractor::etLow_
double etLow_
Definition:
EgammaTowerExtractor.h:72
egammaisolation
Definition:
EgammaTrackSelector.h:11
egammaisolation::EgammaTowerExtractor::extRadius2_
double extRadius2_
Definition:
EgammaTowerExtractor.h:70
edm::EDGetTokenT
Definition:
EDGetToken.h:33
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89287
edm::SortedCollection< CaloTower >
egammaisolation::EgammaTowerExtractor::deposit
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
Definition:
EgammaTowerExtractor.h:59
egammaisolation::EgammaTowerExtractor::depth_
int depth_
Definition:
EgammaTowerExtractor.h:75
Track.h
TrackFwd.h
egammaisolation::EgammaTowerExtractor::~EgammaTowerExtractor
~EgammaTowerExtractor() override
Definition:
EgammaTowerExtractor.cc:30
egammaisolation::EgammaTowerExtractor::EgammaTowerExtractor
EgammaTowerExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
Definition:
EgammaTowerExtractor.h:39
reco::Track
Definition:
Track.h:27
egammaisolation::EgammaTowerExtractor::caloTowerToken
edm::EDGetTokenT< CaloTowerCollection > caloTowerToken
Definition:
EgammaTowerExtractor.h:74
egammaisolation::EgammaTowerExtractor::HcalDepth
HcalDepth
Definition:
EgammaTowerExtractor.h:36
IsoDeposit.h
IsoDepositExtractor.h
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
egammaisolation::EgammaTowerExtractor::EgammaTowerExtractor
EgammaTowerExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &iC)
Definition:
EgammaTowerExtractor.h:40
createfilelist.int
int
Definition:
createfilelist.py:10
egammaisolation::EgammaTowerExtractor
Definition:
EgammaTowerExtractor.h:34
egammaisolation::EgammaTowerExtractor::AllDepths
Definition:
EgammaTowerExtractor.h:36
edm::EventSetup
Definition:
EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
InputTag.h
reco::Candidate
Definition:
Candidate.h:27
CaloTowerCollection.h
egammaisolation::EgammaTowerExtractor::Depth1
Definition:
EgammaTowerExtractor.h:36
egammaisolation::EgammaTowerExtractor::intRadius_
double intRadius_
Definition:
EgammaTowerExtractor.h:71
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
Exception
Definition:
hltDiff.cc:246
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
EventSetup.h
reco::IsoDeposit
Definition:
IsoDeposit.h:49
ConsumesCollector.h
Candidate.h
egammaisolation::EgammaTowerExtractor::Undefined
Definition:
EgammaTowerExtractor.h:36
ParameterSet.h
reco::isodeposit::IsoDepositExtractor
Definition:
IsoDepositExtractor.h:24
edm::Event
Definition:
Event.h:73
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition:
TrackFwd.h:14
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
egammaisolation::EgammaTowerExtractor::fillVetos
void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) override
Definition:
EgammaTowerExtractor.h:57
Generated for CMSSW Reference Manual by
1.8.16