CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Fireworks/ParticleFlow/interface/FWPFLegoRecHit.h

Go to the documentation of this file.
00001 #ifndef _FWPFLEGORECHIT_H_
00002 #define _FWPFLEGORECHIT_H_
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:     ParticleFlow
00007 // Class  :     FWPFLegoRecHit
00008 // 
00009 // Implementation:
00010 //     <Notes on implementation>
00011 //
00012 // Original Author:  Simon Harris
00013 //
00014 
00015 // System include files
00016 #include "TEveBox.h"
00017 #include "TEveCompound.h"
00018 #include "TEveStraightLineSet.h"
00019 
00020 #include "TEveCaloData.h"
00021 #include "TEveChunkManager.h"
00022 
00023 // User include files
00024 #include "Fireworks/Core/interface/FWViewContext.h"
00025 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
00026 #include "Fireworks/Core/interface/Context.h"
00027 
00028 // Forward declarations
00029 class FWProxyBuilderBase;
00030 
00031 //-----------------------------------------------------------------------------
00032 // FWPFLegoRechHit
00033 //-----------------------------------------------------------------------------
00034 class FWPFLegoRecHit
00035 {
00036    public:
00037    // ---------------- Constructor(s)/Destructor ----------------------
00038       FWPFLegoRecHit( const std::vector<TEveVector> &corners, TEveElement *comp, FWProxyBuilderBase*pb,
00039                       const FWViewContext *vc, float e, float et );
00040       virtual ~FWPFLegoRecHit(){}
00041 
00042    // --------------------- Member Functions --------------------------
00043       void updateScale( const FWViewContext *vc, float maxLogVal);
00044       void setSquareColor( Color_t c ) { m_ls->SetMarkerColor(c); m_ls->SetLineColor(kBlack); }
00045 
00046       TEveBox *getTower() { return m_tower; }
00047       void  setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
00048       void  addLine( float x1, float y1, float z1, float x2, float y2, float z2 );
00049       void  addLine( const TEveVector &v1, const TEveVector &v2 );
00050       float getEtEnergy( bool b ) const { return b ? m_et : m_energy; }
00051       bool  isTallest() const { return m_isTallest; }
00052       void  setIsTallest( bool b );
00053 
00054    private:
00055       FWPFLegoRecHit( const FWPFLegoRecHit& );                    // Disable default
00056       const FWPFLegoRecHit& operator=( const FWPFLegoRecHit& );   // Disable default
00057 
00058    // --------------------- Member Functions --------------------------
00059       void setupEveBox( std::vector<TEveVector> &corners, float scale );
00060       void buildTower( const std::vector<TEveVector> &corners, const FWViewContext *vc );
00061       void buildLineSet( const std::vector<TEveVector> &corners, const FWViewContext *vc );
00062 
00063    // ----------------------- Data Members ----------------------------
00064       TEveBox                          *m_tower;
00065       TEveStraightLineSet              *m_ls;
00066       float                            m_energy;
00067       float                            m_et;
00068       bool                             m_isTallest;
00069 };
00070 #endif
00071 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_