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 public:
36  // ---------------- Constructor(s)/Destructor ----------------------
37  FWPFLegoRecHit(const std::vector<TEveVector> &corners,
38  TEveElement *comp,
40  const FWViewContext *vc,
41  float e,
42  float et);
43  virtual ~FWPFLegoRecHit() {}
44 
45  // --------------------- Member Functions --------------------------
46  void updateScale(const FWViewContext *vc, float maxLogVal);
47  void setSquareColor(Color_t c) {
48  m_ls->SetMarkerColor(c);
49  m_ls->SetLineColor(kBlack);
50  }
51 
52  TEveBox *getTower() { return m_tower; }
53  void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2);
54  void addLine(float x1, float y1, float z1, float x2, float y2, float z2);
55  void addLine(const TEveVector &v1, const TEveVector &v2);
56  float getEtEnergy(bool b) const { return b ? m_et : m_energy; }
57  bool isTallest() const { return m_isTallest; }
58  void setIsTallest(bool b);
59 
60 private:
61  FWPFLegoRecHit(const FWPFLegoRecHit &) = delete; // Disable default
62  const FWPFLegoRecHit &operator=(const FWPFLegoRecHit &) = delete; // Disable default
63 
64  // --------------------- Member Functions --------------------------
65  void setupEveBox(std::vector<TEveVector> &corners, float scale);
66  void buildTower(const std::vector<TEveVector> &corners, const FWViewContext *vc);
67  void buildLineSet(const std::vector<TEveVector> &corners, const FWViewContext *vc);
68 
69  // ----------------------- Data Members ----------------------------
70  TEveBox *m_tower;
71  TEveStraightLineSet *m_ls;
72  float m_energy;
73  float m_et;
75 };
76 #endif
77 //=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_=_
FWPFLegoRecHit::getTower
TEveBox * getTower()
Definition: FWPFLegoRecHit.h:52
FWPFLegoRecHit::buildTower
void buildTower(const std::vector< TEveVector > &corners, const FWViewContext *vc)
Definition: FWPFLegoRecHit.cc:35
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
FWPFLegoRecHit::m_energy
float m_energy
Definition: FWPFLegoRecHit.h:72
FWPFLegoRecHit::m_et
float m_et
Definition: FWPFLegoRecHit.h:73
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
FWPFLegoRecHit::addLine
void addLine(float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWPFLegoRecHit.cc:141
FWPFLegoRecHit::setupEveBox
void setupEveBox(std::vector< TEveVector > &corners, float scale)
Definition: FWPFLegoRecHit.cc:20
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
FWPFLegoRecHit::m_isTallest
bool m_isTallest
Definition: FWPFLegoRecHit.h:74
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
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
FWPFLegoRecHit::updateScale
void updateScale(const FWViewContext *vc, float maxLogVal)
Definition: FWPFLegoRecHit.cc:67
FWPFLegoRecHit::isTallest
bool isTallest() const
Definition: FWPFLegoRecHit.h:57
FWPFLegoRecHit::setIsTallest
void setIsTallest(bool b)
Definition: FWPFLegoRecHit.cc:130
FWPFLegoRecHit::~FWPFLegoRecHit
virtual ~FWPFLegoRecHit()
Definition: FWPFLegoRecHit.h:43
b
double b
Definition: hdecay.h:118
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
FWPFLegoRecHit
Definition: FWPFLegoRecHit.h:34
FWPFLegoRecHit::operator=
const FWPFLegoRecHit & operator=(const FWPFLegoRecHit &)=delete
FWPFLegoRecHit::setSquareColor
void setSquareColor(Color_t c)
Definition: FWPFLegoRecHit.h:47
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FWViewContext
Definition: FWViewContext.h:32
FWPFLegoRecHit::buildLineSet
void buildLineSet(const std::vector< TEveVector > &corners, const FWViewContext *vc)
Definition: FWPFLegoRecHit.cc:49
FWPFLegoRecHit::setLine
void setLine(int idx, float x1, float y1, float z1, float x2, float y2, float z2)
Definition: FWPFLegoRecHit.cc:115
FWProxyBuilderBase
Definition: FWProxyBuilderBase.h:46
FWPFLegoRecHit::m_ls
TEveStraightLineSet * m_ls
Definition: FWPFLegoRecHit.h:71
FWViewEnergyScale.h
FWPFLegoRecHit::getEtEnergy
float getEtEnergy(bool b) const
Definition: FWPFLegoRecHit.h:56
Context.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
FWPFLegoRecHit::m_tower
TEveBox * m_tower
Definition: FWPFLegoRecHit.h:70
FWPFLegoRecHit::FWPFLegoRecHit
FWPFLegoRecHit(const std::vector< TEveVector > &corners, TEveElement *comp, FWProxyBuilderBase *pb, const FWViewContext *vc, float e, float et)
Definition: FWPFLegoRecHit.cc:5