CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
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 float caloR1(bool offset = true);
102  static float caloR2(bool offset = true);
103  static float caloZ1(bool offset = true);
104  static float caloZ2(bool offset = true);
105 
106  static float caloTransEta();
107  static float caloTransAngle();
108  static double caloMaxEta();
109 
110 private:
111  Context(const Context&); // stop default
112  const Context& operator=(const Context&); // stop default
113 
114  // ---------- member data --------------------------------
120 
122 
123  TEveTrackPropagator *m_propagator;
124  TEveTrackPropagator *m_trackerPropagator;
125  TEveTrackPropagator *m_muonPropagator;
126 
129 
131 
132  mutable float m_maxEt;
133  mutable float m_maxEnergy;
134 
135  mutable bool m_hidePFBuilders;
136 
137  TEveCaloDataHist *m_caloData;
138  TEveCaloDataVec *m_caloDataHF;
139 
140  // calo data
141  static const float s_caloTransEta;
142  static const float s_caloTransAngle;
143  // simplified
144  static const float s_caloR;
145  static const float s_caloZ;
146 
147  // proxy-builder offsets
148  static const float s_caloOffR;
149  static const float s_caloOffZ;
150 };
151 }
152 
153 #endif
static float caloTransEta()
Definition: Context.cc:230
FWBeamSpot * m_beamSpot
Definition: Context.h:128
TEveTrackPropagator * m_propagator
Definition: Context.h:123
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:81
TEveCaloDataHist * m_caloData
Definition: Context.h:137
void setGeom(const FWGeometry *x)
Definition: Context.h:51
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
static float caloTransAngle()
Definition: Context.cc:235
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:185
FWSelectionManager * m_selectionManager
Definition: Context.h:116
FWColorManager * colorManager() const
Definition: Context.h:65
static const float s_caloOffR
Definition: Context.h:148
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:125
static float caloZ2(bool offset=true)
Definition: Context.cc:225
const FWGeometry * m_geom
Definition: Context.h:121
CmsShowCommon * m_commonPrefs
Definition: Context.h:130
void initEveElements()
Definition: Context.cc:96
virtual ~Context()
Definition: Context.cc:90
void deleteEveElements()
Definition: Context.cc:168
static const float s_caloZ
Definition: Context.h:145
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:73
const Context & operator=(const Context &)
FWBeamSpot * getBeamSpot() const
Definition: Context.h:78
static float caloR2(bool offset=true)
Definition: Context.cc:215
FWMagField * getField() const
Definition: Context.h:77
FWMagField * m_magField
Definition: Context.h:127
void resetMaxEtAndEnergy() const
Definition: Context.cc:192
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:138
static float caloR1(bool offset=true)
Definition: Context.cc:210
bool getHidePFBuilders() const
Definition: Context.h:91
Context(FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM)
Definition: Context.cc:61
TEveCaloDataHist * getCaloData() const
Definition: Context.h:80
float getMaxEnergyInEvent(bool isEt) const
Definition: Context.cc:201
FWSelectionManager * selectionManager() const
Definition: Context.h:57
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:54
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:75
static const float s_caloR
Definition: Context.h:144
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:117
FWJobMetadataManager * metadataManager() const
Definition: Context.h:69
static const float s_caloOffZ
Definition: Context.h:149
static const float s_caloTransEta
Definition: Context.h:141
void setHidePFBuilders(bool x)
Definition: Context.h:92
CmsShowCommon * commonPrefs() const
Definition: Context.cc:179
FWModelChangeManager * m_changeManager
Definition: Context.h:115
FWColorManager * m_colorManager
Definition: Context.h:118
static double caloMaxEta()
Definition: Context.cc:240
static float caloZ1(bool offset=true)
Definition: Context.cc:220
bool m_hidePFBuilders
Definition: Context.h:135
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:124
FWJobMetadataManager * m_metadataManager
Definition: Context.h:119
static const float s_caloTransAngle
Definition: Context.h:142