CMS 3D CMS Logo

FWPFCandidateTowerProxyBuilder.h
Go to the documentation of this file.
1 #ifndef Fireworks_Calo_FWPFCandTowerProxyBuilder_h
2 #define Fireworks_Calo_FWPFCandTowerProxyBuilder_h
3 // -*- C++ -*-
4 //
5 // Package: Calo
6 // Class : FWCaloTowerProxyBuilderBase
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Wed Dec 3 11:28:08 EST 2008
19 //
20 
21 #include "Rtypes.h"
22 #include <string>
23 
27 
29 
31 public:
34 
35  virtual double getEt(const reco::PFCandidate&) const = 0;
36 
37 protected:
38  void fillCaloData() override;
40  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
41 
42 private:
43  FWPFCandidateTowerProxyBuilder(const FWPFCandidateTowerProxyBuilder&) = delete; // stop default
44  const FWPFCandidateTowerProxyBuilder& operator=(const FWPFCandidateTowerProxyBuilder&) = delete; // stop default
45 
46  // ---------- member data --------------------------------
48 };
49 
50 //
51 // Ecal
52 //
53 
55 public:
58 
59  // ---------- const member functions ---------------------
60 
61  double getEt(const reco::PFCandidate& iTower) const override {
62  return iTower.ecalEnergy() * TMath::Sin(iTower.theta());
63  }
64 
66 
67 private:
68  FWECalPFCandidateProxyBuilder(const FWECalPFCandidateProxyBuilder&) = delete; // stop default
69  const FWECalPFCandidateProxyBuilder& operator=(const FWECalPFCandidateProxyBuilder&) = delete; // stop default
70 };
71 
72 //
73 // Hcal
74 //
75 
77 public:
80 
81  // ---------- const member functions ---------------------
82 
83  double getEt(const reco::PFCandidate& iTower) const override {
84  return iTower.hcalEnergy() * TMath::Sin(iTower.theta());
85  }
86 
88 
89 private:
90  FWHCalPFCandidateProxyBuilder(const FWHCalPFCandidateProxyBuilder&) = delete; // stop default
91 
92  const FWHCalPFCandidateProxyBuilder& operator=(const FWHCalPFCandidateProxyBuilder&) = delete; // stop default
93 };
94 
95 #endif
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:220
double theta() const final
momentum polar angle
const reco::PFCandidateCollection * m_towers
double getEt(const reco::PFCandidate &iTower) const override
const FWPFCandidateTowerProxyBuilder & operator=(const FWPFCandidateTowerProxyBuilder &)=delete
virtual double getEt(const reco::PFCandidate &) const =0
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
#define REGISTER_PROXYBUILDER_METHODS()
double getEt(const reco::PFCandidate &iTower) const override
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
FWHistSliceSelector * instantiateSliceSelector() override
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:232