CMS 3D CMS Logo

Context.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_Context_h
2 #define Fireworks_Core_Context_h
3 // -*- C++ -*-
4 //
5 // Package: Core
6 // Class : Context
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Tue Sep 30 14:21:45 EDT 2008
19 //
20 
21 // system include files
22 
23 // user include files
24 
25 // forward declarations
26 class TEveTrackPropagator;
27 class TEveCaloDataHist;
28 class TEveCaloDataVec;
29 
31 class FWSelectionManager;
33 class FWColorManager;
35 class FWMagField;
36 class FWGeometry;
37 class FWBeamSpot;
38 class CmsShowCommon;
39 
40 namespace fireworks {
41  class Context {
42  public:
44  FWSelectionManager* iSM,
46  FWColorManager* iColorM,
47  FWJobMetadataManager* iJMDM);
48  virtual ~Context();
49 
50  void setGeom(FWGeometry* x) { m_geom = x; }
51 
52  // ---------- const member functions ---------------------
55 
57 
59 
61 
62  TEveTrackPropagator* getTrackPropagator() const { return m_propagator; }
63  TEveTrackPropagator* getTrackerTrackPropagator() const { return m_trackerPropagator; }
64  TEveTrackPropagator* getMuonTrackPropagator() const { return m_muonPropagator; }
65 
66  FWMagField* getField() const { return m_magField; }
67  FWBeamSpot* getBeamSpot() const { return m_beamSpot; }
68 
69  TEveCaloDataHist* getCaloData() const { return m_caloData; }
70  TEveCaloDataVec* getCaloDataHF() const { return m_caloDataHF; }
71 
72  FWGeometry* getGeom() const { return m_geom; }
73 
74  CmsShowCommon* commonPrefs() const;
75 
76  float getMaxEnergyInEvent(bool isEt) const;
77  void voteMaxEtAndEnergy(float Et, float energy) const;
78  void resetMaxEtAndEnergy() const;
79 
80  bool getHidePFBuilders() const { return m_hidePFBuilders; }
81  void setHidePFBuilders(bool x) { m_hidePFBuilders = x; }
82 
83  // ---------- member functions ---------------------------
84 
85  void initEveElements();
86  void deleteEveElements();
87 
88  // ---------- static member ---------------------------
89 
90  static Context* getInstance();
91 
92  static float caloR1(bool offset = true);
93  static float caloR2(bool offset = true);
94  static float caloZ1(bool offset = true);
95  static float caloZ2(bool offset = true);
96 
97  static float caloTransEta();
98  static float caloTransAngle();
99  static double caloMaxEta();
100 
101  private:
102  Context(const Context&) = delete; // stop default
103  const Context& operator=(const Context&) = delete; // stop default
104 
105  // ---------- member data --------------------------------
111 
113 
114  TEveTrackPropagator* m_propagator;
115  TEveTrackPropagator* m_trackerPropagator;
116  TEveTrackPropagator* m_muonPropagator;
117 
120 
122 
123  mutable float m_maxEt;
124  mutable float m_maxEnergy;
125 
126  mutable bool m_hidePFBuilders;
127 
128  TEveCaloDataHist* m_caloData;
129  TEveCaloDataVec* m_caloDataHF;
130 
132 
133  // calo data
134  static const float s_caloTransEta;
135  static const float s_caloTransAngle;
136  // simplified
137  static const float s_caloR;
138  static const float s_caloZ;
139 
140  // proxy-builder offsets
141  static const float s_caloOffR;
142  static const float s_caloOffZ;
143  };
144 } // namespace fireworks
145 
146 #endif
fireworks::Context::m_eventItemsManager
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:108
fireworks::Context
Definition: Context.h:41
FWGeometry
Definition: FWGeometry.h:27
fireworks::Context::s_caloTransAngle
static const float s_caloTransAngle
Definition: Context.h:135
fireworks::Context::resetMaxEtAndEnergy
void resetMaxEtAndEnergy() const
Definition: Context.cc:167
fireworks::Context::getMuonTrackPropagator
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:64
fireworks::Context::modelChangeManager
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:53
fireworks::Context::colorManager
FWColorManager * colorManager() const
Definition: Context.h:58
fireworks::Context::m_propagator
TEveTrackPropagator * m_propagator
Definition: Context.h:114
fireworks::Context::m_selectionManager
FWSelectionManager * m_selectionManager
Definition: Context.h:107
FWEventItemsManager
Definition: FWEventItemsManager.h:44
fireworks::Context::setHidePFBuilders
void setHidePFBuilders(bool x)
Definition: Context.h:81
fireworks::Context::s_caloOffZ
static const float s_caloOffZ
Definition: Context.h:142
fireworks::Context::m_trackerPropagator
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:115
fireworks::Context::setGeom
void setGeom(FWGeometry *x)
Definition: Context.h:50
fireworks::Context::getBeamSpot
FWBeamSpot * getBeamSpot() const
Definition: Context.h:67
FWModelChangeManager
Definition: FWModelChangeManager.h:33
fireworks::Context::m_metadataManager
FWJobMetadataManager * m_metadataManager
Definition: Context.h:110
fireworks::Context::metadataManager
FWJobMetadataManager * metadataManager() const
Definition: Context.h:60
fireworks::Context::getCaloDataHF
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:70
fireworks::Context::s_caloTransEta
static const float s_caloTransEta
Definition: Context.h:134
fireworks::Context::Context
Context(FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM)
Definition: Context.cc:56
fireworks::Context::~Context
virtual ~Context()
Definition: Context.cc:84
fireworks::Context::caloZ2
static float caloZ2(bool offset=true)
Definition: Context.cc:185
fireworks::Context::eventItemsManager
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
FWJobMetadataManager
Definition: FWJobMetadataManager.h:18
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWMagField
Definition: FWMagField.h:14
fireworks::Context::caloTransEta
static float caloTransEta()
Definition: Context.cc:187
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
fireworks::Context::caloMaxEta
static double caloMaxEta()
Definition: Context.cc:191
fireworks::Context::m_geom
FWGeometry * m_geom
Definition: Context.h:112
fireworks::Context::m_beamSpot
FWBeamSpot * m_beamSpot
Definition: Context.h:119
fireworks::Context::commonPrefs
CmsShowCommon * commonPrefs() const
Definition: Context.cc:160
FWBeamSpot
Definition: FWBeamSpot.h:11
fireworks::Context::operator=
const Context & operator=(const Context &)=delete
fireworks::Context::caloR2
static float caloR2(bool offset=true)
Definition: Context.cc:182
fireworks::Context::m_colorManager
FWColorManager * m_colorManager
Definition: Context.h:109
fireworks::Context::m_changeManager
FWModelChangeManager * m_changeManager
Definition: Context.h:106
FWSelectionManager
Definition: FWSelectionManager.h:34
fireworks::Context::getGeom
FWGeometry * getGeom() const
Definition: Context.h:72
fireworks::Context::m_commonPrefs
CmsShowCommon * m_commonPrefs
Definition: Context.h:121
fireworks::Context::m_caloData
TEveCaloDataHist * m_caloData
Definition: Context.h:128
fireworks::Context::getHidePFBuilders
bool getHidePFBuilders() const
Definition: Context.h:80
fireworks::Context::s_caloZ
static const float s_caloZ
Definition: Context.h:138
fireworks::Context::m_caloDataHF
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:129
fireworks::Context::getMaxEnergyInEvent
float getMaxEnergyInEvent(bool isEt) const
Definition: Context.cc:174
FWColorManager
Definition: FWColorManager.h:45
fireworks::Context::caloTransAngle
static float caloTransAngle()
Definition: Context.cc:189
fireworks::Context::initEveElements
void initEveElements()
Definition: Context.cc:86
fireworks::Context::getField
FWMagField * getField() const
Definition: Context.h:66
fireworks::Context::deleteEveElements
void deleteEveElements()
Definition: Context.cc:153
fireworks::Context::m_muonPropagator
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:116
fireworks::Context::caloZ1
static float caloZ1(bool offset=true)
Definition: Context.cc:183
fireworks::Context::m_magField
FWMagField * m_magField
Definition: Context.h:118
fireworks::Context::getTrackPropagator
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:62
fireworks::Context::getCaloData
TEveCaloDataHist * getCaloData() const
Definition: Context.h:69
fireworks::Context::s_caloR
static const float s_caloR
Definition: Context.h:137
fireworks::Context::s_fwContext
static Context * s_fwContext
Definition: Context.h:131
fireworks::Context::getInstance
static Context * getInstance()
Definition: Context.cc:193
fireworks::Context::s_caloOffR
static const float s_caloOffR
Definition: Context.h:141
fireworks::Context::m_maxEt
float m_maxEt
Definition: Context.h:123
fireworks
Definition: FWTauProxyBuilderBase.h:35
fireworks::Context::getTrackerTrackPropagator
TEveTrackPropagator * getTrackerTrackPropagator() const
Definition: Context.h:63
CmsShowCommon
Definition: CmsShowCommon.h:43
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
fireworks::Context::m_hidePFBuilders
bool m_hidePFBuilders
Definition: Context.h:126
fireworks::Context::m_maxEnergy
float m_maxEnergy
Definition: Context.h:124
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
fireworks::Context::selectionManager
FWSelectionManager * selectionManager() const
Definition: Context.h:54