#include <FWCaloTowerDetailView.h>
Public Member Functions | |
FWCaloTowerDetailView () | |
virtual | ~FWCaloTowerDetailView () |
Private Member Functions | |
virtual void | build (const FWModelId &id, const CaloTower *) |
virtual void | setTextInfo (const FWModelId &, const CaloTower *) |
Private Attributes | |
FWECALDetailViewBuilder * | m_builder |
TEveCaloData * | m_data |
Definition at line 19 of file FWCaloTowerDetailView.h.
FWCaloTowerDetailView::FWCaloTowerDetailView | ( | ) |
Definition at line 19 of file FWCaloTowerDetailView.cc.
FWCaloTowerDetailView::~FWCaloTowerDetailView | ( | ) | [virtual] |
Definition at line 25 of file FWCaloTowerDetailView.cc.
{ }
void FWCaloTowerDetailView::build | ( | const FWModelId & | id, |
const CaloTower * | iTower | ||
) | [private, virtual] |
Implements FWDetailView< CaloTower >.
Definition at line 32 of file FWCaloTowerDetailView.cc.
References FWECALDetailViewBuilder::build(), reco::LeafCandidate::eta(), FWDetailViewBase::item(), m_builder, m_data, FWDetailViewGL< CaloTower >::m_eveScene, reco::LeafCandidate::phi(), setTextInfo(), FWECALDetailViewBuilder::showSuperClusters(), and FWDetailViewGL< CaloTower >::viewerGL().
{ if(!iTower) return; // build ECAL objects m_builder = new FWECALDetailViewBuilder(id.item()->getEvent(), id.item()->getGeom(), iTower->eta(), iTower->phi(), 25); m_builder->showSuperClusters(); TEveCaloLego* lego = m_builder->build(); m_data = lego->GetData(); m_data->IncDenyDestroy(); m_eveScene->AddElement(lego); // draw axis at the window corners TEveCaloLegoOverlay* overlay = new TEveCaloLegoOverlay(); overlay->SetShowPlane(kFALSE); overlay->SetShowPerspective(kFALSE); overlay->SetCaloLego(lego); overlay->SetShowScales(1); // temporary viewerGL()->AddOverlayElement(overlay); // set event handler and flip camera to top view at beginning viewerGL()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY); FWGLEventHandler* eh = new FWGLEventHandler((TGWindow*)viewerGL()->GetGLWidget(), (TObject*)viewerGL(), lego); viewerGL()->SetEventHandler(eh); viewerGL()->UpdateScene(); viewerGL()->CurrentCamera().Reset(); viewerGL()->RequestDraw(TGLRnrCtx::kLODHigh); setTextInfo(id, iTower); }
void FWCaloTowerDetailView::setTextInfo | ( | const FWModelId & | id, |
const CaloTower * | tower | ||
) | [private, virtual] |
Implements FWDetailView< CaloTower >.
Definition at line 69 of file FWCaloTowerDetailView.cc.
References CaloTower::emEt(), reco::LeafCandidate::eta(), h, CaloTower::hadEt(), getHLTprescales::index, FWDetailViewBase::item(), m_builder, FWDetailViewGL< CaloTower >::m_infoCanvas, FWECALDetailViewBuilder::makeLegend(), reco::LeafCandidate::phi(), x, and detailsBasic3DVector::y.
Referenced by build().
{ m_infoCanvas->cd(); float_t x = 0.02; float y = 0.97; TLatex* latex = new TLatex(x, y, ""); const double textsize(0.05); latex->SetTextSize(textsize); float h = latex->GetTextSize()*0.6; latex->DrawLatex(x, y, "ECAL hit detail view centered on tower:" ); y -= h; latex->DrawLatex(x, y, Form(" %s",id.item()->modelName(id.index()).c_str()) ); y -= h; latex->DrawLatex(x, y, Form(" E_{T}(em) = %.1f GeV, E_{T}(had) = %.1f GeV", tower->emEt(), tower->hadEt()) ); y -= h; latex->DrawLatex(x, y, Form(" #eta = %0.2f, #varphi = %0.2f", tower->eta(), tower->phi()) ); y -= h; m_builder->makeLegend(x, y); }
Definition at line 30 of file FWCaloTowerDetailView.h.
Referenced by build(), and setTextInfo().
TEveCaloData* FWCaloTowerDetailView::m_data [private] |
Definition at line 29 of file FWCaloTowerDetailView.h.
Referenced by build().