Go to the documentation of this file.00001 #ifndef _FWPFBLOCKPROXYBUILDER_H_
00002 #define _FWPFBLOCKPROXYBUILDER_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <math.h>
00019 #include "TEveScalableStraightLineSet.h"
00020
00021
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 #include "Fireworks/ParticleFlow/interface/FWPFLegoCandidate.h"
00033
00034
00035
00036
00037 class FWPFBlockProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFBlock>
00038 {
00039 public:
00040 enum BuilderType { BASE=0, ECAL=1, HCAL=2 };
00041
00042
00043 FWPFBlockProxyBuilder() : e_builderType(BASE) {}
00044 virtual ~FWPFBlockProxyBuilder(){}
00045
00046 REGISTER_PROXYBUILDER_METHODS();
00047
00048 protected:
00049
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; }
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
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
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
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