30 #include "TEveScene.h"
31 #include "TEveSceneInfo.h"
32 #include "TEveWindow.h"
33 #include "TEveManager.h"
35 #include "TGeoVolume.h"
36 #include "TGeoMatrix.h"
37 #include "TGeoShape.h"
39 #include "TGeoMatrix.h"
40 #include "TGeoManager.h"
42 #include "TGLViewer.h"
43 #include "KeySymbols.h"
45 #include "TGNumberEntry.h"
46 #include "TGListBox.h"
48 #include "TEveViewer.h"
49 #include "TGeoOverlap.h"
56 m_applyButton(nullptr),
57 m_listOptionButton(nullptr),
58 m_tableManager(nullptr),
61 m_path(this,
"Path:", std::
string(
"/cms:World_1/cms:CMSE_1")),
62 m_precision(this,
"Precision", 0.05, 0.000001, 10),
63 m_listAllNodes(this,
"ListAllNodes",
true),
64 m_rnrOverlap(this,
"Overlap",
true),
65 m_rnrExtrusion(this,
"Extrusion",
true),
66 m_drawPoints(this,
"DrawPoints",
true),
67 m_pointSize(this,
"PointSize", 4
l, 0
l, 10
l),
68 m_extrusionMarkerColor(this,
"ExtrusionMarkerColor", 0
l, 0
l, 20
l),
69 m_overlapMarkerColor(this,
"OverlapMarkerColor", 9
l, 0
l, 20
l) {
71 TGHorizontalFrame* hp =
new TGHorizontalFrame(
m_frame);
75 hp->AddFrame(
m_viewBox,
new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0));
79 TGTextButton* rb =
new TGTextButton(hp,
"CdTop");
80 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
81 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdTop()");
85 TGTextButton* rb =
new TGTextButton(hp,
"CdUp");
86 hp->AddFrame(rb,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
87 rb->Connect(
"Clicked()",
"FWGeometryTableViewBase",
this,
"cdUp()");
90 hp->AddFrame(
new TGLabel(hp,
"Precision:"),
new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2));
95 TGNumberFormat::kNESReal,
96 TGNumberFormat::kNEAAnyNumber,
97 TGNumberFormat::kNELLimitMinMax,
100 hp->AddFrame(
m_numEntry,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
101 m_numEntry->Connect(
"ValueSet(Long_t)",
"FWOverlapTableView",
this,
"precisionCallback(Long_t)");
107 m_listOptionButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"setListAllNodes()");
108 hp->AddFrame(
m_listOptionButton,
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 0, 1, 1));
112 hp->AddFrame(
m_applyButton,
new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0));
113 m_applyButton->Connect(
"Clicked()",
"FWOverlapTableView",
this,
"recalculate()");
116 m_frame->AddFrame(hp,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 4, 2, 2, 0));
122 #if ROOT_VERSION_CODE < ROOT_VERSION(5, 32, 0)
123 m_eveScene =
new FWGeoTopNodeEveScene(gls,
"TopGeoNodeScene",
"");
125 m_eveScene =
new TEveScene(gls,
"TopGeoNodeScene",
"");
131 m_eveTopNode->SetElementNameTitle(
"overlapNode",
"opverlapNodetitle");
142 m_marker->Reset(TEveQuadSet::kQT_FreeQuad, kFALSE, 32);
144 m_marker->SetAlwaysSecSelect(kTRUE);
204 (*it)->setFrom(iFrom);
271 std::cout <<
"=============================================================================" << std::endl
283 using namespace TMath;
288 for (
int i = 0;
i <
m_marker->GetPlex()->Size(); ++
i) {
290 TEveQuadSet::QFreeQuad_t*
q = (TEveQuadSet::QFreeQuad_t*)
m_marker->GetDigit(
i);
296 for (std::vector<int>::iterator
j = id->
m_nodes.begin();
j <
id->m_nodes.end(); ++
j) {
312 gEve->FullRedraw3D(
false,
true);
void precisionCallback(Long_t)
TGTextButton * m_applyButton
bool isNodeRendered(int idx, int top_node_idx) const
FWGeoTopNode * m_eveTopNode
FWGeoTopNode * m_eveTopNode
const_iterator begin() const
FWBoolParameter m_rnrOverlap
FWOverlapTableView(TEveWindowSlot *iParent, FWColorManager *colMng)
void populateController(ViewerParameterGUI &) const override
FWEveDigitSetScalableMarker * m_marker
FWBoolParameter m_listAllNodes
void setCheckerState(bool)
~FWOverlapTableView() override
ViewerParameterGUI & requestTab(const char *)
const FWConfiguration * m_viewersConfig
FWGeometryTableManagerBase * getTableManager() override
ViewerParameterGUI & separator()
void setFrom(const FWConfiguration &) override
std::vector< FWParameterBase * >::const_iterator const_iterator
virtual void refreshTable3D()
int getFirstSelectedTableIndex()
void printOverlaps(int) const
void refreshTable3D() override
FWBoolParameter m_drawPoints
FWDoubleParameter m_precision
FWGeoTopNodeGLScene * m_scene
void setLevelOffset(int x)
bool listAllNodes() const
void chosenItem(int x) override
std::vector< int > m_nodes
FWBoolParameter m_rnrExtrusion
const_iterator end() const
FWLongParameter m_topNodeIdx
uint16_t const *__restrict__ x
TGNumberEntry * m_numEntry
TGCheckButton * m_listOptionButton
TGCompositeFrame * m_frame
void populateController(ViewerParameterGUI &) const override
virtual TEveElement * getEveGeoElement() const
ViewerParameterGUI & addParam(const FWParameterBase *)
sigc::signal< void, T > changed_
int getTopNodeIdx() const
FWLongParameter m_extrusionMarkerColor
const FWConfiguration * valueForKey(const std::string &iKey) const
FWLongParameter m_pointSize
FWLongParameter m_overlapMarkerColor
FWOverlapTableManager * m_tableManager
static const std::string sUpdateMsg
virtual void chosenItem(int)
const std::string & name() const
void importOverlaps(std::string path, double precision)