File indexing completed on 2024-04-06 12:11:26
0001 #ifndef _FWBOXRECHIT_H_
0002 #define _FWBOXRECHIT_H_
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "TEveBox.h"
0017 #include "TEveCompound.h"
0018 #include "TEveStraightLineSet.h"
0019
0020 #include "TEveCaloData.h"
0021 #include "TEveChunkManager.h"
0022
0023
0024 #include "Fireworks/Core/interface/FWViewContext.h"
0025 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
0026 #include "Fireworks/Core/interface/Context.h"
0027
0028
0029 class FWProxyBuilderBase;
0030
0031
0032
0033
0034 class FWBoxRecHit {
0035 public:
0036
0037 FWBoxRecHit(const std::vector<TEveVector> &corners, TEveElement *comp, float e, float et);
0038 virtual ~FWBoxRecHit() {}
0039
0040
0041 void updateScale(float scale, float maxLogVal, bool plotEt);
0042 void setSquareColor(Color_t c) {
0043 m_ls->SetMarkerColor(c);
0044 m_ls->SetLineColor(kBlack);
0045 }
0046
0047 TEveBox *getTower() { return m_tower; }
0048 void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
0049 void addLine(float x1, float y1, float z1, float x2, float y2, float z2);
0050 void addLine(const TEveVector &v1, const TEveVector &v2);
0051 float getEnergy(bool b) const { return b ? m_et : m_energy; }
0052 bool isTallest() const { return m_isTallest; }
0053 void setIsTallest();
0054
0055 FWBoxRecHit(const FWBoxRecHit &) = delete;
0056 const FWBoxRecHit &operator=(const FWBoxRecHit &) = delete;
0057
0058 private:
0059
0060 void setupEveBox(std::vector<TEveVector> &corners, float scale);
0061 void buildTower(const std::vector<TEveVector> &corners);
0062 void buildLineSet(const std::vector<TEveVector> &corners);
0063
0064
0065 TEveBox *m_tower;
0066 TEveStraightLineSet *m_ls;
0067 float m_energy;
0068 float m_et;
0069 bool m_isTallest;
0070 };
0071 #endif
0072