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 
43 public:
45  FWSelectionManager* iSM,
47  FWColorManager* iColorM,
48  FWJobMetadataManager* iJMDM);
49  virtual ~Context();
50 
51  void setGeom(const FWGeometry* x) { m_geom = x; }
52 
53  // ---------- const member functions ---------------------
55  return m_changeManager;
56  }
58  return m_selectionManager;
59  }
60 
62  return m_eventItemsManager;
63  }
64 
66  return m_colorManager;
67  }
68 
70  return m_metadataManager;
71  }
72 
73  TEveTrackPropagator* getTrackPropagator() const { return m_propagator; }
74  TEveTrackPropagator* getTrackerTrackPropagator() const { return m_trackerPropagator; }
75  TEveTrackPropagator* getMuonTrackPropagator() const { return m_muonPropagator; }
76 
77  FWMagField* getField() const { return m_magField; }
78  FWBeamSpot* getBeamSpot() const { return m_beamSpot; }
79 
80  TEveCaloDataHist* getCaloData() const { return m_caloData; }
81  TEveCaloDataVec* getCaloDataHF() const { return m_caloDataHF; }
82 
83  const FWGeometry* getGeom() const { return m_geom; }
84 
85  CmsShowCommon* commonPrefs() const;
86 
87  float getMaxEnergyInEvent(bool isEt) const;
88  void voteMaxEtAndEnergy(float Et, float energy) const;
89  void resetMaxEtAndEnergy() const;
90 
91  bool getHidePFBuilders() const { return m_hidePFBuilders; }
92  void setHidePFBuilders( bool x ) { m_hidePFBuilders = x; }
93 
94  // ---------- member functions ---------------------------
95 
96  void initEveElements();
97  void deleteEveElements();
98 
99  // ---------- static member ---------------------------
100 
101  static Context* getInstance();
102 
103  static float caloR1(bool offset = true);
104  static float caloR2(bool offset = true);
105  static float caloZ1(bool offset = true);
106  static float caloZ2(bool offset = true);
107 
108  static float caloTransEta();
109  static float caloTransAngle();
110  static double caloMaxEta();
111 
112 private:
113  Context(const Context&) = delete; // stop default
114  const Context& operator=(const Context&) = delete; // stop default
115 
116  // ---------- member data --------------------------------
122 
124 
125  TEveTrackPropagator *m_propagator;
126  TEveTrackPropagator *m_trackerPropagator;
127  TEveTrackPropagator *m_muonPropagator;
128 
131 
133 
134  mutable float m_maxEt;
135  mutable float m_maxEnergy;
136 
137  mutable bool m_hidePFBuilders;
138 
139  TEveCaloDataHist *m_caloData;
140  TEveCaloDataVec *m_caloDataHF;
141 
143 
144  // calo data
145  static const float s_caloTransEta;
146  static const float s_caloTransAngle;
147  // simplified
148  static const float s_caloR;
149  static const float s_caloZ;
150 
151  // proxy-builder offsets
152  static const float s_caloOffR;
153  static const float s_caloOffZ;
154 };
155 }
156 
157 #endif
static float caloTransEta()
Definition: Context.cc:228
FWBeamSpot * m_beamSpot
Definition: Context.h:130
TEveTrackPropagator * m_propagator
Definition: Context.h:125
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:81
TEveCaloDataHist * m_caloData
Definition: Context.h:139
void setGeom(const FWGeometry *x)
Definition: Context.h:51
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
static float caloTransAngle()
Definition: Context.cc:233
TEveTrackPropagator * getTrackerTrackPropagator() const
Definition: Context.h:74
const FWGeometry * getGeom() const
Definition: Context.h:83
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:183
FWSelectionManager * m_selectionManager
Definition: Context.h:118
FWColorManager * colorManager() const
Definition: Context.h:65
static const float s_caloOffR
Definition: Context.h:152
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:127
static float caloZ2(bool offset=true)
Definition: Context.cc:223
const FWGeometry * m_geom
Definition: Context.h:123
const Context & operator=(const Context &)=delete
CmsShowCommon * m_commonPrefs
Definition: Context.h:132
void initEveElements()
Definition: Context.cc:94
virtual ~Context()
Definition: Context.cc:88
void deleteEveElements()
Definition: Context.cc:166
static const float s_caloZ
Definition: Context.h:149
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:73
static Context * s_fwContext
Definition: Context.h:142
FWBeamSpot * getBeamSpot() const
Definition: Context.h:78
static float caloR2(bool offset=true)
Definition: Context.cc:213
FWMagField * getField() const
Definition: Context.h:77
FWMagField * m_magField
Definition: Context.h:129
void resetMaxEtAndEnergy() const
Definition: Context.cc:190
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:140
static float caloR1(bool offset=true)
Definition: Context.cc:208
bool getHidePFBuilders() const
Definition: Context.h:91
Context(FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM)
Definition: Context.cc:57
TEveCaloDataHist * getCaloData() const
Definition: Context.h:80
float getMaxEnergyInEvent(bool isEt) const
Definition: Context.cc:199
FWSelectionManager * selectionManager() const
Definition: Context.h:57
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:54
static Context * getInstance()
Definition: Context.cc:243
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:75
static const float s_caloR
Definition: Context.h:148
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:119
FWJobMetadataManager * metadataManager() const
Definition: Context.h:69
static const float s_caloOffZ
Definition: Context.h:153
static const float s_caloTransEta
Definition: Context.h:145
void setHidePFBuilders(bool x)
Definition: Context.h:92
CmsShowCommon * commonPrefs() const
Definition: Context.cc:177
FWModelChangeManager * m_changeManager
Definition: Context.h:117
FWColorManager * m_colorManager
Definition: Context.h:120
static double caloMaxEta()
Definition: Context.cc:238
static float caloZ1(bool offset=true)
Definition: Context.cc:218
bool m_hidePFBuilders
Definition: Context.h:137
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:126
FWJobMetadataManager * m_metadataManager
Definition: Context.h:121
static const float s_caloTransAngle
Definition: Context.h:146