Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:10:03

0001 #ifndef _FWPFECALRECHITRPPROXYBUILDER_H_
0002 #define _FWPFECALRECHITRPPROXYBUILDER_H_
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:     ParticleFlow
0007 // Class  :     FWPFEcalRecHitRPProxyBuilder
0008 //
0009 // Implementation:
0010 //     <Notes on implementation>
0011 //
0012 // Original Author:  Simon Harris
0013 //
0014 
0015 // System include files
0016 #include "TEveCompound.h"
0017 
0018 // User include files
0019 #include "Fireworks/Core/interface/FWProxyBuilderTemplate.h"
0020 #include "Fireworks/Core/interface/FWEventItem.h"
0021 #include "Fireworks/Core/interface/FWGeometry.h"
0022 #include "Fireworks/Core/interface/Context.h"
0023 
0024 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0025 #include "Fireworks/ParticleFlow/interface/FWPFRhoPhiRecHit.h"
0026 #include "Fireworks/ParticleFlow/interface/FWPFGeom.h"
0027 #include "Fireworks/ParticleFlow/interface/FWPFMaths.h"
0028 
0029 #include "Fireworks/Core/interface/FWViewContext.h"
0030 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
0031 
0032 //-----------------------------------------------------------------------------
0033 // FWPFEcalRecHitRPProxyBuilder
0034 //-----------------------------------------------------------------------------
0035 class FWPFEcalRecHitRPProxyBuilder : public FWProxyBuilderTemplate<EcalRecHit> {
0036 public:
0037   static std::string typeOfBuilder() { return "simple#"; }
0038 
0039   // ---------------- Constructor(s)/Destructor ----------------------
0040   FWPFEcalRecHitRPProxyBuilder() {}
0041   ~FWPFEcalRecHitRPProxyBuilder() override {}
0042 
0043   // --------------------- Member Functions --------------------------
0044   void build(const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override;
0045 
0046   bool havePerViewProduct(FWViewType::EType) const override { return true; }
0047   void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override;
0048   void cleanLocal() override;
0049 
0050   REGISTER_PROXYBUILDER_METHODS();
0051 
0052   FWPFEcalRecHitRPProxyBuilder(const FWPFEcalRecHitRPProxyBuilder &) = delete;                   // Stop default
0053   const FWPFEcalRecHitRPProxyBuilder &operator=(const FWPFEcalRecHitRPProxyBuilder &) = delete;  // Stop default
0054 
0055 private:
0056   // --------------------- Member Functions --------------------------
0057   TEveVector calculateCentre(const float *corners);
0058 
0059   // ----------------------- Data Members ----------------------------
0060   std::vector<FWPFRhoPhiRecHit *> m_towers;
0061 };
0062 #endif
0063 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_