CMS 3D CMS Logo

FWPFBlockProxyBuilder.h
Go to the documentation of this file.
1 #ifndef _FWPFBLOCKPROXYBUILDER_H_
2 #define _FWPFBLOCKPROXYBUILDER_H_
3 
4 // -*- C++ -*-
5 //
6 // Package: ParticleFlow
7 // Class : FWPFBlockProxyBuilder
8 //
9 // Implementation:
10 // <Notes on implementation>
11 //
12 // Original Author: Simon Harris
13 // Created: 14/02/2011
14 //
15 
16 // System include files
17 #include <cmath>
18 #include "TEveScalableStraightLineSet.h"
19 
20 // User include files
24 
28 
31 
32 //-----------------------------------------------------------------------------
33 // FWPFBlockProxyBuilder
34 //-----------------------------------------------------------------------------
35 class FWPFBlockProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFBlock> {
36 public:
37  enum BuilderType { BASE = 0, ECAL = 1, HCAL = 2 };
38 
39  // ---------------- Constructor(s)/Destructor ----------------------
41  ~FWPFBlockProxyBuilder() override {}
42 
44 
45 protected:
46  // --------------------- Member Functions --------------------------
47  void setupTrackElement(const reco::PFBlockElement&, TEveElement&, const FWViewContext*, FWViewType::EType);
48  void setupClusterElement(const reco::PFBlockElement&, TEveElement&, const FWViewContext*, FWViewType::EType, float r);
49  void clusterSharedBuild(const reco::PFCluster&, TEveElement&, const FWViewContext*);
50 
52  bool havePerViewProduct(FWViewType::EType) const override { return true; }
53 
55  bool haveSingleProduct() const override { return false; } // different view types
56 
58  void scaleProduct(TEveElementList* parent, FWViewType::EType, const FWViewContext* vc) override;
59 
61  void cleanLocal() override { m_clusters.clear(); }
62 
64  void buildViewType(const reco::PFBlock&, unsigned int, TEveElement&, FWViewType::EType, const FWViewContext*) override;
65 
66  // ----------------------- Data Members ----------------------------
68  std::vector<ScalableLines> m_clusters;
69 
70 private:
73 };
74 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
75 
76 //-----------------------------------------------------------------------------
77 // FWPFBlockEcalProxyBuilder
78 //-----------------------------------------------------------------------------
80 public:
83 
85 
88 };
89 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
90 
91 //-----------------------------------------------------------------------------
92 // FWPFBlockHcalProxyBuilder
93 //-----------------------------------------------------------------------------
95 public:
98 
100 
103 };
104 #endif
105 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
bool havePerViewProduct(FWViewType::EType) const override
Abstract base class for a PFBlock element (track, cluster...)
virtual void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
#define REGISTER_PROXYBUILDER_METHODS()
void setupTrackElement(const reco::PFBlockElement &, TEveElement &, const FWViewContext *, FWViewType::EType)
void setupClusterElement(const reco::PFBlockElement &, TEveElement &, const FWViewContext *, FWViewType::EType, float r)
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
std::vector< ScalableLines > m_clusters
virtual void cleanLocal()
virtual bool haveSingleProduct() const
void clusterSharedBuild(const reco::PFCluster &, TEveElement &, const FWViewContext *)
bool haveSingleProduct() const override
const FWPFBlockEcalProxyBuilder & operator=(const FWPFBlockEcalProxyBuilder &)=delete
Definition: HCAL.py:1
void scaleProduct(TEveElementList *parent, FWViewType::EType, const FWViewContext *vc) override
const FWPFBlockProxyBuilder & operator=(const FWPFBlockProxyBuilder &)
virtual bool havePerViewProduct(FWViewType::EType) const
void buildViewType(const reco::PFBlock &, unsigned int, TEveElement &, FWViewType::EType, const FWViewContext *) override
const FWPFBlockHcalProxyBuilder & operator=(const FWPFBlockHcalProxyBuilder &)=delete
Block of elements.
Definition: PFBlock.h:26