CMS 3D CMS Logo

FWBoxRecHit.h
Go to the documentation of this file.
1 #ifndef _FWBOXRECHIT_H_
2 #define _FWBOXRECHIT_H_
3 
4 // -*- C++ -*-
5 //
6 // Package: ParticleFlow
7 // Class : FWBoxRecHit
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 // FWBoxRechHit
33 //-----------------------------------------------------------------------------
34 class FWBoxRecHit {
35 public:
36  // ---------------- Constructor(s)/Destructor ----------------------
37  FWBoxRecHit(const std::vector<TEveVector> &corners, TEveElement *comp, float e, float et);
38  virtual ~FWBoxRecHit() {}
39 
40  // --------------------- Member Functions --------------------------
41  void updateScale(float scale, float maxLogVal, bool plotEt);
42  void setSquareColor(Color_t c) {
43  m_ls->SetMarkerColor(c);
44  m_ls->SetLineColor(kBlack);
45  }
46 
47  TEveBox *getTower() { return m_tower; }
48  void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
49  void addLine(float x1, float y1, float z1, float x2, float y2, float z2);
50  void addLine(const TEveVector &v1, const TEveVector &v2);
51  float getEnergy(bool b) const { return b ? m_et : m_energy; }
52  bool isTallest() const { return m_isTallest; }
53  void setIsTallest();
54 
55  FWBoxRecHit(const FWBoxRecHit &) = delete; // Disable default
56  const FWBoxRecHit &operator=(const FWBoxRecHit &) = delete; // Disable default
57 
58 private:
59  // --------------------- Member Functions --------------------------
60  void setupEveBox(std::vector<TEveVector> &corners, float scale);
61  void buildTower(const std::vector<TEveVector> &corners);
62  void buildLineSet(const std::vector<TEveVector> &corners);
63 
64  // ----------------------- Data Members ----------------------------
65  TEveBox *m_tower;
66  TEveStraightLineSet *m_ls;
67  float m_energy;
68  float m_et;
70 };
71 #endif
72 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
void setupEveBox(std::vector< TEveVector > &corners, float scale)
Definition: FWBoxRecHit.cc:31
float m_energy
Definition: FWBoxRecHit.h:67
const FWBoxRecHit & operator=(const FWBoxRecHit &)=delete
void buildTower(const std::vector< TEveVector > &corners)
Definition: FWBoxRecHit.cc:47
TEveBox * getTower()
Definition: FWBoxRecHit.h:47
TEveStraightLineSet * m_ls
Definition: FWBoxRecHit.h:66
void updateScale(float scale, float maxLogVal, bool plotEt)
Definition: FWBoxRecHit.cc:85
void addLine(float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWBoxRecHit.cc:155
void buildLineSet(const std::vector< TEveVector > &corners)
Definition: FWBoxRecHit.cc:62
float getEnergy(bool b) const
Definition: FWBoxRecHit.h:51
void setIsTallest()
Definition: FWBoxRecHit.cc:152
TEveBox * m_tower
Definition: FWBoxRecHit.h:65
bool m_isTallest
Definition: FWBoxRecHit.h:69
float m_et
Definition: FWBoxRecHit.h:68
FWBoxRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, float e, float et)
Definition: FWBoxRecHit.cc:9
double b
Definition: hdecay.h:120
virtual ~FWBoxRecHit()
Definition: FWBoxRecHit.h:38
bool isTallest() const
Definition: FWBoxRecHit.h:52
void setSquareColor(Color_t c)
Definition: FWBoxRecHit.h:42
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWBoxRecHit.cc:137