CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/Fireworks/ParticleFlow/plugins/FWPFBlockProxyBuilder.h

Go to the documentation of this file.
00001 #ifndef _FWPFBLOCKPROXYBUILDER_H_
00002 #define _FWPFBLOCKPROXYBUILDER_H_
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:     ParticleFlow
00007 // Class  :     FWPFBlockProxyBuilder
00008 // 
00009 // Implementation:
00010 //     <Notes on implementation>
00011 //
00012 // Original Author:  Simon Harris
00013 //       Created:    14/02/2011
00014 //
00015 
00016 
00017 // System include files
00018 #include <math.h>
00019 #include "TEveScalableStraightLineSet.h"
00020 
00021 // User include files
00022 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00023 #include "Fireworks/Core/interface/FWEventItem.h"
00024 #include "Fireworks/Core/interface/Context.h"
00025 
00026 #include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
00027 #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h"
00028 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00029 
00030 #include "Fireworks/ParticleFlow/interface/FWPFTrackUtils.h"
00031 #include "Fireworks/ParticleFlow/interface/FWPFClusterRPZUtils.h"
00032 
00033 
00034 //-----------------------------------------------------------------------------
00035 // FWPFBlockProxyBuilder
00036 //-----------------------------------------------------------------------------
00037 class FWPFBlockProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFBlock>
00038 {
00039    public:
00040       enum BuilderType { BASE=0, ECAL=1, HCAL=2 };
00041 
00042    // ---------------- Constructor(s)/Destructor ----------------------
00043       FWPFBlockProxyBuilder() : e_builderType(BASE) {}
00044       virtual ~FWPFBlockProxyBuilder(){}
00045 
00046       REGISTER_PROXYBUILDER_METHODS();
00047 
00048    protected:
00049    // --------------------- Member Functions --------------------------
00050       void           setupTrackElement( const reco::PFBlockElement&, TEveElement&, const FWViewContext*, FWViewType::EType );
00051       void           setupClusterElement( const reco::PFBlockElement&, TEveElement&, const FWViewContext*, 
00052                                           FWViewType::EType, float r );
00053       void           clusterSharedBuild( const reco::PFCluster&, TEveElement&, const FWViewContext* );
00054 
00055       virtual bool   havePerViewProduct( FWViewType::EType ) const { return true; }
00056       virtual bool   haveSingleProduct() const { return false; } // different view types
00057       virtual void   buildViewType( const reco::PFBlock&, unsigned int, TEveElement&, FWViewType::EType, const FWViewContext* );
00058       virtual void   scaleProduct( TEveElementList *parent, FWViewType::EType, const FWViewContext *vc );
00059       virtual void   cleanLocal() { m_clusters.clear(); }
00060       
00061    // ----------------------- Data Members ----------------------------
00062       BuilderType e_builderType;
00063       std::vector<ScalableLines> m_clusters;
00064 
00065    private:
00066       FWPFBlockProxyBuilder( const FWPFBlockProxyBuilder& );
00067       const FWPFBlockProxyBuilder& operator=( const FWPFBlockProxyBuilder& ); 
00068 };
00069 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00070 
00071 
00072 //-----------------------------------------------------------------------------
00073 // FWPFBlockEcalProxyBuilder
00074 //-----------------------------------------------------------------------------
00075 class FWPFBlockEcalProxyBuilder : public FWPFBlockProxyBuilder
00076 {
00077    public:
00078       FWPFBlockEcalProxyBuilder(){ e_builderType = ECAL; }
00079       virtual ~FWPFBlockEcalProxyBuilder(){}
00080 
00081       REGISTER_PROXYBUILDER_METHODS();
00082 
00083    private:
00084       FWPFBlockEcalProxyBuilder( const FWPFBlockEcalProxyBuilder& );
00085       const FWPFBlockEcalProxyBuilder& operator=( const FWPFBlockEcalProxyBuilder& );
00086 };
00087 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00088 
00089 
00090 //-----------------------------------------------------------------------------
00091 // FWPFBlockHcalProxyBuilder
00092 //-----------------------------------------------------------------------------
00093 class FWPFBlockHcalProxyBuilder : public FWPFBlockProxyBuilder
00094 {
00095    public:
00096       FWPFBlockHcalProxyBuilder(){ e_builderType = HCAL; }
00097       virtual ~FWPFBlockHcalProxyBuilder(){}
00098 
00099       REGISTER_PROXYBUILDER_METHODS();
00100 
00101    private:
00102       FWPFBlockHcalProxyBuilder( const FWPFBlockHcalProxyBuilder& );
00103       const FWPFBlockHcalProxyBuilder& operator=( const FWPFBlockHcalProxyBuilder& );
00104 };
00105 #endif
00106 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_