CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  Context(const Context&) = delete; // stop default
102  const Context& operator=(const Context&) = delete; // stop default
103  private:
104  // ---------- member data --------------------------------
110 
112 
113  TEveTrackPropagator* m_propagator;
114  TEveTrackPropagator* m_trackerPropagator;
115  TEveTrackPropagator* m_muonPropagator;
116 
119 
121 
122  mutable float m_maxEt;
123  mutable float m_maxEnergy;
124 
125  mutable bool m_hidePFBuilders;
126 
127  TEveCaloDataHist* m_caloData;
128  TEveCaloDataVec* m_caloDataHF;
129 
131 
132  // calo data
133  static const float s_caloTransEta;
134  static const float s_caloTransAngle;
135  // simplified
136  static const float s_caloR;
137  static const float s_caloZ;
138 
139  // proxy-builder offsets
140  static const float s_caloOffR;
141  static const float s_caloOffZ;
142  };
143 } // namespace fireworks
144 
145 #endif
static float caloTransEta()
Definition: Context.cc:187
FWBeamSpot * m_beamSpot
Definition: Context.h:118
TEveTrackPropagator * m_propagator
Definition: Context.h:113
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:70
TEveCaloDataHist * m_caloData
Definition: Context.h:127
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
static float caloTransAngle()
Definition: Context.cc:189
TEveTrackPropagator * getTrackerTrackPropagator() const
Definition: Context.h:63
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWSelectionManager * m_selectionManager
Definition: Context.h:106
FWGeometry * m_geom
Definition: Context.h:111
FWColorManager * colorManager() const
Definition: Context.h:58
static const float s_caloOffR
Definition: Context.h:140
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:115
static float caloZ2(bool offset=true)
Definition: Context.cc:185
const Context & operator=(const Context &)=delete
CmsShowCommon * m_commonPrefs
Definition: Context.h:120
void initEveElements()
Definition: Context.cc:86
virtual ~Context()
Definition: Context.cc:84
void deleteEveElements()
Definition: Context.cc:153
static const float s_caloZ
Definition: Context.h:137
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:62
static Context * s_fwContext
Definition: Context.h:130
FWBeamSpot * getBeamSpot() const
Definition: Context.h:67
static float caloR2(bool offset=true)
Definition: Context.cc:182
FWMagField * getField() const
Definition: Context.h:66
FWMagField * m_magField
Definition: Context.h:117
void resetMaxEtAndEnergy() const
Definition: Context.cc:167
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:128
static float caloR1(bool offset=true)
Definition: Context.cc:180
bool getHidePFBuilders() const
Definition: Context.h:80
Context(FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM)
Definition: Context.cc:56
TEveCaloDataHist * getCaloData() const
Definition: Context.h:69
float getMaxEnergyInEvent(bool isEt) const
Definition: Context.cc:174
void setGeom(FWGeometry *x)
Definition: Context.h:50
FWSelectionManager * selectionManager() const
Definition: Context.h:54
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:53
static Context * getInstance()
Definition: Context.cc:193
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:64
static const float s_caloR
Definition: Context.h:136
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:107
FWJobMetadataManager * metadataManager() const
Definition: Context.h:60
static const float s_caloOffZ
Definition: Context.h:141
static const float s_caloTransEta
Definition: Context.h:133
void setHidePFBuilders(bool x)
Definition: Context.h:81
CmsShowCommon * commonPrefs() const
Definition: Context.cc:160
FWModelChangeManager * m_changeManager
Definition: Context.h:105
FWColorManager * m_colorManager
Definition: Context.h:108
static double caloMaxEta()
Definition: Context.cc:191
static float caloZ1(bool offset=true)
Definition: Context.cc:183
bool m_hidePFBuilders
Definition: Context.h:125
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:114
FWJobMetadataManager * m_metadataManager
Definition: Context.h:109
FWGeometry * getGeom() const
Definition: Context.h:72
static const float s_caloTransAngle
Definition: Context.h:134