CMS 3D CMS Logo

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
19 
25 
28 
31 
32 namespace egammaisolation {
33 
35  public:
36  enum HcalDepth { AllDepths = -1, Undefined = 0, Depth1 = 1, Depth2 = 2 };
37 
38  public:
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")) {
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  }
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  }
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 
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