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
reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const override
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool ev
EgammaTowerExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
void fillVetos(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &tracks) override
EgammaTowerExtractor(const edm::ParameterSet &par, edm::ConsumesCollector &iC)
HLT enums.
edm::EDGetTokenT< CaloTowerCollection > caloTowerToken