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  static float mtdEtlR1();
102  static float mtdEtlR2();
103  static float mtdEtlZ1(const unsigned int& disk_number = 1);
104  static float mtdEtlZ2(const unsigned int& disk_number = 1);
105 
106  Context(const Context&) = delete; // stop default
107  const Context& operator=(const Context&) = delete; // stop default
108  private:
109  // ---------- member data --------------------------------
115 
117 
118  TEveTrackPropagator* m_propagator;
119  TEveTrackPropagator* m_trackerPropagator;
120  TEveTrackPropagator* m_muonPropagator;
121 
124 
126 
127  mutable float m_maxEt;
128  mutable float m_maxEnergy;
129 
130  mutable bool m_hidePFBuilders;
131 
132  TEveCaloDataHist* m_caloData;
133  TEveCaloDataVec* m_caloDataHF;
134 
136 
137  // calo data
138  static const float s_caloTransEta;
139  static const float s_caloTransAngle;
140  // simplified
141  static const float s_caloR;
142  static const float s_caloZ;
143 
144  // proxy-builder offsets
145  static const float s_caloOffR;
146  static const float s_caloOffZ;
147 
148  // mtd data
149  static const float s_mtdEtlR1;
150  static const float s_mtdEtlR2;
151  static const float s_mtdEtlZ1;
152  static const float s_mtdEtlZ2;
153  static const float s_mtdEtlOffZ;
154  };
155 } // namespace fireworks
156 
157 #endif
static float caloTransEta()
Definition: Context.cc:194
FWSelectionManager * selectionManager() const
Definition: Context.h:54
FWBeamSpot * m_beamSpot
Definition: Context.h:123
TEveTrackPropagator * m_propagator
Definition: Context.h:118
void resetMaxEtAndEnergy() const
Definition: Context.cc:174
static float mtdEtlZ1(const unsigned int &disk_number=1)
Definition: Context.cc:202
TEveCaloDataVec * getCaloDataHF() const
Definition: Context.h:70
TEveCaloDataHist * m_caloData
Definition: Context.h:132
CmsShowCommon * commonPrefs() const
Definition: Context.cc:167
static float caloTransAngle()
Definition: Context.cc:196
TEveTrackPropagator * getTrackPropagator() const
Definition: Context.h:62
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:56
static float mtdEtlZ2(const unsigned int &disk_number=1)
Definition: Context.cc:205
FWBeamSpot * getBeamSpot() const
Definition: Context.h:67
FWSelectionManager * m_selectionManager
Definition: Context.h:111
FWGeometry * m_geom
Definition: Context.h:116
float getMaxEnergyInEvent(bool isEt) const
Definition: Context.cc:181
static const float s_caloOffR
Definition: Context.h:145
TEveTrackPropagator * m_muonPropagator
Definition: Context.h:120
static float caloZ2(bool offset=true)
Definition: Context.cc:192
const Context & operator=(const Context &)=delete
CmsShowCommon * m_commonPrefs
Definition: Context.h:125
void initEveElements()
Definition: Context.cc:93
TEveCaloDataHist * getCaloData() const
Definition: Context.h:69
virtual ~Context()
Definition: Context.cc:91
TEveTrackPropagator * getMuonTrackPropagator() const
Definition: Context.h:64
void deleteEveElements()
Definition: Context.cc:160
static const float s_caloZ
Definition: Context.h:142
FWJobMetadataManager * metadataManager() const
Definition: Context.h:60
static Context * s_fwContext
Definition: Context.h:135
static const float s_mtdEtlZ2
Definition: Context.h:152
static const float s_mtdEtlR2
Definition: Context.h:150
static const float s_mtdEtlZ1
Definition: Context.h:151
bool getHidePFBuilders() const
Definition: Context.h:80
static float caloR2(bool offset=true)
Definition: Context.cc:189
FWGeometry * getGeom() const
Definition: Context.h:72
FWMagField * m_magField
Definition: Context.h:122
TEveTrackPropagator * getTrackerTrackPropagator() const
Definition: Context.h:63
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:169
TEveCaloDataVec * m_caloDataHF
Definition: Context.h:133
static float caloR1(bool offset=true)
Definition: Context.cc:187
Context(FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM)
Definition: Context.cc:63
void setGeom(FWGeometry *x)
Definition: Context.h:50
static const float s_mtdEtlOffZ
Definition: Context.h:153
static Context * getInstance()
Definition: Context.cc:209
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:53
static const float s_caloR
Definition: Context.h:141
static const float s_mtdEtlR1
Definition: Context.h:149
static float mtdEtlR2()
Definition: Context.cc:201
FWEventItemsManager * m_eventItemsManager
Definition: Context.h:112
static const float s_caloOffZ
Definition: Context.h:146
static const float s_caloTransEta
Definition: Context.h:138
void setHidePFBuilders(bool x)
Definition: Context.h:81
FWModelChangeManager * m_changeManager
Definition: Context.h:110
FWColorManager * m_colorManager
Definition: Context.h:113
static double caloMaxEta()
Definition: Context.cc:198
static float caloZ1(bool offset=true)
Definition: Context.cc:190
float x
bool m_hidePFBuilders
Definition: Context.h:130
static float mtdEtlR1()
Definition: Context.cc:200
TEveTrackPropagator * m_trackerPropagator
Definition: Context.h:119
FWJobMetadataManager * m_metadataManager
Definition: Context.h:114
static const float s_caloTransAngle
Definition: Context.h:139
FWMagField * getField() const
Definition: Context.h:66
FWColorManager * colorManager() const
Definition: Context.h:58