CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/Fireworks/ParticleFlow/plugins/FWPFClusterLegoProxyBuilder.h

Go to the documentation of this file.
00001 #ifndef _FWPFCLUSTERLEGOPROXYBUILDER_H_
00002 #define _FWPFCLUSTERLEGOPROXYBUILDER_H_
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:     ParticleFlow
00007 // Class  :     FWPFClusterLegoProxyBuilder, FWPFEcalClusterLegoProxyBuilder, FWPFHcalClusterLegoProxyBuilder
00008 // 
00009 // Implementation:
00010 //     <Notes on implementation>
00011 //
00012 // Original Author:  Simon Harris
00013 //
00014 
00015 // System include files
00016 #include <math.h>
00017 #include "TEveBox.h"
00018 
00019 // User include files
00020 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00021 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00022 #include "Fireworks/ParticleFlow/interface/FWPFMaths.h"
00023 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00024 #include "Fireworks/Core/interface/FWEventItem.h"
00025 #include "Fireworks/Core/interface/Context.h"
00026 
00027 //-----------------------------------------------------------------------------
00028 // FWPFClusterLegoProxyBuilder
00029 //-----------------------------------------------------------------------------
00030 
00031 class FWPFClusterLegoProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFCluster>
00032 {
00033     public:
00034       static std::string typeOfBuilder() { return "simple#"; }
00035 
00036    // ---------------- Constructor(s)/Destructor ----------------------
00037       FWPFClusterLegoProxyBuilder(){}
00038       virtual ~FWPFClusterLegoProxyBuilder(){}
00039 
00040    // --------------------- Member Functions --------------------------
00041       virtual void scaleProduct( TEveElementList *parent, FWViewType::EType, const FWViewContext *vc );
00042       virtual bool havePerViewProduct(FWViewType::EType) const { return true; }
00043       virtual void localModelChanges( const FWModelId &iId, TEveElement *el,
00044                                         FWViewType::EType viewType, const FWViewContext *vc );
00045    
00046       REGISTER_PROXYBUILDER_METHODS();
00047 
00048    protected:
00049    // --------------------- Member Functions --------------------------
00050       void sharedBuild( const reco::PFCluster&, TEveElement&, const FWViewContext* );
00051       float calculateEt( const reco::PFCluster &cluster, float E );
00052 
00053    private:
00054       // Disable default copy constructor
00055       FWPFClusterLegoProxyBuilder( const FWPFClusterLegoProxyBuilder& );
00056       // Disable default assignment operator
00057       const FWPFClusterLegoProxyBuilder& operator=( const FWPFClusterLegoProxyBuilder& );
00058 };
00059 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00060 
00061 //-----------------------------------------------------------------------------
00062 // FWPFEcalClusterLegoProxyBuilder
00063 //-----------------------------------------------------------------------------
00064 
00065 class FWPFEcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder
00066 {
00067    public:
00068    // ---------------- Constructor(s)/Destructor ----------------------
00069       FWPFEcalClusterLegoProxyBuilder(){}
00070       virtual ~FWPFEcalClusterLegoProxyBuilder(){}
00071 
00072    // --------------------- Member Functions --------------------------
00073       virtual void build( const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext* );
00074 
00075       REGISTER_PROXYBUILDER_METHODS();
00076 
00077    private:
00078       FWPFEcalClusterLegoProxyBuilder( const FWPFEcalClusterLegoProxyBuilder& );
00079       const FWPFEcalClusterLegoProxyBuilder& operator=( const FWPFEcalClusterLegoProxyBuilder& );
00080 };
00081 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00082 
00083 //-----------------------------------------------------------------------------
00084 // FWPFHcalClusterLegoProxyBuilder
00085 //-----------------------------------------------------------------------------
00086 
00087 class FWPFHcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder
00088 {
00089    public:
00090    // ---------------- Constructor(s)/Destructor ----------------------
00091       FWPFHcalClusterLegoProxyBuilder(){}
00092       virtual ~FWPFHcalClusterLegoProxyBuilder(){}
00093 
00094    // --------------------- Member Functions --------------------------
00095       virtual void build( const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext* );
00096 
00097       REGISTER_PROXYBUILDER_METHODS();
00098 
00099    private:
00100       FWPFHcalClusterLegoProxyBuilder( const FWPFHcalClusterLegoProxyBuilder& );
00101       const FWPFHcalClusterLegoProxyBuilder& operator=( const FWPFHcalClusterLegoProxyBuilder& );
00102 };
00103 #endif
00104 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_