Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:10:03

0001 #ifndef _FWPFCLUSTERLEGOPROXYBUILDER_H_
0002 #define _FWPFCLUSTERLEGOPROXYBUILDER_H_
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:     ParticleFlow
0007 // Class  :     FWPFClusterLegoProxyBuilder, FWPFEcalClusterLegoProxyBuilder, FWPFHcalClusterLegoProxyBuilder
0008 //
0009 // Implementation:
0010 //     <Notes on implementation>
0011 //
0012 // Original Author:  Simon Harris
0013 //
0014 
0015 // System include files
0016 #include <cmath>
0017 #include "TEveBox.h"
0018 
0019 // User include files
0020 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
0021 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0022 #include "Fireworks/ParticleFlow/interface/FWPFMaths.h"
0023 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
0024 #include "Fireworks/Core/interface/FWEventItem.h"
0025 #include "Fireworks/Core/interface/Context.h"
0026 
0027 //-----------------------------------------------------------------------------
0028 // FWPFClusterLegoProxyBuilder
0029 //-----------------------------------------------------------------------------
0030 
0031 class FWPFClusterLegoProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::PFCluster> {
0032 public:
0033   static std::string typeOfBuilder() { return "simple#"; }
0034 
0035   // ---------------- Constructor(s)/Destructor ----------------------
0036   FWPFClusterLegoProxyBuilder() {}
0037   ~FWPFClusterLegoProxyBuilder() override {}
0038 
0039   // --------------------- Member Functions --------------------------
0040   using FWSimpleProxyBuilderTemplate<reco::PFCluster>::scaleProduct;
0041   void scaleProduct(TEveElementList* parent, FWViewType::EType, const FWViewContext* vc) override;
0042   using FWSimpleProxyBuilderTemplate<reco::PFCluster>::havePerViewProduct;
0043   bool havePerViewProduct(FWViewType::EType) const override { return true; }
0044   using FWSimpleProxyBuilderTemplate<reco::PFCluster>::localModelChanges;
0045   void localModelChanges(const FWModelId& iId,
0046                          TEveElement* el,
0047                          FWViewType::EType viewType,
0048                          const FWViewContext* vc) override;
0049 
0050   REGISTER_PROXYBUILDER_METHODS();
0051 
0052 protected:
0053   // --------------------- Member Functions --------------------------
0054   void sharedBuild(const reco::PFCluster&, TEveElement&, const FWViewContext*);
0055   float calculateEt(const reco::PFCluster& cluster, float E);
0056 
0057 private:
0058   // Disable default copy constructor
0059   FWPFClusterLegoProxyBuilder(const FWPFClusterLegoProxyBuilder&);
0060   // Disable default assignment operator
0061   const FWPFClusterLegoProxyBuilder& operator=(const FWPFClusterLegoProxyBuilder&);
0062 };
0063 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
0064 
0065 //-----------------------------------------------------------------------------
0066 // FWPFEcalClusterLegoProxyBuilder
0067 //-----------------------------------------------------------------------------
0068 
0069 class FWPFEcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder {
0070 public:
0071   // ---------------- Constructor(s)/Destructor ----------------------
0072   FWPFEcalClusterLegoProxyBuilder() {}
0073   ~FWPFEcalClusterLegoProxyBuilder() override {}
0074 
0075   // --------------------- Member Functions --------------------------
0076   using FWSimpleProxyBuilderTemplate<reco::PFCluster>::build;
0077   void build(const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext*) override;
0078 
0079   REGISTER_PROXYBUILDER_METHODS();
0080 
0081   FWPFEcalClusterLegoProxyBuilder(const FWPFEcalClusterLegoProxyBuilder&) = delete;
0082   const FWPFEcalClusterLegoProxyBuilder& operator=(const FWPFEcalClusterLegoProxyBuilder&) = delete;
0083 };
0084 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
0085 
0086 //-----------------------------------------------------------------------------
0087 // FWPFHcalClusterLegoProxyBuilder
0088 //-----------------------------------------------------------------------------
0089 
0090 class FWPFHcalClusterLegoProxyBuilder : public FWPFClusterLegoProxyBuilder {
0091 public:
0092   // ---------------- Constructor(s)/Destructor ----------------------
0093   FWPFHcalClusterLegoProxyBuilder() {}
0094   ~FWPFHcalClusterLegoProxyBuilder() override {}
0095 
0096   // --------------------- Member Functions --------------------------
0097   using FWSimpleProxyBuilderTemplate<reco::PFCluster>::build;
0098   void build(const reco::PFCluster&, unsigned int, TEveElement&, const FWViewContext*) override;
0099 
0100   REGISTER_PROXYBUILDER_METHODS();
0101 
0102   FWPFHcalClusterLegoProxyBuilder(const FWPFHcalClusterLegoProxyBuilder&) = delete;
0103   const FWPFHcalClusterLegoProxyBuilder& operator=(const FWPFHcalClusterLegoProxyBuilder&) = delete;
0104 };
0105 #endif
0106 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_