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  // ---------- member functions ---------------------------
92 
93  void initEveElements();
94  void deleteEveElements();
95 
96  // ---------- static member ---------------------------
97 
98  static float caloR1(bool offset = true);
99  static float caloR2(bool offset = true);
100  static float caloZ1(bool offset = true);
101  static float caloZ2(bool offset = true);
102 
103  static float caloTransEta();
104  static float caloTransAngle();
105  static double caloMaxEta();
106 
107 private:
108  Context(const Context&); // stop default
109  const Context& operator=(const Context&); // stop default
110 
111  // ---------- member data --------------------------------
117 
119 
120  TEveTrackPropagator *m_propagator;
121  TEveTrackPropagator *m_trackerPropagator;
122  TEveTrackPropagator *m_muonPropagator;
123 
126 
128 
129  mutable float m_maxEt;
130  mutable float m_maxEnergy;
131 
132  TEveCaloDataHist *m_caloData;
133  TEveCaloDataVec *m_caloDataHF;
134 
135  // calo data
136  static const float s_caloTransEta;
137  static const float s_caloTransAngle;
138  // simplified
139  static const float s_caloR;
140  static const float s_caloZ;
141 
142  // proxy-builder offsets
143  static const float s_caloOffR;
144  static const float s_caloOffZ;
145 };
146 }
147 
148 #endif
static float caloTransEta()
Definition: Context.cc:229
FWBeamSpot * m_beamSpot
Definition: Context.h:125
TEveTrackPropagator * m_propagator
Definition: Context.h:120
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:81
TEveCaloDataHist * m_caloData
Definition: Context.h:132
void setGeom(const FWGeometry *x)
Definition: Context.h:51
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
static float caloTransAngle()
Definition: Context.cc:234
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:184
FWSelectionManager * m_selectionManager
Definition: Context.h:113
FWColorManager * colorManager() const
Definition: Context.h:65
static const float s_caloOffR
Definition: Context.h:143
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:122
static float caloZ2(bool offset=true)
Definition: Context.cc:224
const FWGeometry * m_geom
Definition: Context.h:118
CmsShowCommon * m_commonPrefs
Definition: Context.h:127
void initEveElements()
Definition: Context.cc:95
virtual ~Context()
Definition: Context.cc:89
void deleteEveElements()
Definition: Context.cc:167
static const float s_caloZ
Definition: Context.h:140
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:214
FWMagField * getField() const
Definition: Context.h:77
FWMagField * m_magField
Definition: Context.h:124
void resetMaxEtAndEnergy() const
Definition: Context.cc:191
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:133
static float caloR1(bool offset=true)
Definition: Context.cc:209
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:200
FWSelectionManager * selectionManager() const
Definition: Context.h:57
unsigned int offset(bool)
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:54
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:75
static const float s_caloR
Definition: Context.h:139
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:114
FWJobMetadataManager * metadataManager() const
Definition: Context.h:69
static const float s_caloOffZ
Definition: Context.h:144
static const float s_caloTransEta
Definition: Context.h:136
CmsShowCommon * commonPrefs() const
Definition: Context.cc:178
FWModelChangeManager * m_changeManager
Definition: Context.h:112
FWColorManager * m_colorManager
Definition: Context.h:115
static double caloMaxEta()
Definition: Context.cc:239
static float caloZ1(bool offset=true)
Definition: Context.cc:219
Definition: DDAxes.h:10
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:121
FWJobMetadataManager * m_metadataManager
Definition: Context.h:116
static const float s_caloTransAngle
Definition: Context.h:137