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 {
36  public:
37  // ---------------- Constructor(s)/Destructor ----------------------
38  FWPFLegoRecHit( const std::vector<TEveVector> &corners, TEveElement *comp, FWProxyBuilderBase*pb,
39  const FWViewContext *vc, float e, float et );
40  virtual ~FWPFLegoRecHit(){}
41 
42  // --------------------- Member Functions --------------------------
43  void updateScale( const FWViewContext *vc, float maxLogVal);
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 ----------------------------
64  TEveBox *m_tower;
65  TEveStraightLineSet *m_ls;
66  float m_energy;
67  float m_et;
69 };
70 #endif
71 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
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:120
et
define resolution functions of each parameter
void setIsTallest(bool b)
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
void updateScale(const FWViewContext *vc, float maxLogVal)
const FWPFLegoRecHit & operator=(const FWPFLegoRecHit &)
TEveStraightLineSet * m_ls
virtual ~FWPFLegoRecHit()