CMS 3D CMS Logo

FWPFLegoRecHit.h
Go to the documentation of this file.
1 #ifndef _FWPFLEGORECHIT_H_
2 #define _FWPFLEGORECHIT_H_
3 
4 // -*- C++ -*-
5 //
6 // Package: ParticleFlow
7 // Class : FWPFLegoRecHit
8 //
9 // Implementation:
10 // <Notes on implementation>
11 //
12 // Original Author: Simon Harris
13 //
14 
15 // System include files
16 #include "TEveBox.h"
17 #include "TEveCompound.h"
18 #include "TEveStraightLineSet.h"
19 
20 #include "TEveCaloData.h"
21 #include "TEveChunkManager.h"
22 
23 // User include files
27 
28 // Forward declarations
29 class FWProxyBuilderBase;
30 
31 //-----------------------------------------------------------------------------
32 // FWPFLegoRechHit
33 //-----------------------------------------------------------------------------
35 public:
36  // ---------------- Constructor(s)/Destructor ----------------------
37  FWPFLegoRecHit(const std::vector<TEveVector> &corners,
38  TEveElement *comp,
40  const FWViewContext *vc,
41  float e,
42  float et);
43  virtual ~FWPFLegoRecHit() {}
44 
45  // --------------------- Member Functions --------------------------
46  void updateScale(const FWViewContext *vc, float maxLogVal);
47  void setSquareColor(Color_t c) {
48  m_ls->SetMarkerColor(c);
49  m_ls->SetLineColor(kBlack);
50  }
51 
52  TEveBox *getTower() { return m_tower; }
53  void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
54  void addLine(float x1, float y1, float z1, float x2, float y2, float z2);
55  void addLine(const TEveVector &v1, const TEveVector &v2);
56  float getEtEnergy(bool b) const { return b ? m_et : m_energy; }
57  bool isTallest() const { return m_isTallest; }
58  void setIsTallest(bool b);
59 
60 private:
61  FWPFLegoRecHit(const FWPFLegoRecHit &) = delete; // Disable default
62  const FWPFLegoRecHit &operator=(const FWPFLegoRecHit &) = delete; // Disable default
63 
64  // --------------------- Member Functions --------------------------
65  void setupEveBox(std::vector<TEveVector> &corners, float scale);
66  void buildTower(const std::vector<TEveVector> &corners, const FWViewContext *vc);
67  void buildLineSet(const std::vector<TEveVector> &corners, const FWViewContext *vc);
68 
69  // ----------------------- Data Members ----------------------------
70  TEveBox *m_tower;
71  TEveStraightLineSet *m_ls;
72  float m_energy;
73  float m_et;
75 };
76 #endif
77 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
float getEtEnergy(bool b) const
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
void addLine(float x1, float y1, float z1, float x2, float y2, float z2)
void buildTower(const std::vector< TEveVector > &corners, const FWViewContext *vc)
void setupEveBox(std::vector< TEveVector > &corners, float scale)
TEveBox * m_tower
bool isTallest() const
TEveBox * getTower()
void setSquareColor(Color_t c)
FWPFLegoRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, FWProxyBuilderBase *pb, const FWViewContext *vc, float e, float et)
double b
Definition: hdecay.h:118
void setIsTallest(bool b)
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
void updateScale(const FWViewContext *vc, float maxLogVal)
TEveStraightLineSet * m_ls
virtual ~FWPFLegoRecHit()
const FWPFLegoRecHit & operator=(const FWPFLegoRecHit &)=delete