Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-17 23:10:43

0001 #ifndef Fireworks_Calo_FWCaloTowerProxyBuilder_h
0002 #define Fireworks_Calo_FWCaloTowerProxyBuilder_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Calo
0006 // Class  :     FWCaloTowerProxyBuilderBase
0007 //
0008 /**\class FWCaloTowerProxyBuilderBase FWCaloTowerProxyBuilderBase.h Fireworks/Calo/interface/FWCaloTowerProxyBuilderBase.h
0009 
0010    Description: <one line class summary>
0011 
0012    Usage:
0013     <usage>
0014 
0015  */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Wed Dec  3 11:28:08 EST 2008
0019 //
0020 
0021 #include "Rtypes.h"
0022 #include <string>
0023 
0024 #include "Fireworks/Calo/interface/FWCaloDataHistProxyBuilder.h"
0025 #include "Fireworks/Calo/interface/FWFromTEveCaloDataSelector.h"
0026 #include "DataFormats/CaloTowers/interface/CaloTower.h"
0027 #include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
0028 
0029 class FWHistSliceSelector;
0030 //
0031 // base
0032 //
0033 
0034 class FWCaloTowerProxyBuilderBase : public FWCaloDataHistProxyBuilder {
0035 public:
0036   FWCaloTowerProxyBuilderBase();
0037   ~FWCaloTowerProxyBuilderBase() override;
0038 
0039   virtual double getEt(const CaloTower&) const = 0;
0040 
0041 protected:
0042   void fillCaloData() override;
0043   FWHistSliceSelector* instantiateSliceSelector() override;
0044   void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
0045 
0046 public:
0047   FWCaloTowerProxyBuilderBase(const FWCaloTowerProxyBuilderBase&) = delete;                   // stop default
0048   const FWCaloTowerProxyBuilderBase& operator=(const FWCaloTowerProxyBuilderBase&) = delete;  // stop default
0049 
0050 private:
0051   const CaloTowerCollection* m_towers;
0052 };
0053 
0054 //
0055 // Ecal
0056 //
0057 
0058 class FWECalCaloTowerProxyBuilder : public FWCaloTowerProxyBuilderBase {
0059 public:
0060   FWECalCaloTowerProxyBuilder() {}
0061   ~FWECalCaloTowerProxyBuilder() override {}
0062 
0063   // ---------- const member functions ---------------------
0064 
0065   double getEt(const CaloTower& iTower) const override { return iTower.emEt(); }
0066 
0067   REGISTER_PROXYBUILDER_METHODS();
0068 
0069   FWECalCaloTowerProxyBuilder(const FWECalCaloTowerProxyBuilder&) = delete;                   // stop default
0070   const FWECalCaloTowerProxyBuilder& operator=(const FWECalCaloTowerProxyBuilder&) = delete;  // stop default
0071 };
0072 
0073 //
0074 // Hcal
0075 //
0076 
0077 class FWHCalCaloTowerProxyBuilder : public FWCaloTowerProxyBuilderBase {
0078 public:
0079   FWHCalCaloTowerProxyBuilder() {}
0080   ~FWHCalCaloTowerProxyBuilder() override {}
0081 
0082   // ---------- const member functions ---------------------
0083 
0084   double getEt(const CaloTower& iTower) const override { return iTower.hadEt(); }
0085 
0086   REGISTER_PROXYBUILDER_METHODS();
0087 
0088   FWHCalCaloTowerProxyBuilder(const FWHCalCaloTowerProxyBuilder&) = delete;  // stop default
0089 
0090   const FWHCalCaloTowerProxyBuilder& operator=(const FWHCalCaloTowerProxyBuilder&) = delete;  // stop default
0091 };
0092 
0093 //
0094 // HCal Outer
0095 //
0096 
0097 class FWHOCaloTowerProxyBuilder : public FWCaloTowerProxyBuilderBase {
0098 public:
0099   FWHOCaloTowerProxyBuilder() {}
0100   ~FWHOCaloTowerProxyBuilder() override {}
0101 
0102   // ---------- const member functions ---------------------
0103 
0104   double getEt(const CaloTower& iTower) const override { return iTower.outerEt(); }
0105 
0106   REGISTER_PROXYBUILDER_METHODS();
0107 
0108   FWHOCaloTowerProxyBuilder(const FWHOCaloTowerProxyBuilder&) = delete;                   // stop default
0109   const FWHOCaloTowerProxyBuilder& operator=(const FWHOCaloTowerProxyBuilder&) = delete;  // stop default
0110 };
0111 
0112 #endif