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  FWPFCandidateTowerProxyBuilder(const FWPFCandidateTowerProxyBuilder&) = delete; // stop default
38  const FWPFCandidateTowerProxyBuilder& operator=(const FWPFCandidateTowerProxyBuilder&) = delete; // stop default
39 
40 protected:
41  void fillCaloData() override;
43  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
44 
45 private:
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  FWECalPFCandidateProxyBuilder(const FWECalPFCandidateProxyBuilder&) = delete; // stop default
68  const FWECalPFCandidateProxyBuilder& operator=(const FWECalPFCandidateProxyBuilder&) = delete; // stop default
69 };
70 
71 //
72 // Hcal
73 //
74 
76 public:
79 
80  // ---------- const member functions ---------------------
81 
82  double getEt(const reco::PFCandidate& iTower) const override {
83  return iTower.hcalEnergy() * TMath::Sin(iTower.theta());
84  }
85 
87 
88  FWHCalPFCandidateProxyBuilder(const FWHCalPFCandidateProxyBuilder&) = delete; // stop default
89 
90  const FWHCalPFCandidateProxyBuilder& operator=(const FWHCalPFCandidateProxyBuilder&) = delete; // stop default
91 };
92 
93 #endif
#define REGISTER_PROXYBUILDER_METHODS()
const reco::PFCandidateCollection * m_towers
const FWPFCandidateTowerProxyBuilder & operator=(const FWPFCandidateTowerProxyBuilder &)=delete
double getEt(const reco::PFCandidate &iTower) const override
double theta() const final
momentum polar angle
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
double getEt(const reco::PFCandidate &iTower) const override
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
virtual double getEt(const reco::PFCandidate &) const =0
FWHistSliceSelector * instantiateSliceSelector() override
const FWHCalPFCandidateProxyBuilder & operator=(const FWHCalPFCandidateProxyBuilder &)=delete
const FWECalPFCandidateProxyBuilder & operator=(const FWECalPFCandidateProxyBuilder &)=delete