CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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 "TEveCompound.h"
00018 #include "TEveBox.h"
00019 
00020 // User include files
00021 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00022 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00023 #include "Fireworks/ParticleFlow/plugins/FWPFLegoCandidate.h"
00024 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00025 #include "Fireworks/Core/interface/FWEventItem.h"
00026 #include "Fireworks/Core/interface/Context.h"
00027 
00028 //-----------------------------------------------------------------------------
00029 // FWPFClusterLegoProxyBuilder
00030 //-----------------------------------------------------------------------------
00031 
00032 class FWPFClusterLegoProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFCluster>
00033 {
00034     public:
00035       static std::string typeOfBuilder() { return "simple#"; }
00036 
00037    // ---------------- Constructor(s)/Destructor ----------------------
00038       FWPFClusterLegoProxyBuilder(){}
00039       virtual ~FWPFClusterLegoProxyBuilder(){}
00040 
00041    // --------------------- Member Functions --------------------------
00042       virtual void scaleProduct( TEveElementList *parent, FWViewType::EType, const FWViewContext *vc );
00043       virtual bool havePerViewProduct(FWViewType::EType) const { return true; }
00044       virtual void localModelChanges( const FWModelId &iId, TEveElement *iCompound,
00045                                         FWViewType::EType viewType, const FWViewContext *vc );
00046    
00047       REGISTER_PROXYBUILDER_METHODS();
00048 
00049    protected:
00050    // --------------------- Member Functions --------------------------
00051       void sharedBuild( const reco::PFCluster&, TEveElement&, const FWViewContext* );
00052       float calculateEt( const reco::PFCluster &cluster, float E );
00053 
00054    private:
00055       // Disable default copy constructor
00056       FWPFClusterLegoProxyBuilder( const FWPFClusterLegoProxyBuilder& );
00057       // Disable default assignment operator
00058       const FWPFClusterLegoProxyBuilder& operator=( const FWPFClusterLegoProxyBuilder& );
00059 };
00060 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00061 
00062 //-----------------------------------------------------------------------------
00063 // FWPFEcalClusterLegoProxyBuilder
00064 //-----------------------------------------------------------------------------
00065 
00066 class FWPFEcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder
00067 {
00068    public:
00069    // ---------------- Constructor(s)/Destructor ----------------------
00070       FWPFEcalClusterLegoProxyBuilder(){}
00071       virtual ~FWPFEcalClusterLegoProxyBuilder(){}
00072 
00073    // --------------------- Member Functions --------------------------
00074       virtual void build( const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext* );
00075 
00076       REGISTER_PROXYBUILDER_METHODS();
00077 
00078    private:
00079       FWPFEcalClusterLegoProxyBuilder( const FWPFEcalClusterLegoProxyBuilder& );
00080       const FWPFEcalClusterLegoProxyBuilder& operator=( const FWPFEcalClusterLegoProxyBuilder& );
00081 };
00082 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
00083 
00084 //-----------------------------------------------------------------------------
00085 // FWPFHcalClusterLegoProxyBuilder
00086 //-----------------------------------------------------------------------------
00087 
00088 class FWPFHcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder
00089 {
00090    public:
00091    // ---------------- Constructor(s)/Destructor ----------------------
00092       FWPFHcalClusterLegoProxyBuilder(){}
00093       virtual ~FWPFHcalClusterLegoProxyBuilder(){}
00094 
00095    // --------------------- Member Functions --------------------------
00096       virtual void build( const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext* );
00097 
00098       REGISTER_PROXYBUILDER_METHODS();
00099 
00100    private:
00101       FWPFHcalClusterLegoProxyBuilder( const FWPFHcalClusterLegoProxyBuilder& );
00102       const FWPFHcalClusterLegoProxyBuilder& operator=( const FWPFHcalClusterLegoProxyBuilder& );
00103 };
00104 #endif
00105 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_