00001 #ifndef _FWPFECALRECHITRPPROXYBUILDER_H_ 00002 #define _FWPFECALRECHITRPPROXYBUILDER_H_ 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: ParticleFlow 00007 // Class : FWPFEcalRecHitRPProxyBuilder 00008 // 00009 // Implementation: 00010 // <Notes on implementation> 00011 // 00012 // Original Author: Simon Harris 00013 // 00014 00015 // System include files 00016 #include "TEveCompound.h" 00017 00018 // User include files 00019 #include "Fireworks/Core/interface/FWProxyBuilderTemplate.h" 00020 #include "Fireworks/Core/interface/FWEventItem.h" 00021 #include "Fireworks/Core/interface/FWGeometry.h" 00022 #include "Fireworks/Core/interface/Context.h" 00023 00024 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h" 00025 #include "Fireworks/ParticleFlow/plugins/FWPFRhoPhiRecHit.h" 00026 #include "Fireworks/ParticleFlow/interface/FWPFUtils.h" 00027 00028 #include "Fireworks/Core/interface/FWViewContext.h" 00029 #include "Fireworks/Core/interface/FWViewEnergyScale.h" 00030 00031 //----------------------------------------------------------------------------- 00032 // FWPFEcalRecHitRPProxyBuilder 00033 //----------------------------------------------------------------------------- 00034 class FWPFEcalRecHitRPProxyBuilder : public FWProxyBuilderTemplate<EcalRecHit> 00035 { 00036 public: 00037 static std::string typeOfBuilder() { return "simple#"; } 00038 00039 // ---------------- Constructor(s)/Destructor ---------------------- 00040 FWPFEcalRecHitRPProxyBuilder(){ m_pfUtils = new FWPFUtils(); } 00041 virtual ~FWPFEcalRecHitRPProxyBuilder(){ delete m_pfUtils; } 00042 00043 // --------------------- Member Functions -------------------------- 00044 virtual void build( const FWEventItem *iItem, TEveElementList *product, const FWViewContext* ); 00045 00046 virtual bool havePerViewProduct( FWViewType::EType ) const { return true; } 00047 virtual void scaleProduct( TEveElementList *parent, FWViewType::EType, const FWViewContext *vc ); 00048 virtual void cleanLocal(); 00049 00050 REGISTER_PROXYBUILDER_METHODS(); 00051 00052 private: 00053 FWPFEcalRecHitRPProxyBuilder( const FWPFEcalRecHitRPProxyBuilder& ); // Stop default 00054 const FWPFEcalRecHitRPProxyBuilder& operator=( const FWPFEcalRecHitRPProxyBuilder& ); // Stop default 00055 00056 // --------------------- Member Functions -------------------------- 00057 TEveVector calculateCentre( const float *corners ); 00058 float calculateEt( const TEveVector ¢re, float E ); 00059 00060 // ----------------------- Data Members ---------------------------- 00061 std::vector<FWPFRhoPhiRecHit*> m_towers; 00062 FWPFUtils *m_pfUtils; 00063 }; 00064 #endif 00065 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_