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 private:
56  FWBoxRecHit(const FWBoxRecHit &) = delete; // Disable default
57  const FWBoxRecHit &operator=(const FWBoxRecHit &) = delete; // Disable default
58 
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 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
FWBoxRecHit::setLine
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWBoxRecHit.cc:137
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
FWBoxRecHit::m_energy
float m_energy
Definition: FWBoxRecHit.h:67
FWBoxRecHit::getEnergy
float getEnergy(bool b) const
Definition: FWBoxRecHit.h:51
FWBoxRecHit::buildTower
void buildTower(const std::vector< TEveVector > &corners)
Definition: FWBoxRecHit.cc:47
FWBoxRecHit::getTower
TEveBox * getTower()
Definition: FWBoxRecHit.h:47
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
FWBoxRecHit::buildLineSet
void buildLineSet(const std::vector< TEveVector > &corners)
Definition: FWBoxRecHit.cc:62
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
FWBoxRecHit::operator=
const FWBoxRecHit & operator=(const FWBoxRecHit &)=delete
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
FWViewContext.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
FWBoxRecHit::updateScale
void updateScale(float scale, float maxLogVal, bool plotEt)
Definition: FWBoxRecHit.cc:85
FWBoxRecHit::addLine
void addLine(float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWBoxRecHit.cc:155
FWBoxRecHit::m_ls
TEveStraightLineSet * m_ls
Definition: FWBoxRecHit.h:66
b
double b
Definition: hdecay.h:118
FWBoxRecHit::m_tower
TEveBox * m_tower
Definition: FWBoxRecHit.h:65
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
FWBoxRecHit::setIsTallest
void setIsTallest()
Definition: FWBoxRecHit.cc:152
FWBoxRecHit::m_et
float m_et
Definition: FWBoxRecHit.h:68
FWBoxRecHit::~FWBoxRecHit
virtual ~FWBoxRecHit()
Definition: FWBoxRecHit.h:38
FWBoxRecHit::m_isTallest
bool m_isTallest
Definition: FWBoxRecHit.h:69
FWBoxRecHit
Definition: FWBoxRecHit.h:34
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
FWBoxRecHit::FWBoxRecHit
FWBoxRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, float e, float et)
Definition: FWBoxRecHit.cc:9
FWProxyBuilderBase
Definition: FWProxyBuilderBase.h:46
FWViewEnergyScale.h
FWBoxRecHit::setupEveBox
void setupEveBox(std::vector< TEveVector > &corners, float scale)
Definition: FWBoxRecHit.cc:31
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
FWBoxRecHit::isTallest
bool isTallest() const
Definition: FWBoxRecHit.h:52
FWBoxRecHit::setSquareColor
void setSquareColor(Color_t c)
Definition: FWBoxRecHit.h:42
Context.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37