Import Geant4 11.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2025-06-26 09:17:29 +02:00
parent 20a218bbe1
commit a499fb82e9
1941 changed files with 203285 additions and 95593 deletions
+51 -1
View File
@@ -6,10 +6,60 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-04-07 Gabriele Cosmo (opengl-V11-02-10)
## 2025-05-23 Andrea Barresi (opengl-V11-03-06)
- G4OpenGLWin32Viewer:
- Added SwitchToMasterThread method to draw trajectories at the end of run in MT mode.
## 2025-05-12 Andrea Barresi (opengl-V11-03-05)
- G4OpenGLQtViewer.cc:
- Fixed the original pick feature to show pick info window and removed the workaround.
## 2025-04-29 John Allison (opengl-V11-03-04)
- G4OpenGLQtViewer.cc:
- Restore pick information window (workaround) in the OGLSQt driver.
- For some reason - maybe recent "improvements" - the current pick feature
does not work. Investigation shows that information is picked, as designed,
but the pick information window does not show. So far, we have not
been able to find the problem - hence this workaround.
- This workaround is a single block of code, ll.4630-4661, that can easily
be removed if the original problem is understood and fixed.
- In this workaround, each picked object causes a window of information
to pop up. They are standalone windows, and may be kept or deleted. They
are cleaned up by Qt at end of job.
- Remove some commented out statements left over from the previous tag.
- With the introduction of the new scene tree, there should never be a
reason to use /vis/touchable/set commands. In fact to do so interferes
with the new scene tree.
## 2025-04-09 John Allison (opengl-V11-03-03)
- G4OpenGLQtViewer.cc:
- Comment out calls to TouchableSetVisibility/Colour.
- No longer needed since the introduction of the new scene tree.
- Actually interferes with the new scene tree.
- Comment out some debug printing to std::cout.
## 2025-04-07 Gabriele Cosmo (opengl-V11-03-02)
- Fixed compilation errors on Windows in G4OpenGLWin32Viewer, triggered when
enabling GL WIN32 support, as reported in problem report #2599.
## 2025-02-01 John Allison (opengl-V11-03-01)
- Co-works: visman-V11-03-02.
- G4OpenGLStoredViewer.cc:
- Follow changes in G4ViewParameters.
## 2025-01-06 John Allison (opengl-V11-03-00)
- Co-works: visman-V11-03-00, interfaces-V11-03-00, modeling-V11-03-00,
visQt3D-V11-03-00, vis_toolssg-V11-03-00, openinventor-V11-03-00,
greps-V11-03-00.
- Re-instate the transparency slider (see lengthy explanation in management/History).
- G4OpenGLImmediateSceneHandler:
- Minor improvement to comment.
- G4OpenGLStoredViewer:
- Initiate kernel visit if TransparencyByDepth or its options change.
- G4OpenGLStoredQtViewer:
- Initiate kernel visit if TransparencyByDepth or its options change.
- (Not sure the Qt viewer needs its own compare function.)
## 2024-09-13 John Allison (opengl-V11-02-09)
- G4OpenGLStoredQtSceneHandler.cc:
- G4OpenGLStoredQtSceneHandler::ClearStore():
@@ -45,6 +45,7 @@ public:
virtual ~G4OpenGLWin32Viewer ();
void SetView ();
void ShowView ();
void SwitchToMasterThread();
protected:
void GetWin32Connection ();
@@ -500,8 +500,8 @@ G4OpenGLQtViewer::~G4OpenGLQtViewer (
if (fSceneTreeWidget != NULL) {
if (fSceneTreeWidget->layout() != NULL) {
while ((wItem = fSceneTreeWidget->layout()->takeAt(0)) != 0) {
delete wItem->widget();
delete wItem;
delete wItem->widget();
delete wItem;
}
}
}
@@ -2688,8 +2688,6 @@ void G4OpenGLQtViewer::setCheckComponent(QTreeWidgetItem* item,bool check)
const PVPath& fullPath = fTreeItemModels[item->data(0,Qt::UserRole).toInt()];
// If a physical volume
if (fullPath.size() > 0) {
SetTouchable(fullPath);
TouchableSetVisibility(fullPath, check);
fMouseOnSceneTree = true;
}
}
@@ -3642,7 +3640,7 @@ void G4OpenGLQtViewer::changeColorAndTransparency(QTreeWidgetItem* item,int) {
}
void G4OpenGLQtViewer::changeColorAndTransparency(GLuint index, G4Color color) {
void G4OpenGLQtViewer::changeColorAndTransparency(GLuint index, G4Color /*color*/) {
// change vis attributes to set new colour
G4int iPO = index;
@@ -3650,8 +3648,6 @@ void G4OpenGLQtViewer::changeColorAndTransparency(GLuint index, G4Color color) {
const PVPath& fullPath = fTreeItemModels[iPO];
// If a physical volume
if (fullPath.size()) {
SetTouchable(fullPath);
TouchableSetColour(fullPath, color);
fMouseOnSceneTree = true;
}
}
@@ -4628,9 +4624,9 @@ void G4OpenGLQtViewer::updatePickInfosWidget(int aX, int aY) {
ed->setVisible((false));
ed->append(newStr.join(""));
std::cout << pickCoutButton->text().toStdString() << " "<< fPickInfosWidget->layout()->count()-1<< std::endl;
int tmp = fPickInfosWidget->layout()->count()-1;
connect(pickCoutButton, &QPushButton::clicked , [this, tmp](){ this->toggleSceneTreeComponentPickingCout(tmp);});
}
}
@@ -4671,6 +4667,7 @@ void G4OpenGLQtViewer::updatePickInfosWidget(int aX, int aY) {
}
// set picking cout visible
fPickInfosScrollArea->setVisible(true);
dial->show();
}
@@ -4707,8 +4704,6 @@ void G4OpenGLQtViewer::toggleSceneTreeComponentPickingCout(int pickItem) {
void G4OpenGLQtViewer::currentTabActivated(int currentTab) {
if (fUiQt->GetViewerTabWidget()->tabText(currentTab) == GetName().data()) {
createViewerPropertiesWidget();
// createPickInfosWidget(); // Causes a /vis/set/touchable command to do with...
// createSceneTreeWidget(); // ...this old scene tree widget (no longer used)
}
}
@@ -154,7 +154,9 @@ G4bool G4OpenGLStoredQtViewer::CompareForKernelVisit(G4ViewParameters& lastVP)
(lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ())||
(lastVP.IsPicking () != fVP.IsPicking ()) ||
(lastVP.IsSpecialMeshRendering() != fVP.IsSpecialMeshRendering()) ||
(lastVP.GetSpecialMeshRenderingOption() != fVP.GetSpecialMeshRenderingOption()))
(lastVP.GetSpecialMeshRenderingOption() != fVP.GetSpecialMeshRenderingOption()) ||
(lastVP.GetTransparencyByDepth() != fVP.GetTransparencyByDepth())
)
return true;
// Don't check VisAttributesModifiers if this comparison has been
@@ -205,6 +207,10 @@ G4bool G4OpenGLStoredQtViewer::CompareForKernelVisit(G4ViewParameters& lastVP)
(lastVP.GetSpecialMeshVolumes() != fVP.GetSpecialMeshVolumes()))
return true;
if (lastVP.GetTransparencyByDepth() > 0. &&
lastVP.GetTransparencyByDepthOption() != fVP.GetTransparencyByDepthOption())
return true;
return false;
}
@@ -101,7 +101,8 @@ G4bool G4OpenGLStoredViewer::CompareForKernelVisit(G4ViewParameters& lastVP) {
(lastVP.IsSpecialMeshRendering() !=
fVP.IsSpecialMeshRendering()) ||
(lastVP.GetSpecialMeshRenderingOption() !=
fVP.GetSpecialMeshRenderingOption())
fVP.GetSpecialMeshRenderingOption()) ||
(lastVP.GetTransparencyByDepth() != fVP.GetTransparencyByDepth())
)
return true;
@@ -141,6 +142,10 @@ G4bool G4OpenGLStoredViewer::CompareForKernelVisit(G4ViewParameters& lastVP) {
(lastVP.GetSpecialMeshVolumes() != fVP.GetSpecialMeshVolumes()))
return true;
if (lastVP.GetTransparencyByDepth() > 0. &&
lastVP.GetTransparencyByDepthOption() != fVP.GetTransparencyByDepthOption())
return true;
// Time window parameters operate on the existing database so no need
// to rebuild even if they change.
@@ -151,8 +156,8 @@ void G4OpenGLStoredViewer::DrawDisplayLists () {
// We moved these from G4OpenGLViewer to G4ViewParamaters. To avoid
// editing many lines below we introduce these convenient aliases.
#define CONVENIENT_DOUBLE_ALIAS(q) const G4double& f##q = fVP.Get##q();
#define CONVENIENT_BOOL_ALIAS(q) const G4bool& f##q = fVP.Is##q();
#define CONVENIENT_DOUBLE_ALIAS(q) const G4double& f##q = fVP.GetTimeParameters().f##q;
#define CONVENIENT_BOOL_ALIAS(q) const G4bool& f##q = fVP.GetTimeParameters().f##q;
CONVENIENT_DOUBLE_ALIAS(StartTime)
CONVENIENT_DOUBLE_ALIAS(EndTime)
CONVENIENT_DOUBLE_ALIAS(FadeFactor)
@@ -71,6 +71,15 @@ void G4OpenGLWin32Viewer::ShowView (
}
}
void G4OpenGLWin32Viewer::SwitchToMasterThread()
{
if (G4Threading::IsMultithreadedApplication()) {
if (fSceneHandler.GetScene() && fSceneHandler.GetScene()->GetEndOfEventModelList().size()) {
fNeedKernelVisit = true;
}
}
}
//////////////////////////////////////////////////////////////////////////////
void G4OpenGLWin32Viewer::GetWin32Connection (
)