CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Fireworks/ParticleFlow/plugins/FWPFEcalRecHitRPProxyBuilder.h

Go to the documentation of this file.
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/interface/FWPFRhoPhiRecHit.h"
00026 #include "Fireworks/ParticleFlow/interface/FWPFGeom.h"
00027 #include "Fireworks/ParticleFlow/interface/FWPFMaths.h"
00028 
00029 #include "Fireworks/Core/interface/FWViewContext.h"
00030 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
00031 
00032 //-----------------------------------------------------------------------------
00033 // FWPFEcalRecHitRPProxyBuilder
00034 //-----------------------------------------------------------------------------
00035 class FWPFEcalRecHitRPProxyBuilder : public FWProxyBuilderTemplate<EcalRecHit>
00036 {
00037    public:
00038       static std::string typeOfBuilder() { return "simple#"; }
00039 
00040    // ---------------- Constructor(s)/Destructor ----------------------
00041       FWPFEcalRecHitRPProxyBuilder(){}
00042       virtual ~FWPFEcalRecHitRPProxyBuilder(){}
00043 
00044    // --------------------- Member Functions --------------------------
00045       virtual void build( const FWEventItem *iItem, TEveElementList *product, const FWViewContext* );
00046 
00047       virtual bool havePerViewProduct( FWViewType::EType ) const { return true; }
00048       virtual void scaleProduct( TEveElementList *parent, FWViewType::EType, const FWViewContext *vc );
00049       virtual void cleanLocal();
00050 
00051       REGISTER_PROXYBUILDER_METHODS();
00052 
00053    private:
00054       FWPFEcalRecHitRPProxyBuilder( const FWPFEcalRecHitRPProxyBuilder& );                    // Stop default
00055       const FWPFEcalRecHitRPProxyBuilder& operator=( const FWPFEcalRecHitRPProxyBuilder& );   // Stop default
00056 
00057    // --------------------- Member Functions --------------------------
00058       TEveVector calculateCentre( const float *corners );
00059 
00060    // ----------------------- Data Members ----------------------------
00061       std::vector<FWPFRhoPhiRecHit*> m_towers;
00062 };
00063 #endif
00064 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_