Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <boost/bind.hpp>
00016
00017
00018 #include "TGLViewer.h"
00019 #include "TGLScenePad.h"
00020 #include "TEveCalo.h"
00021 #include "TEveScene.h"
00022
00023 #include "Fireworks/Core/interface/FW3DView.h"
00024 #include "Fireworks/Core/interface/Context.h"
00025 #include "Fireworks/Core/interface/FWViewContext.h"
00026 #include "Fireworks/Core/interface/CmsShowViewPopup.h"
00027 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 FW3DView::FW3DView(TEveWindowSlot* slot, FWViewType::EType typeId):
00041 FW3DViewBase(slot, typeId),
00042 m_calo(0)
00043 {
00044 viewerGL()->CurrentCamera().SetFixDefCenter(kTRUE);
00045 }
00046
00047 FW3DView::~FW3DView()
00048 {
00049 m_calo->Destroy();
00050 }
00051
00052
00053 TEveCaloViz*
00054 FW3DView::getEveCalo() const
00055 {
00056 return static_cast<TEveCaloViz*>(m_calo);
00057 }
00058
00059 void FW3DView::setContext(const fireworks::Context& ctx)
00060 {
00061 FW3DViewBase::setContext(ctx);
00062
00063 TEveCaloData* data = context().getCaloData();
00064 m_calo = new TEveCalo3D(data);
00065 m_calo->SetElementName("calo barrel");
00066
00067 m_calo->SetBarrelRadius(context().caloR1(false));
00068 m_calo->SetEndCapPos(context().caloZ1(false));
00069 m_calo->SetFrameTransparency(80);
00070 m_calo->SetAutoRange(false);
00071 m_calo->SetScaleAbs(true);
00072 eventScene()->AddElement(m_calo);
00073 }