CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
30 
31 //-----------------------------------------------------------------------------
32 // FWPFLegoRechHit
33 //-----------------------------------------------------------------------------
35 {
36  public:
37  // ---------------- Constructor(s)/Destructor ----------------------
38  FWPFLegoRecHit( const std::vector<TEveVector> &corners, TEveElement *comp, FWPFEcalRecHitLegoProxyBuilder*pb,
39  const FWViewContext *vc, float e, float et );
40  virtual ~FWPFLegoRecHit(){}
41 
42  // --------------------- Member Functions --------------------------
43  void updateScale( const FWViewContext *vc);
44  void setSquareColor( Color_t c ) { m_ls->SetMarkerColor(c); m_ls->SetLineColor(kBlack); }
45 
46  TEveBox *getTower() { return m_tower; }
47  void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
48  void addLine( float x1, float y1, float z1, float x2, float y2, float z2 );
49  void addLine( const TEveVector &v1, const TEveVector &v2 );
50  float getEtEnergy( bool b ) const { return b ? m_et : m_energy; }
51  bool isTallest() const { return m_isTallest; }
52  void setIsTallest( bool b );
53 
54  private:
55  FWPFLegoRecHit( const FWPFLegoRecHit& ); // Disable default
56  const FWPFLegoRecHit& operator=( const FWPFLegoRecHit& ); // Disable default
57 
58  // --------------------- Member Functions --------------------------
59  void setupEveBox( std::vector<TEveVector> &corners, float scale );
60  void buildTower( const std::vector<TEveVector> &corners, const FWViewContext *vc );
61  void buildLineSet( const std::vector<TEveVector> &corners, const FWViewContext *vc );
62 
63  // ----------------------- Data Members ----------------------------
65  TEveBox *m_tower;
66  TEveStraightLineSet *m_ls;
67  float m_energy;
68  float m_et;
70 };
71 #endif
72 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
float getEtEnergy(bool b) const
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
FWPFEcalRecHitLegoProxyBuilder * m_builder
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
FWPFLegoRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, FWPFEcalRecHitLegoProxyBuilder *pb, const FWViewContext *vc, float e, float et)
TEveBox * getTower()
void setSquareColor(Color_t c)
void updateScale(const FWViewContext *vc)
double b
Definition: hdecay.h:120
void setIsTallest(bool b)
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
const FWPFLegoRecHit & operator=(const FWPFLegoRecHit &)
TEveStraightLineSet * m_ls
virtual ~FWPFLegoRecHit()