CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
FWRPZView Class Reference

#include <Fireworks/Core/interface/FWRPZView.h>

Inheritance diagram for FWRPZView:
FWEveView FWViewBase FWConfigurableParameterizable FWParameterizable FWConfigurable

Public Member Functions

void addTo (FWConfiguration &) const override
 
void eventBegin () override
 
void eventEnd () override
 
 FWRPZView (TEveWindowSlot *iParent, FWViewType::EType)
 
TEveCaloViz * getEveCalo () const override
 
void importElements (TEveElement *iProjectableChild, float layer, TEveElement *iProjectedParent=nullptr)
 
void populateController (ViewerParameterGUI &) const override
 
void resetOrigin ()
 
void setContext (const fireworks::Context &) override
 
void setFrom (const FWConfiguration &) override
 
void setupEventCenter () override
 
void shiftOrigin (TEveVector &center)
 
void voteCaloMaxVal () override
 
 ~FWRPZView () override
 
- Public Member Functions inherited from FWEveView
const fireworks::Contextcontext ()
 
FWViewContextMenuHandlerBasecontextMenuHandler () const override
 
TEveScene * eventScene ()
 
 FWEveView (TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
 
FWTEveViewerfwViewer ()
 
FWTGLViewerfwViewerGL () const
 
TEveScene * geoScene ()
 
virtual bool isEnergyScaleGlobal () const
 
TEveElement * ownedProducts ()
 
virtual bool requestGLHandlerPick () const
 
void saveImageTo (const std::string &iName) const override
 
virtual void setBackgroundColor (Color_t)
 
virtual void setupEnergyScale ()
 
virtual void useGlobalEnergyScaleChanged ()
 
FWViewContextviewContext ()
 
TEveViewer * viewer ()
 
TGLViewer * viewerGL () const
 
 ~FWEveView () override
 
- Public Member Functions inherited from FWViewBase
void destroy ()
 
 FWViewBase (FWViewType::EType, unsigned int iVersion=1)
 
void promptForSaveImageTo (TGFrame *) const
 
FWViewType::EType typeId () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWConfigurableParameterizable
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
unsigned int version () const
 
 ~FWConfigurableParameterizable () override
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Private Member Functions

void doCompression (bool)
 
void doFishEyeDistortion ()
 
void doPreScaleDistortion ()
 
void doShiftOriginToBeamSpot ()
 
 FWRPZView (const FWRPZView &)=delete
 
const FWRPZViewoperator= (const FWRPZView &)=delete
 
void projectionAxesLabelSize ()
 
void setEtaRng ()
 
void showProjectionAxes ()
 

Private Attributes

TEveProjectionAxes * m_axes
 
TEveCalo2D * m_calo
 
FWDoubleParameter m_caloDistortion
 
FWBoolParameter m_compressMuon
 
FWDoubleParameter m_fishEyeDistortion
 
FWDoubleParameter m_fishEyeR
 
FWRPZViewGeometrym_geometryList
 
FWDoubleParameter m_muonDistortion
 
FWDoubleParameter m_projectionAxesLabelSize
 
TEveProjectionManager * m_projMgr
 
FWBoolParameter m_shiftOrigin
 
FWBoolParameterm_showEndcaps
 
FWBoolParameter m_showGEM
 
FWBoolParameterm_showHF
 
FWBoolParameter m_showME0
 
FWBoolParameter m_showPixelBarrel
 
FWBoolParameter m_showPixelEndcap
 
FWBoolParameter m_showProjectionAxes
 
FWBoolParameter m_showRpcEndcap
 
FWBoolParameter m_showTrackerBarrel
 
FWBoolParameter m_showTrackerEndcap
 

Static Private Attributes

const static float s_distortF = 0.001
 
const static float s_distortFInv = 1000
 

Additional Inherited Members

- Public Types inherited from FWParameterizable
typedef std::vector< FWParameterBase * >::const_iterator const_iterator
 
- Public Attributes inherited from FWViewBase
sigc::signal< void, const FWViewBase * > beingDestroyed_
 
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
 
- Protected Member Functions inherited from FWEveView
void addToOrthoCamera (TGLOrthoCamera *, FWConfiguration &) const
 
void addToPerspectiveCamera (TGLPerspectiveCamera *, const std::string &, FWConfiguration &) const
 
virtual void cameraGuideChanged ()
 
virtual void pointLineScalesChanged ()
 
virtual void resetCamera ()
 
void setFromOrthoCamera (TGLOrthoCamera *, const FWConfiguration &)
 
void setFromPerspectiveCamera (TGLPerspectiveCamera *, const std::string &, const FWConfiguration &)
 
- Protected Member Functions inherited from FWViewBase
 ~FWViewBase () override
 
- Protected Attributes inherited from FWEveView
const fireworks::Contextm_context
 
- Protected Attributes inherited from FWViewBase
FWViewType m_type
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 40 of file FWRPZView.h.

Constructor & Destructor Documentation

◆ FWRPZView() [1/2]

FWRPZView::FWRPZView ( TEveWindowSlot *  iParent,
FWViewType::EType  id 
)

Definition at line 46 of file FWRPZView.cc.

47  : FWEveView(iParent, id, 7),
48  m_geometryList(nullptr),
49  m_projMgr(nullptr),
50  m_axes(nullptr),
51 
52  m_calo(nullptr),
53 
54  m_showPixelBarrel(this, "Show Pixel Barrel", false),
55  m_showPixelEndcap(this, "Show Pixel Endcap", false),
56  m_showTrackerBarrel(this, "Show Tracker Barrel", false),
57  m_showTrackerEndcap(this, "Show Tracker Endcap", false),
58  m_showRpcEndcap(this, "Show RPC Endcap", false),
59  m_showGEM(this, "Show GEM", false),
60  m_showME0(this, "Show ME0", false),
61 
62  m_shiftOrigin(this, "Shift origin to beam-spot", false),
63  m_fishEyeDistortion(this, "Distortion", 0., 0., 100.),
64  m_fishEyeR(this, "FixedRadius", (double)fireworks::Context::caloR1(), 0.0, 150.0),
65 
66  m_caloDistortion(this, "Calo compression", 1.0, 0.01, 10.),
67  m_muonDistortion(this, "Muon compression", 0.2, 0.01, 10.),
68  m_showProjectionAxes(this, "Show projection axis", false),
69  m_projectionAxesLabelSize(this, "Projection axis label size", 0.015, 0.001, 0.2),
70  m_compressMuon(this, "Compress detectors", false),
71  m_showHF(nullptr),
72  m_showEndcaps(nullptr) {
73  TEveProjection::EPType_e projType = (id == FWViewType::kRhoZ) ? TEveProjection::kPT_RhoZ : TEveProjection::kPT_RPhi;
74 
75  m_projMgr = new TEveProjectionManager(projType);
76  m_projMgr->IncDenyDestroy();
77  m_projMgr->SetImportEmpty(kTRUE);
78 
79  m_projMgr->GetProjection()->SetDistortion(m_fishEyeDistortion.value() * s_distortF);
80  m_projMgr->GetProjection()->SetFixR(m_fishEyeR.value());
81 
82 #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE
83  m_projMgr->GetProjection()->SetDisplaceOrigin(m_shiftOrigin.value());
84 #endif
85 
86  if (id == FWViewType::kRhoPhi || id == FWViewType::kRhoPhiPF) {
87  m_projMgr->GetProjection()->AddPreScaleEntry(0, fireworks::Context::caloR1(), 1.0);
88  m_projMgr->GetProjection()->AddPreScaleEntry(0, 300, 0.2);
89  } else {
90  m_projMgr->GetProjection()->AddPreScaleEntry(0, fireworks::Context::caloR1(), 1.0);
91  m_projMgr->GetProjection()->AddPreScaleEntry(1, 310, 1.0);
92  m_projMgr->GetProjection()->AddPreScaleEntry(0, 370, 0.2);
93  m_projMgr->GetProjection()->AddPreScaleEntry(1, 580, 0.2);
94  }
95 
96  // camera
97  viewerGL()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
98  if (TGLOrthoCamera* camera = dynamic_cast<TGLOrthoCamera*>(&(viewerGL()->CurrentCamera()))) {
99  camera->SetZoomMax(1e6);
100  }
101  geoScene()->GetGLScene()->SetSelectable(kFALSE);
102 
103  m_axes = new TEveProjectionAxes(m_projMgr);
104  m_axes->SetRnrState(m_showProjectionAxes.value());
105  m_axes->SetLabelSize(m_projectionAxesLabelSize.value());
108  eventScene()->AddElement(m_axes);
109 
110  if (id != FWViewType::kRhoZ) {
111  m_showEndcaps = new FWBoolParameter(this, "Include EndCaps", true);
112  m_showEndcaps->changed_.connect(std::bind(&FWRPZView::setEtaRng, this));
113  m_showHF = new FWBoolParameter(this, "Include HF", true);
114  m_showHF->changed_.connect(std::bind(&FWRPZView::setEtaRng, this));
115  }
116 
117  m_shiftOrigin.changed_.connect(std::bind(&FWRPZView::doShiftOriginToBeamSpot, this));
118 
120 
121  m_fishEyeR.changed_.connect(std::bind(&FWRPZView::doFishEyeDistortion, this));
122 
123  m_caloDistortion.changed_.connect(std::bind(&FWRPZView::doPreScaleDistortion, this));
124  m_muonDistortion.changed_.connect(std::bind(&FWRPZView::doPreScaleDistortion, this));
125  m_compressMuon.changed_.connect(std::bind(&FWRPZView::doCompression, this, std::placeholders::_1));
126 }

References fireworks::Context::caloR1(), FWGenericParameter< T >::changed_, doCompression(), doFishEyeDistortion(), doPreScaleDistortion(), doShiftOriginToBeamSpot(), FWEveView::eventScene(), FWEveView::geoScene(), FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, m_axes, m_caloDistortion, m_compressMuon, m_fishEyeDistortion, m_fishEyeR, m_muonDistortion, m_projectionAxesLabelSize, m_projMgr, m_shiftOrigin, m_showEndcaps, m_showHF, m_showProjectionAxes, projectionAxesLabelSize(), s_distortF, setEtaRng(), showProjectionAxes(), FWGenericParameter< T >::value(), and FWEveView::viewerGL().

◆ ~FWRPZView()

FWRPZView::~FWRPZView ( )
override

Definition at line 128 of file FWRPZView.cc.

128  {
129  m_calo->Destroy();
130  m_projMgr->DecDenyDestroy();
131 }

References m_calo, and m_projMgr.

◆ FWRPZView() [2/2]

FWRPZView::FWRPZView ( const FWRPZView )
privatedelete

Member Function Documentation

◆ addTo()

void FWRPZView::addTo ( FWConfiguration iTo) const
overridevirtual

Reimplemented from FWEveView.

Definition at line 294 of file FWRPZView.cc.

294  {
295  FWEveView::addTo(iTo);
296  TGLOrthoCamera* camera = dynamic_cast<TGLOrthoCamera*>(&(viewerGL()->CurrentCamera()));
297  if (camera)
298  addToOrthoCamera(camera, iTo);
299 }

References FWEveView::addTo(), FWEveView::addToOrthoCamera(), and FWEveView::viewerGL().

◆ doCompression()

void FWRPZView::doCompression ( bool  flag)
private

Definition at line 278 of file FWRPZView.cc.

278  {
279  m_projMgr->GetProjection()->SetUsePreScale(flag);
280  m_projMgr->UpdateName();
281  m_projMgr->ProjectChildren();
282  gEve->Redraw3D();
283 }

References RemoveAddSevLevel::flag, and m_projMgr.

Referenced by FWRPZView().

◆ doFishEyeDistortion()

void FWRPZView::doFishEyeDistortion ( )
private

Definition at line 252 of file FWRPZView.cc.

252  {
253  TEveProjection* p = m_projMgr->GetProjection();
254  if (p->GetDistortion() != m_fishEyeDistortion.value() * s_distortFInv)
255  p->SetDistortion(m_fishEyeDistortion.value() * s_distortF);
256  if (p->GetFixR() != m_fishEyeR.value())
257  p->SetFixR(m_fishEyeR.value());
258 
259  m_projMgr->ProjectChildren();
260  gEve->Redraw3D();
261 }

References m_fishEyeDistortion, m_fishEyeR, m_projMgr, AlCaHLTBitMon_ParallelJobs::p, s_distortF, s_distortFInv, and FWGenericParameter< T >::value().

Referenced by FWRPZView().

◆ doPreScaleDistortion()

void FWRPZView::doPreScaleDistortion ( )
private

Definition at line 263 of file FWRPZView.cc.

263  {
265  m_projMgr->GetProjection()->ChangePreScaleEntry(0, 1, m_caloDistortion.value());
266  m_projMgr->GetProjection()->ChangePreScaleEntry(0, 2, m_muonDistortion.value());
267  } else {
268  m_projMgr->GetProjection()->ChangePreScaleEntry(0, 1, m_caloDistortion.value());
269  m_projMgr->GetProjection()->ChangePreScaleEntry(0, 2, m_muonDistortion.value());
270  m_projMgr->GetProjection()->ChangePreScaleEntry(1, 1, m_caloDistortion.value());
271  m_projMgr->GetProjection()->ChangePreScaleEntry(1, 2, m_muonDistortion.value());
272  }
273  m_projMgr->UpdateName();
274  m_projMgr->ProjectChildren();
275  gEve->Redraw3D();
276 }

References FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, m_caloDistortion, m_muonDistortion, m_projMgr, FWViewBase::typeId(), and FWGenericParameter< T >::value().

Referenced by FWRPZView().

◆ doShiftOriginToBeamSpot()

void FWRPZView::doShiftOriginToBeamSpot ( )
private

Definition at line 211 of file FWRPZView.cc.

211  {
212 #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE
213 
214  TEveProjection* p = m_projMgr->GetProjection();
215  if (p->GetDisplaceOrigin() != m_shiftOrigin.value()) {
216  p->SetDisplaceOrigin(m_shiftOrigin.value());
217  m_projMgr->ProjectChildren();
218  gEve->Redraw3D();
219  }
220 #endif
221 }

References m_projMgr, m_shiftOrigin, AlCaHLTBitMon_ParallelJobs::p, and FWGenericParameter< T >::value().

Referenced by FWRPZView().

◆ eventBegin()

void FWRPZView::eventBegin ( )
overridevirtual

Reimplemented from FWEveView.

Definition at line 176 of file FWRPZView.cc.

176  {
177  if (context().getBeamSpot()) {
178  float c[3] = {0, 0, 0};
180 
181  // projection center
182  TEveVector center(c[0], c[1], c[2]);
183  m_projMgr->GetProjection()->SetCenter(center);
184 
185  // camera move
186  TGLCamera& cam = viewerGL()->CurrentCamera();
187  cam.SetExternalCenter(true);
188  if (typeId() != FWViewType::kRhoZ) {
189  double r = center.Mag();
190  cam.SetCenterVec(center.fZ, TMath::Sign(r, center.fY), 0);
191  } else {
192  cam.SetCenterVec(c[0], c[1], c[2]);
193  }
194  }
195 }

References HltBtagPostValidation_cff::c, fireworks::Context::commonPrefs(), FWEveView::context(), CmsShowCommon::getEventCenter(), FWViewType::kRhoZ, m_projMgr, alignCSCRings::r, Sign(), FWViewBase::typeId(), and FWEveView::viewerGL().

◆ eventEnd()

void FWRPZView::eventEnd ( )
overridevirtual

Reimplemented from FWEveView.

Definition at line 197 of file FWRPZView.cc.

197  {
198  float c[3];
200  m_projMgr->SetCenter(c[0], c[1], c[2]);
202 }

References HltBtagPostValidation_cff::c, fireworks::Context::commonPrefs(), FWEveView::context(), FWEveView::eventEnd(), CmsShowCommon::getEventCenter(), and m_projMgr.

◆ getEveCalo()

TEveCaloViz * FWRPZView::getEveCalo ( ) const
overridevirtual

Reimplemented from FWEveView.

Definition at line 137 of file FWRPZView.cc.

137 { return static_cast<TEveCaloViz*>(m_calo); }

References m_calo.

◆ importElements()

void FWRPZView::importElements ( TEveElement *  iProjectableChild,
float  layer,
TEveElement *  iProjectedParent = nullptr 
)

Definition at line 285 of file FWRPZView.cc.

285  {
286  float oldLayer = m_projMgr->GetCurrentDepth();
287  m_projMgr->SetCurrentDepth(iLayer);
288  //make sure current depth is reset even if an exception is thrown
289  std::shared_ptr<TEveProjectionManager> sentry(
290  m_projMgr, std::bind(&TEveProjectionManager::SetCurrentDepth, std::placeholders::_1, oldLayer));
291  m_projMgr->ImportElements(iChildren, iProjectedParent);
292 }

References m_projMgr.

Referenced by addElements(), and FWEveViewManager::finishViewCreate().

◆ operator=()

const FWRPZView& FWRPZView::operator= ( const FWRPZView )
privatedelete

◆ populateController()

void FWRPZView::populateController ( ViewerParameterGUI gui) const
overridevirtual

Reimplemented from FWEveView.

Definition at line 368 of file FWRPZView.cc.

368  {
370 
371  ViewerParameterGUI& det = gui.requestTab("Detector");
372  ;
374 
375  if (typeId() == FWViewType::kRhoZ) {
379  bool showGEM = m_context->getGeom()->versionInfo().haveExtraDet("GEM");
380  if (showGEM)
381  det.addParam(&m_showGEM);
382  bool showME0 = m_context->getGeom()->versionInfo().haveExtraDet("ME0");
383  if (showME0)
384  det.addParam(&m_showME0);
385  }
386 
387 #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE
388  gui.requestTab("Projection").addParam(&m_shiftOrigin);
389 #endif
390 
392 
393  TGCompositeFrame* f = gui.getTabContainer();
394 
395  f->AddFrame(new TGLabel(f, "FishEye:"));
397 
398  f->AddFrame(new TGLabel(f, "PreScales:"));
399 
401 
404  }
405 }

References ViewerParameterGUI::addParam(), f, fireworks::Context::getGeom(), ViewerParameterGUI::getTabContainer(), FWGeometry::VersionInfo::haveExtraDet(), FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, m_caloDistortion, m_compressMuon, FWEveView::m_context, m_fishEyeDistortion, m_fishEyeR, m_muonDistortion, m_projectionAxesLabelSize, m_shiftOrigin, m_showEndcaps, m_showGEM, m_showHF, m_showME0, m_showPixelBarrel, m_showPixelEndcap, m_showProjectionAxes, m_showRpcEndcap, m_showTrackerBarrel, FWEveView::populateController(), ViewerParameterGUI::requestTab(), ViewerParameterGUI::separator(), FWViewBase::typeId(), and FWGeometry::versionInfo().

◆ projectionAxesLabelSize()

void FWRPZView::projectionAxesLabelSize ( )
private

Definition at line 363 of file FWRPZView.cc.

363  {
364  m_axes->SetLabelSize(m_projectionAxesLabelSize.value());
365  viewerGL()->RequestDraw();
366 }

References m_axes, m_projectionAxesLabelSize, FWGenericParameter< T >::value(), and FWEveView::viewerGL().

Referenced by FWRPZView().

◆ resetOrigin()

void FWRPZView::resetOrigin ( )

Definition at line 239 of file FWRPZView.cc.

239  {
240  // set center back to beam spot
241 
242 #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE
243  FWBeamSpot& b = *(context().getBeamSpot());
244  TEveVector center(b.x0(), b.y0(), b.z0());
245  m_projMgr->GetProjection()->SetCenter(center);
246 
247  m_projMgr->ProjectChildren();
248  gEve->Redraw3D();
249 #endif
250 }

References b, FWEveView::context(), fireworks::Context::getBeamSpot(), and m_projMgr.

◆ setContext()

void FWRPZView::setContext ( const fireworks::Context ctx)
overridevirtual

Reimplemented from FWEveView.

Definition at line 139 of file FWRPZView.cc.

139  {
141 
143  m_geometryList->IncDenyDestroy();
145  TEveElement* p = m_projMgr->ImportElements(m_geometryList);
146  geoScene()->AddElement(p);
147 
148  TEveCaloData* data = context().getCaloData();
149 
150  TEveCalo3D* calo3d = new TEveCalo3D(data);
151 
152  m_calo = static_cast<TEveCalo2D*>(m_projMgr->ImportElements(calo3d, eventScene()));
153 
154  if (typeId() == FWViewType::kRhoPhiPF)
155  m_calo->SetBarrelRadius(177);
156  else
157  m_calo->SetBarrelRadius(context().caloR1(false));
158 
159  m_calo->SetEndCapPos(context().caloZ1(false));
160  m_calo->SetAutoRange(false);
161  m_calo->SetScaleAbs(true);
162 
163  m_showPixelBarrel.changed_.connect(
164  std::bind(&FWRPZViewGeometry::showPixelBarrel, m_geometryList, std::placeholders::_1));
165  m_showPixelEndcap.changed_.connect(
166  std::bind(&FWRPZViewGeometry::showPixelEndcap, m_geometryList, std::placeholders::_1));
168  std::bind(&FWRPZViewGeometry::showTrackerBarrel, m_geometryList, std::placeholders::_1));
170  std::bind(&FWRPZViewGeometry::showTrackerEndcap, m_geometryList, std::placeholders::_1));
171  m_showRpcEndcap.changed_.connect(std::bind(&FWRPZViewGeometry::showRpcEndcap, m_geometryList, std::placeholders::_1));
172  m_showGEM.changed_.connect(std::bind(&FWRPZViewGeometry::showGEM, m_geometryList, std::placeholders::_1));
173  m_showME0.changed_.connect(std::bind(&FWRPZViewGeometry::showME0, m_geometryList, std::placeholders::_1));
174 }

References FWPFGeom::caloR1(), FWPFGeom::caloZ1(), FWGenericParameter< T >::changed_, FWEveView::context(), data, FWEveView::eventScene(), FWEveView::geoScene(), fireworks::Context::getCaloData(), FWRPZViewGeometry::initStdGeoElements(), FWViewType::kRhoPhiPF, m_calo, m_geometryList, m_projMgr, m_showGEM, m_showME0, m_showPixelBarrel, m_showPixelEndcap, m_showRpcEndcap, m_showTrackerBarrel, m_showTrackerEndcap, AlCaHLTBitMon_ParallelJobs::p, FWEveView::setContext(), FWRPZViewGeometry::showGEM(), FWRPZViewGeometry::showME0(), FWRPZViewGeometry::showPixelBarrel(), FWRPZViewGeometry::showPixelEndcap(), FWRPZViewGeometry::showRpcEndcap(), FWRPZViewGeometry::showTrackerBarrel(), FWRPZViewGeometry::showTrackerEndcap(), and FWViewBase::typeId().

◆ setEtaRng()

void FWRPZView::setEtaRng ( )
private

Definition at line 315 of file FWRPZView.cc.

315  {
316  if (typeId() != FWViewType::kRhoZ) {
317  // rng controllers only in RhoPhi
318  double eta_range = context().caloMaxEta();
319  if (!m_showHF->value())
320  eta_range = 3.0;
321  if (!m_showEndcaps->value())
322  eta_range = context().caloTransEta();
323  m_calo->SetEta(-eta_range, eta_range);
324  }
325 
327 }

References fireworks::Context::caloMaxEta(), fireworks::Context::caloTransEta(), FWEveView::context(), FWViewType::kRhoZ, m_calo, m_showEndcaps, m_showHF, FWEveView::setupEnergyScale(), FWViewBase::typeId(), and FWGenericParameter< T >::value().

Referenced by FWRPZView().

◆ setFrom()

void FWRPZView::setFrom ( const FWConfiguration iFrom)
overridevirtual

Reimplemented from FWEveView.

Definition at line 301 of file FWRPZView.cc.

301  {
302  FWEveView::setFrom(iFrom);
303 
304  TGLOrthoCamera* camera = dynamic_cast<TGLOrthoCamera*>(&(viewerGL()->CurrentCamera()));
305  if (camera)
306  setFromOrthoCamera(camera, iFrom);
307 
308  if (iFrom.version() < 7) {
309  const FWConfiguration* value = iFrom.valueForKey("Show projection axes");
310  if (value)
311  m_showProjectionAxes.set(value->value() == "1");
312  }
313 }

References m_showProjectionAxes, FWGenericParameter< T >::set(), FWEveView::setFrom(), FWEveView::setFromOrthoCamera(), FWConfiguration::valueForKey(), FWConfiguration::version(), and FWEveView::viewerGL().

◆ setupEventCenter()

void FWRPZView::setupEventCenter ( )
overridevirtual

Reimplemented from FWEveView.

Definition at line 204 of file FWRPZView.cc.

204  {
205  float c[3];
207  m_projMgr->SetCenter(c[0], c[1], c[2]);
209 }

References HltBtagPostValidation_cff::c, fireworks::Context::commonPrefs(), FWEveView::context(), CmsShowCommon::getEventCenter(), m_projMgr, and FWEveView::setupEventCenter().

◆ shiftOrigin()

void FWRPZView::shiftOrigin ( TEveVector &  center)

Definition at line 223 of file FWRPZView.cc.

223  {
224 #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE
225  // re-project with new center
226  m_projMgr->GetProjection()->SetCenter(center);
227  m_projMgr->ProjectChildren();
228 
229  // draw projected center
230  float* pc = m_projMgr->GetProjection()->GetProjectedCenter();
231  viewerGL()->CurrentCamera().SetExternalCenter(true);
232  viewerGL()->CurrentCamera().SetCenterVec(pc[0], pc[1], pc[2]);
233  viewerGL()->SetDrawCameraCenter(true);
234 
235  gEve->Redraw3D();
236 #endif
237 }

References m_projMgr, and FWEveView::viewerGL().

◆ showProjectionAxes()

void FWRPZView::showProjectionAxes ( )
private

Definition at line 357 of file FWRPZView.cc.

357  {
358  m_axes->SetRnrState(m_showProjectionAxes.value());
359  gEve->Redraw3D();
360  viewerGL()->RequestDraw();
361 }

References m_axes, m_showProjectionAxes, FWGenericParameter< T >::value(), and FWEveView::viewerGL().

Referenced by FWRPZView().

◆ voteCaloMaxVal()

void FWRPZView::voteCaloMaxVal ( )
overridevirtual

Reimplemented from FWEveView.

Definition at line 329 of file FWRPZView.cc.

329  {
330  if (!m_calo->GetData()->Empty()) {
331  m_calo->AssertCellIdCache();
332  Float_t sumEt, sumE;
333  TEveCaloData::CellData_t cellData;
334  typedef std::vector<TEveCaloData::vCellId_t*> vBinCells_t;
335  typedef std::vector<TEveCaloData::vCellId_t*>::iterator vBinCells_i;
336 
337  vBinCells_t cellLists = m_calo->GetBinLists();
338  for (vBinCells_i it = cellLists.begin(); it != cellLists.end(); it++) {
339  TEveCaloData::vCellId_t* binCells = *it;
340  if (binCells) {
341  sumEt = 0;
342  sumE = 0;
343  TEveCaloData::vCellId_i a = binCells->end();
344 
345  for (TEveCaloData::vCellId_i k = binCells->begin(); k != a; ++k) {
346  m_calo->GetData()->GetCellData((*k), cellData);
347  sumEt += cellData.Value(true);
348  sumE += cellData.Value(false);
349  }
350  // printf("vote sum %f %f \n", sumEt , sumE);
352  }
353  }
354  }
355 }

References a, FWEveView::context(), dqmdumpme::k, m_calo, objects.METAnalyzer::sumEt, and fireworks::Context::voteMaxEtAndEnergy().

Member Data Documentation

◆ m_axes

TEveProjectionAxes* FWRPZView::m_axes
private

Definition at line 86 of file FWRPZView.h.

Referenced by FWRPZView(), projectionAxesLabelSize(), and showProjectionAxes().

◆ m_calo

TEveCalo2D* FWRPZView::m_calo
private

Definition at line 87 of file FWRPZView.h.

Referenced by getEveCalo(), setContext(), setEtaRng(), voteCaloMaxVal(), and ~FWRPZView().

◆ m_caloDistortion

FWDoubleParameter FWRPZView::m_caloDistortion
private

Definition at line 103 of file FWRPZView.h.

Referenced by doPreScaleDistortion(), FWRPZView(), and populateController().

◆ m_compressMuon

FWBoolParameter FWRPZView::m_compressMuon
private

Definition at line 107 of file FWRPZView.h.

Referenced by FWRPZView(), and populateController().

◆ m_fishEyeDistortion

FWDoubleParameter FWRPZView::m_fishEyeDistortion
private

Definition at line 100 of file FWRPZView.h.

Referenced by doFishEyeDistortion(), FWRPZView(), and populateController().

◆ m_fishEyeR

FWDoubleParameter FWRPZView::m_fishEyeR
private

Definition at line 101 of file FWRPZView.h.

Referenced by doFishEyeDistortion(), FWRPZView(), and populateController().

◆ m_geometryList

FWRPZViewGeometry* FWRPZView::m_geometryList
private

Definition at line 84 of file FWRPZView.h.

Referenced by setContext().

◆ m_muonDistortion

FWDoubleParameter FWRPZView::m_muonDistortion
private

Definition at line 104 of file FWRPZView.h.

Referenced by doPreScaleDistortion(), FWRPZView(), and populateController().

◆ m_projectionAxesLabelSize

FWDoubleParameter FWRPZView::m_projectionAxesLabelSize
private

Definition at line 106 of file FWRPZView.h.

Referenced by FWRPZView(), populateController(), and projectionAxesLabelSize().

◆ m_projMgr

TEveProjectionManager* FWRPZView::m_projMgr
private

◆ m_shiftOrigin

FWBoolParameter FWRPZView::m_shiftOrigin
private

Definition at line 99 of file FWRPZView.h.

Referenced by doShiftOriginToBeamSpot(), FWRPZView(), and populateController().

◆ m_showEndcaps

FWBoolParameter* FWRPZView::m_showEndcaps
private

Definition at line 110 of file FWRPZView.h.

Referenced by FWRPZView(), populateController(), and setEtaRng().

◆ m_showGEM

FWBoolParameter FWRPZView::m_showGEM
private

Definition at line 96 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showHF

FWBoolParameter* FWRPZView::m_showHF
private

Definition at line 109 of file FWRPZView.h.

Referenced by FWRPZView(), populateController(), and setEtaRng().

◆ m_showME0

FWBoolParameter FWRPZView::m_showME0
private

Definition at line 97 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showPixelBarrel

FWBoolParameter FWRPZView::m_showPixelBarrel
private

Definition at line 91 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showPixelEndcap

FWBoolParameter FWRPZView::m_showPixelEndcap
private

Definition at line 92 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showProjectionAxes

FWBoolParameter FWRPZView::m_showProjectionAxes
private

Definition at line 105 of file FWRPZView.h.

Referenced by FWRPZView(), populateController(), setFrom(), and showProjectionAxes().

◆ m_showRpcEndcap

FWBoolParameter FWRPZView::m_showRpcEndcap
private

Definition at line 95 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showTrackerBarrel

FWBoolParameter FWRPZView::m_showTrackerBarrel
private

Definition at line 93 of file FWRPZView.h.

Referenced by populateController(), and setContext().

◆ m_showTrackerEndcap

FWBoolParameter FWRPZView::m_showTrackerEndcap
private

Definition at line 94 of file FWRPZView.h.

Referenced by setContext().

◆ s_distortF

const float FWRPZView::s_distortF = 0.001
staticprivate

Definition at line 81 of file FWRPZView.h.

Referenced by doFishEyeDistortion(), and FWRPZView().

◆ s_distortFInv

const float FWRPZView::s_distortFInv = 1000
staticprivate

Definition at line 82 of file FWRPZView.h.

Referenced by doFishEyeDistortion().

FWEveView::setupEnergyScale
virtual void setupEnergyScale()
Definition: FWEveView.cc:251
FWRPZViewGeometry::showGEM
void showGEM(bool)
Definition: FWRPZViewGeometry.cc:534
FWRPZViewGeometry::showTrackerEndcap
void showTrackerEndcap(bool)
Definition: FWRPZViewGeometry.cc:445
FWRPZView::m_showME0
FWBoolParameter m_showME0
Definition: FWRPZView.h:97
FWRPZView::doCompression
void doCompression(bool)
Definition: FWRPZView.cc:278
FWGeometry::versionInfo
const VersionInfo & versionInfo() const
Definition: FWGeometry.h:150
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
FWRPZView::doFishEyeDistortion
void doFishEyeDistortion()
Definition: FWRPZView.cc:252
ViewerParameterGUI
Definition: CmsShowViewPopup.h:49
FWRPZView::m_shiftOrigin
FWBoolParameter m_shiftOrigin
Definition: FWRPZView.h:99
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FWViewType::kRhoZ
Definition: FWViewType.h:33
FWEveView::populateController
void populateController(ViewerParameterGUI &) const override
Definition: FWEveView.cc:466
FWEveView::setFrom
void setFrom(const FWConfiguration &) override
Definition: FWEveView.cc:307
FWBoolParameter
FWParameters::Bool FWBoolParameter
Definition: FWParameters.h:37
Sign
T Sign(T A, T B)
Definition: MathUtil.h:54
FWRPZView::m_showGEM
FWBoolParameter m_showGEM
Definition: FWRPZView.h:96
FWRPZView::s_distortFInv
const static float s_distortFInv
Definition: FWRPZView.h:82
FWRPZView::m_axes
TEveProjectionAxes * m_axes
Definition: FWRPZView.h:86
objects.METAnalyzer.sumEt
sumEt
Definition: METAnalyzer.py:97
fireworks::Context::getBeamSpot
FWBeamSpot * getBeamSpot() const
Definition: Context.h:67
FWGenericParameter::set
void set(T iValue)
Definition: FWGenericParameter.h:70
FWRPZView::m_fishEyeR
FWDoubleParameter m_fishEyeR
Definition: FWRPZView.h:101
FWRPZView::m_showTrackerEndcap
FWBoolParameter m_showTrackerEndcap
Definition: FWRPZView.h:94
FWRPZView::m_geometryList
FWRPZViewGeometry * m_geometryList
Definition: FWRPZView.h:84
FWRPZView::setEtaRng
void setEtaRng()
Definition: FWRPZView.cc:315
FWRPZView::m_projMgr
TEveProjectionManager * m_projMgr
Definition: FWRPZView.h:85
FWEveView::setupEventCenter
virtual void setupEventCenter()
Definition: FWEveView.cc:283
FWRPZViewGeometry::showME0
void showME0(bool)
Definition: FWRPZViewGeometry.cc:572
FWEveView::eventScene
TEveScene * eventScene()
Definition: FWEveView.h:79
FWViewBase::typeId
FWViewType::EType typeId() const
Definition: FWViewBase.h:42
FWRPZViewGeometry::initStdGeoElements
void initStdGeoElements(const FWViewType::EType id)
Definition: FWRPZViewGeometry.cc:83
FWGenericParameter::changed_
sigc::signal< void, T > changed_
Definition: FWGenericParameter.h:75
ViewerParameterGUI::separator
ViewerParameterGUI & separator()
Definition: CmsShowViewPopup.cc:232
FWEveView::context
const fireworks::Context & context()
Definition: FWEveView.h:64
fireworks::Context::voteMaxEtAndEnergy
void voteMaxEtAndEnergy(float Et, float energy) const
Definition: Context.cc:162
FWRPZViewGeometry::showPixelEndcap
void showPixelEndcap(bool)
Definition: FWRPZViewGeometry.cc:389
FWGeometry::VersionInfo::haveExtraDet
bool haveExtraDet(const char *) const
Definition: FWGeometry.cc:535
fireworks::Context::caloTransEta
static float caloTransEta()
Definition: Context.cc:187
FWRPZView::m_showEndcaps
FWBoolParameter * m_showEndcaps
Definition: FWRPZView.h:110
FWConfiguration::valueForKey
const FWConfiguration * valueForKey(const std::string &iKey) const
Definition: FWConfiguration.cc:122
fireworks::Context::caloMaxEta
static double caloMaxEta()
Definition: Context.cc:191
dqmdumpme.k
k
Definition: dqmdumpme.py:60
b
double b
Definition: hdecay.h:118
fireworks::Context::commonPrefs
CmsShowCommon * commonPrefs() const
Definition: Context.cc:160
FWEveView::addToOrthoCamera
void addToOrthoCamera(TGLOrthoCamera *, FWConfiguration &) const
Definition: FWEveView.cc:352
FWBeamSpot
Definition: FWBeamSpot.h:11
FWPFGeom::caloR1
float caloR1()
Definition: FWPFGeom.h:20
FWRPZView::doPreScaleDistortion
void doPreScaleDistortion()
Definition: FWRPZView.cc:263
a
double a
Definition: hdecay.h:119
ViewerParameterGUI::getTabContainer
TGCompositeFrame * getTabContainer()
Definition: CmsShowViewPopup.cc:240
FWRPZView::showProjectionAxes
void showProjectionAxes()
Definition: FWRPZView.cc:357
FWEveView::m_context
const fireworks::Context * m_context
Definition: FWEveView.h:109
FWRPZViewGeometry
Definition: FWRPZViewGeometry.h:32
FWRPZViewGeometry::showRpcEndcap
void showRpcEndcap(bool)
Definition: FWRPZViewGeometry.cc:479
fireworks::Context::getGeom
FWGeometry * getGeom() const
Definition: Context.h:72
FWPFGeom::caloZ1
float caloZ1()
Definition: FWPFGeom.h:21
value
Definition: value.py:1
FWEveView::FWEveView
FWEveView(TEveWindowSlot *, FWViewType::EType, unsigned int version=7)
Definition: FWEveView.cc:70
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FWRPZView::m_showPixelEndcap
FWBoolParameter m_showPixelEndcap
Definition: FWRPZView.h:92
FWRPZView::s_distortF
const static float s_distortF
Definition: FWRPZView.h:81
FWConfiguration::version
unsigned int version() const
Definition: FWConfiguration.h:49
alignCSCRings.r
r
Definition: alignCSCRings.py:93
FWRPZView::m_compressMuon
FWBoolParameter m_compressMuon
Definition: FWRPZView.h:107
FWRPZViewGeometry::showPixelBarrel
void showPixelBarrel(bool)
Definition: FWRPZViewGeometry.cc:367
FWRPZView::m_showTrackerBarrel
FWBoolParameter m_showTrackerBarrel
Definition: FWRPZView.h:93
FWGenericParameter::value
T value() const
Definition: FWGenericParameter.h:50
FWRPZView::m_muonDistortion
FWDoubleParameter m_muonDistortion
Definition: FWRPZView.h:104
FWRPZView::m_showPixelBarrel
FWBoolParameter m_showPixelBarrel
Definition: FWRPZView.h:91
FWEveView::setFromOrthoCamera
void setFromOrthoCamera(TGLOrthoCamera *, const FWConfiguration &)
Definition: FWEveView.cc:368
FWEveView::addTo
void addTo(FWConfiguration &) const override
Definition: FWEveView.cc:291
FWRPZView::doShiftOriginToBeamSpot
void doShiftOriginToBeamSpot()
Definition: FWRPZView.cc:211
fireworks::Context::getCaloData
TEveCaloDataHist * getCaloData() const
Definition: Context.h:69
FWRPZView::m_calo
TEveCalo2D * m_calo
Definition: FWRPZView.h:87
FWEveView::eventEnd
virtual void eventEnd()
Definition: FWEveView.cc:217
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
FWRPZView::m_showHF
FWBoolParameter * m_showHF
Definition: FWRPZView.h:109
FWEveView::viewerGL
TGLViewer * viewerGL() const
Definition: FWEveView.cc:177
FWRPZView::m_showRpcEndcap
FWBoolParameter m_showRpcEndcap
Definition: FWRPZView.h:95
FWConfiguration
Definition: FWConfiguration.h:31
FWRPZView::projectionAxesLabelSize
void projectionAxesLabelSize()
Definition: FWRPZView.cc:363
FWEveView::setContext
virtual void setContext(const fireworks::Context &x)
Definition: FWEveView.cc:227
FWRPZViewGeometry::showTrackerBarrel
void showTrackerBarrel(bool)
Definition: FWRPZViewGeometry.cc:413
FWViewType::kRhoPhiPF
Definition: FWViewType.h:42
FWEveView::geoScene
TEveScene * geoScene()
Definition: FWEveView.h:80
FWRPZView::m_projectionAxesLabelSize
FWDoubleParameter m_projectionAxesLabelSize
Definition: FWRPZView.h:106
ViewerParameterGUI::addParam
ViewerParameterGUI & addParam(const FWParameterBase *)
Definition: CmsShowViewPopup.cc:212
CmsShowCommon::getEventCenter
void getEventCenter(float *inC) const
Definition: CmsShowCommon.cc:294
FWViewType::kRhoPhi
Definition: FWViewType.h:32
fireworks::Context::caloR1
static float caloR1(bool offset=true)
Definition: Context.cc:180
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
FWRPZView::m_showProjectionAxes
FWBoolParameter m_showProjectionAxes
Definition: FWRPZView.h:105
ViewerParameterGUI::requestTab
ViewerParameterGUI & requestTab(const char *)
Definition: CmsShowViewPopup.cc:197
FWRPZView::m_caloDistortion
FWDoubleParameter m_caloDistortion
Definition: FWRPZView.h:103
FWRPZView::m_fishEyeDistortion
FWDoubleParameter m_fishEyeDistortion
Definition: FWRPZView.h:100