#include <Context.h>
Public Member Functions | |
FWColorManager * | colorManager () const |
CmsShowCommon * | commonPrefs () const |
Context (FWModelChangeManager *iCM, FWSelectionManager *iSM, FWEventItemsManager *iEM, FWColorManager *iColorM, FWJobMetadataManager *iJMDM) | |
void | deleteEveElements () |
const FWEventItemsManager * | eventItemsManager () const |
FWBeamSpot * | getBeamSpot () const |
TEveCaloDataHist * | getCaloData () const |
TEveCaloDataVec * | getCaloDataHF () const |
FWMagField * | getField () const |
const FWGeometry * | getGeom () const |
float | getMaxEnergyInEvent (bool isEt) const |
TEveTrackPropagator * | getMuonTrackPropagator () const |
TEveTrackPropagator * | getTrackerTrackPropagator () const |
TEveTrackPropagator * | getTrackPropagator () const |
void | initEveElements () |
FWJobMetadataManager * | metadataManager () const |
FWModelChangeManager * | modelChangeManager () const |
void | resetMaxEtAndEnergy () const |
FWSelectionManager * | selectionManager () const |
void | setGeom (const FWGeometry *x) |
void | voteMaxEtAndEnergy (float Et, float energy) const |
virtual | ~Context () |
Static Public Member Functions | |
static double | caloMaxEta () |
static float | caloR1 (bool offset=true) |
static float | caloR2 (bool offset=true) |
static float | caloTransAngle () |
static float | caloTransEta () |
static float | caloZ1 (bool offset=true) |
static float | caloZ2 (bool offset=true) |
Private Member Functions | |
Context (const Context &) | |
const Context & | operator= (const Context &) |
Private Attributes | |
FWBeamSpot * | m_beamSpot |
TEveCaloDataHist * | m_caloData |
TEveCaloDataVec * | m_caloDataHF |
FWModelChangeManager * | m_changeManager |
FWColorManager * | m_colorManager |
CmsShowCommon * | m_commonPrefs |
FWEventItemsManager * | m_eventItemsManager |
const FWGeometry * | m_geom |
FWMagField * | m_magField |
float | m_maxEnergy |
float | m_maxEt |
FWJobMetadataManager * | m_metadataManager |
TEveTrackPropagator * | m_muonPropagator |
TEveTrackPropagator * | m_propagator |
FWSelectionManager * | m_selectionManager |
TEveTrackPropagator * | m_trackerPropagator |
Static Private Attributes | |
static const float | s_caloOffR = 10 |
static const float | s_caloOffZ = s_caloOffR/tan(s_caloTransAngle) |
static const float | s_caloR = s_caloZ*tan(s_caloTransAngle) |
static const float | s_caloTransAngle = 2*atan(exp(-s_caloTransEta)) |
static const float | s_caloTransEta = 1.479 |
static const float | s_caloZ = 290 |
Context::Context | ( | FWModelChangeManager * | iCM, |
FWSelectionManager * | iSM, | ||
FWEventItemsManager * | iEM, | ||
FWColorManager * | iColorM, | ||
FWJobMetadataManager * | iJMDM | ||
) |
Definition at line 62 of file Context.cc.
References m_commonPrefs.
: m_changeManager(iCM), m_selectionManager(iSM), m_eventItemsManager(iEM), m_colorManager(iColorM), m_metadataManager(iJMDM), m_geom(0), m_propagator(0), m_trackerPropagator(0), m_muonPropagator(0), m_magField(0), m_beamSpot(0), m_commonPrefs(0), m_maxEt(1.f), m_maxEnergy(1.f), m_caloData(0), m_caloDataHF(0) { if (iColorM) // unit test m_commonPrefs = new CmsShowCommon(this); }
Context::~Context | ( | ) | [virtual] |
fireworks::Context::Context | ( | const Context & | ) | [private] |
double Context::caloMaxEta | ( | ) | [static] |
Definition at line 240 of file Context.cc.
References fw3dlego::xbins_hf, and fw3dlego::xbins_hf_n.
Referenced by FWRPZViewGeometry::makeCaloOutlineRhoZ(), fireworks::makeEveJetCone(), and FWRPZView::setEtaRng().
{ return fw3dlego::xbins_hf[fw3dlego::xbins_hf_n -1]; }
float Context::caloR1 | ( | bool | offset = true | ) | [static] |
Definition at line 210 of file Context.cc.
References evf::evtn::offset(), and s_caloR.
Referenced by fireworks::addDashedLine(), FWPFClusterRPZProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWJetProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWRPZView::FWRPZView(), initEveElements(), FWRPZViewGeometry::makeCaloOutlineRhoPhi(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), fireworks::makeEveJetCone(), fireworks::makeRhoPhiSuperCluster(), and fireworks::makeRhoZSuperCluster().
float Context::caloR2 | ( | bool | offset = true | ) | [static] |
Definition at line 215 of file Context.cc.
References evf::evtn::offset(), and s_caloR.
Referenced by FWTauProxyBuilderBase::buildBaseTau(), initEveElements(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), fireworks::makeEveJetCone(), and fireworks::makeRhoZSuperCluster().
float Context::caloTransAngle | ( | ) | [static] |
Definition at line 235 of file Context.cc.
References s_caloTransAngle.
Referenced by FWTauProxyBuilderBase::buildBaseTau(), fireworks::makeEveJetCone(), and fireworks::makeRhoZSuperCluster().
{ return s_caloTransAngle; }
float Context::caloTransEta | ( | ) | [static] |
Definition at line 230 of file Context.cc.
References s_caloTransEta.
Referenced by FWMET3DProxyBuilder::build(), FWMETProxyBuilder::buildViewType(), FWConversionProxyBuilder::requestCommon(), and FWRPZView::setEtaRng().
{ return s_caloTransEta; }
float Context::caloZ1 | ( | bool | offset = true | ) | [static] |
Definition at line 220 of file Context.cc.
References evf::evtn::offset(), and s_caloZ.
Referenced by FWPFClusterRPZProxyBuilder::build(), FWMET3DProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWJetProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), initEveElements(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), fireworks::makeEveJetCone(), fireworks::makeRhoZSuperCluster(), and FWConversionProxyBuilder::requestCommon().
float Context::caloZ2 | ( | bool | offset = true | ) | [static] |
Definition at line 225 of file Context.cc.
References evf::evtn::offset(), and s_caloZ.
Referenced by fireworks::addDashedLine(), FWTauProxyBuilderBase::buildBaseTau(), FWJetProxyBuilder::buildViewType(), initEveElements(), FWRPZViewGeometry::makeCaloOutlineRhoZ(), fireworks::makeEveJetCone(), and fireworks::makeRhoZSuperCluster().
FWColorManager* fireworks::Context::colorManager | ( | ) | const [inline] |
Definition at line 66 of file Context.h.
References m_colorManager.
Referenced by FWEventItemsManager::add(), FWEventItemsManager::addTo(), FWEventItem::colorManager(), CmsShowCommon::colorManager(), FWGUIManager::createEDIFrame(), FWGUIManager::createList(), FWGUIManager::createModelPopup(), FWEveViewManager::finishViewCreate(), FWGUIManager::FWGUIManager(), FWViewGeometryList::FWViewGeometryList(), FWRPZViewGeometry::makeCaloOutlineRhoPhi(), FWEveLegoView::setContext(), CmsShowCommon::setFrom(), FW3DViewBase::setFrom(), FWEventItemsManager::setFrom(), CmsShowCommon::setGamma(), CmsShowCommon::setGeomColor(), CmsShowCommon::setGeomTransparency(), FWGUIManager::setViewPopup(), CmsShowCommon::switchBackground(), FWViewGeometryList::updateColors(), and FWViewGeometryList::updateTransparency().
{ return m_colorManager; }
CmsShowCommon * Context::commonPrefs | ( | ) | const |
Definition at line 179 of file Context.cc.
References m_commonPrefs.
Referenced by FWEveViewManager::setContext(), CmsShowMainBase::setup(), FWGUIManager::showCommonPopup(), and FWEveView::useGlobalEnergyScaleChanged().
{ return m_commonPrefs; }
void Context::deleteEveElements | ( | ) |
Definition at line 168 of file Context.cc.
{ // AMT: delete of eve-elements disabled to prevent crash on exit. // A lot of eve objects use this elements (e.g. TEveCalo, TEveTrack ...) // If want to have explicit delete make sure order of destruction // is correct: this should be called after all scenes are destroyed. }
const FWEventItemsManager* fireworks::Context::eventItemsManager | ( | ) | const [inline] |
Definition at line 62 of file Context.h.
References m_eventItemsManager.
Referenced by FWGUIManager::addData(), FWGUIManager::createList(), FWGUIManager::FWGUIManager(), FWEventItem::isInBack(), FWEventItem::isInFront(), FWEventItem::moveToBack(), FWEventItem::moveToFront(), FWEventItem::moveToLayer(), FWEventItem::proxyConfigChanged(), and CmsShowNavigator::updateFileFilters().
{ return m_eventItemsManager; }
FWBeamSpot* fireworks::Context::getBeamSpot | ( | ) | const [inline] |
Definition at line 79 of file Context.h.
References m_beamSpot.
Referenced by FWConvTrackHitsDetailView::build(), CmsShowMainBase::draw(), FWRPZView::eventBegin(), and FWRPZView::resetOrigin().
{ return m_beamSpot; }
TEveCaloDataHist* fireworks::Context::getCaloData | ( | ) | const [inline] |
Definition at line 81 of file Context.h.
References m_caloData.
Referenced by FWEveViewManager::highlightAdded(), FWCaloTowerProxyBuilderBase::setCaloData(), FWRPZView::setContext(), FW3DView::setContext(), and FWLegoViewBase::setContext().
{ return m_caloData; }
TEveCaloDataVec* fireworks::Context::getCaloDataHF | ( | ) | const [inline] |
Definition at line 82 of file Context.h.
References m_caloDataHF.
Referenced by FWHFTowerProxyBuilderBase::setCaloData(), and FWLegoViewBase::setContext().
{ return m_caloDataHF; }
FWMagField* fireworks::Context::getField | ( | ) | const [inline] |
Definition at line 78 of file Context.h.
References m_magField.
Referenced by FWTrackProxyBuilder::build(), FWMuonBuilder::buildMuon(), and CmsShowMainBase::draw().
{ return m_magField; }
const FWGeometry* fireworks::Context::getGeom | ( | ) | const [inline] |
Definition at line 84 of file Context.h.
References m_geom.
Referenced by FWPFCandidateWithHitsProxyBuilder::addHitsForCandidate(), FWCaloRecHitDigitSetProxyBuilder::build(), FWMuonBuilder::buildMuon(), FWViewGeometryList::FWViewGeometryList(), FWEventItem::getGeom(), fireworks::makeRhoPhiSuperCluster(), and fireworks::makeRhoZSuperCluster().
{ return m_geom; }
float Context::getMaxEnergyInEvent | ( | bool | isEt | ) | const |
Definition at line 201 of file Context.cc.
References m_maxEnergy, and m_maxEt.
Referenced by FWJetProxyBuilder::setTextPos(), and FWEveView::setupEnergyScale().
{ return isEt ? m_maxEt : m_maxEnergy; }
TEveTrackPropagator* fireworks::Context::getMuonTrackPropagator | ( | ) | const [inline] |
Definition at line 76 of file Context.h.
References m_muonPropagator.
Referenced by FWMuonBuilder::buildMuon(), CmsShowCommon::setDrawBreakMarkers(), and CmsShowCommon::setTrackBreakMode().
{ return m_muonPropagator; }
TEveTrackPropagator* fireworks::Context::getTrackerTrackPropagator | ( | ) | const [inline] |
Definition at line 75 of file Context.h.
References m_trackerPropagator.
Referenced by FWTrackProxyBuilder::build(), CmsShowCommon::setDrawBreakMarkers(), and CmsShowCommon::setTrackBreakMode().
{ return m_trackerPropagator; }
TEveTrackPropagator* fireworks::Context::getTrackPropagator | ( | ) | const [inline] |
Definition at line 74 of file Context.h.
References m_propagator.
Referenced by FWTrackProxyBuilder::build(), FWElectronLegoProxyBuilder::build(), FWSimTrackProxyBuilder::build(), FWElectronProxyBuilder::requestCommon(), CmsShowCommon::setDrawBreakMarkers(), and CmsShowCommon::setTrackBreakMode().
{ return m_propagator; }
void Context::initEveElements | ( | ) |
Definition at line 96 of file Context.cc.
References caloR1(), caloR2(), caloZ1(), caloZ2(), f, CmsShowCommon::getProjTrackBreaking(), CmsShowCommon::getRnrPTBMarkers(), m_beamSpot, m_caloData, m_caloDataHF, m_commonPrefs, m_magField, m_muonPropagator, m_propagator, m_trackerPropagator, Pi, ntuplemaker::status, fw3dlego::xbins, fw3dlego::xbins_hf, fw3dlego::xbins_hf_n, and fw3dlego::xbins_n.
Referenced by CmsShowMainBase::setup().
{ m_magField = new FWMagField(); m_beamSpot = new FWBeamSpot(); float propagatorOffR = 5; float propagatorOffZ = propagatorOffR*caloZ1(false)/caloR1(false); // common propagator, helix stepper m_propagator = new TEveTrackPropagator(); m_propagator->SetMagFieldObj(m_magField, false); m_propagator->SetMaxR(caloR2()-propagatorOffR); m_propagator->SetMaxZ(caloZ2()-propagatorOffZ); m_propagator->SetDelta(0.01); m_propagator->SetProjTrackBreaking(m_commonPrefs->getProjTrackBreaking()); m_propagator->SetRnrPTBMarkers(m_commonPrefs->getRnrPTBMarkers()); m_propagator->IncDenyDestroy(); // tracker propagator m_trackerPropagator = new TEveTrackPropagator(); m_trackerPropagator->SetStepper( TEveTrackPropagator::kRungeKutta ); m_trackerPropagator->SetMagFieldObj(m_magField, false); m_trackerPropagator->SetDelta(0.01); m_trackerPropagator->SetMaxR(caloR1()-propagatorOffR); m_trackerPropagator->SetMaxZ(caloZ2()-propagatorOffZ); m_trackerPropagator->SetProjTrackBreaking(m_commonPrefs->getProjTrackBreaking()); m_trackerPropagator->SetRnrPTBMarkers(m_commonPrefs->getRnrPTBMarkers()); m_trackerPropagator->IncDenyDestroy(); // muon propagator m_muonPropagator = new TEveTrackPropagator(); m_muonPropagator->SetStepper( TEveTrackPropagator::kRungeKutta ); m_muonPropagator->SetMagFieldObj(m_magField, false); m_muonPropagator->SetDelta(0.05); m_muonPropagator->SetMaxR(850.f); m_muonPropagator->SetMaxZ(1100.f); m_muonPropagator->SetProjTrackBreaking(m_commonPrefs->getProjTrackBreaking()); m_muonPropagator->SetRnrPTBMarkers(m_commonPrefs->getRnrPTBMarkers()); m_muonPropagator->IncDenyDestroy(); // general calo data { m_caloData = new TEveCaloDataHist(); m_caloData->IncDenyDestroy(); // Phi range is always in the (-Pi, Pi) without a shift. // Set wrap to false for the optimisation on TEveCaloData::GetCellList(). m_caloData->SetWrapTwoPi(false); Bool_t status = TH1::AddDirectoryStatus(); TH1::AddDirectory(kFALSE); //Keeps histogram from going into memory TH2F* dummy = new TH2F("background", "background", fw3dlego::xbins_n - 1, fw3dlego::xbins, 72, -1*TMath::Pi(), TMath::Pi()); TH1::AddDirectory(status); Int_t sliceIndex = m_caloData->AddHistogram(dummy); (m_caloData)->RefSliceInfo(sliceIndex).Setup("background", 0., 0); } // HF calo data { m_caloDataHF = new TEveCaloDataVec(1); m_caloDataHF->IncDenyDestroy(); m_caloDataHF->SetWrapTwoPi(false); m_caloDataHF->RefSliceInfo(0).Setup("bg", 0.3, kRed); m_caloDataHF->SetEtaBins(new TAxis(fw3dlego::xbins_hf_n - 1, fw3dlego::xbins_hf)); Double_t off = 10 * TMath::DegToRad(); m_caloDataHF->SetPhiBins(new TAxis(36, -TMath::Pi() -off, TMath::Pi() -off)); } }
FWJobMetadataManager* fireworks::Context::metadataManager | ( | ) | const [inline] |
Definition at line 70 of file Context.h.
References m_metadataManager.
Referenced by FWGUIManager::addData(), and CmsShowNavigator::getProcessList().
{ return m_metadataManager; }
FWModelChangeManager* fireworks::Context::modelChangeManager | ( | ) | const [inline] |
Definition at line 55 of file Context.h.
References m_changeManager.
Referenced by FWEventItem::changeManager(), and FWGUIManager::createList().
{ return m_changeManager; }
void Context::resetMaxEtAndEnergy | ( | ) | const |
Definition at line 192 of file Context.cc.
References m_maxEnergy, and m_maxEt.
Referenced by FWEveViewManager::eventBegin().
{ // should not be zero, problems with infinte bbox m_maxEnergy = 1.f; m_maxEt = 1.f; }
FWSelectionManager* fireworks::Context::selectionManager | ( | ) | const [inline] |
Definition at line 58 of file Context.h.
References m_selectionManager.
Referenced by FWGUIManager::createEDIFrame(), FWGUIManager::createList(), FWGUIManager::createModelPopup(), FWGUIManager::FWGUIManager(), FWViewContextMenuHandlerGL::select(), FWEveViewManager::selectionCleared(), FWEventItem::selectionManager(), FWGUIManager::showInvMassDialog(), and FWGUIManager::showSelectedModelContextMenu().
{ return m_selectionManager; }
void fireworks::Context::setGeom | ( | const FWGeometry * | x | ) | [inline] |
void Context::voteMaxEtAndEnergy | ( | float | Et, |
float | energy | ||
) | const |
Definition at line 185 of file Context.cc.
References m_maxEnergy, m_maxEt, and siStripFEDMonitor_P5_cff::Max.
Referenced by FWPFClusterRPZProxyBuilder::build(), FWPFEcalRecHitLegoProxyBuilder::build(), FWCaloRecHitDigitSetProxyBuilder::build(), FWPFPatJetLegoProxyBuilder< T >::build(), FWMET3DProxyBuilder::build(), FWCandidateLegoProxyBuilder::build(), FWPFEcalRecHitRPProxyBuilder::build(), FWPFCandidatesLegoProxyBuilder::build(), FWTauProxyBuilderBase::buildBaseTau(), FWJetProxyBuilder::buildViewType(), FWMETProxyBuilder::buildViewType(), FWPFBlockProxyBuilder::setupClusterElement(), FWPFClusterRPZProxyBuilder::sharedBuild(), FWPFClusterLegoProxyBuilder::sharedBuild(), FWRPZView::voteCaloMaxVal(), and FWEveView::voteCaloMaxVal().
{ m_maxEt = TMath::Max(et , m_maxEt ); m_maxEnergy = TMath::Max(energy, m_maxEnergy); }
FWBeamSpot* fireworks::Context::m_beamSpot [private] |
Definition at line 126 of file Context.h.
Referenced by getBeamSpot(), and initEveElements().
TEveCaloDataHist* fireworks::Context::m_caloData [private] |
Definition at line 133 of file Context.h.
Referenced by getCaloData(), and initEveElements().
TEveCaloDataVec* fireworks::Context::m_caloDataHF [private] |
Definition at line 134 of file Context.h.
Referenced by getCaloDataHF(), and initEveElements().
Definition at line 113 of file Context.h.
Referenced by modelChangeManager().
FWColorManager* fireworks::Context::m_colorManager [private] |
Definition at line 116 of file Context.h.
Referenced by colorManager().
CmsShowCommon* fireworks::Context::m_commonPrefs [private] |
Definition at line 128 of file Context.h.
Referenced by commonPrefs(), Context(), initEveElements(), and ~Context().
Definition at line 115 of file Context.h.
Referenced by eventItemsManager().
const FWGeometry* fireworks::Context::m_geom [private] |
FWMagField* fireworks::Context::m_magField [private] |
Definition at line 125 of file Context.h.
Referenced by getField(), and initEveElements().
float fireworks::Context::m_maxEnergy [mutable, private] |
Definition at line 131 of file Context.h.
Referenced by getMaxEnergyInEvent(), resetMaxEtAndEnergy(), and voteMaxEtAndEnergy().
float fireworks::Context::m_maxEt [mutable, private] |
Definition at line 130 of file Context.h.
Referenced by getMaxEnergyInEvent(), resetMaxEtAndEnergy(), and voteMaxEtAndEnergy().
Definition at line 117 of file Context.h.
Referenced by metadataManager().
TEveTrackPropagator* fireworks::Context::m_muonPropagator [private] |
Definition at line 123 of file Context.h.
Referenced by getMuonTrackPropagator(), and initEveElements().
TEveTrackPropagator* fireworks::Context::m_propagator [private] |
Definition at line 121 of file Context.h.
Referenced by getTrackPropagator(), and initEveElements().
Definition at line 114 of file Context.h.
Referenced by selectionManager().
TEveTrackPropagator* fireworks::Context::m_trackerPropagator [private] |
Definition at line 122 of file Context.h.
Referenced by getTrackerTrackPropagator(), and initEveElements().
const float Context::s_caloOffR = 10 [static, private] |
const float Context::s_caloOffZ = s_caloOffR/tan(s_caloTransAngle) [static, private] |
const float Context::s_caloR = s_caloZ*tan(s_caloTransAngle) [static, private] |
const float Context::s_caloTransAngle = 2*atan(exp(-s_caloTransEta)) [static, private] |
Definition at line 138 of file Context.h.
Referenced by caloTransAngle().
const float Context::s_caloTransEta = 1.479 [static, private] |
Definition at line 137 of file Context.h.
Referenced by caloTransEta().
const float Context::s_caloZ = 290 [static, private] |