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
+11 -3
View File
@@ -6,11 +6,19 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2025-03-14 I. Hrivnacova (analysis-V11-02-09)
## 2025-05-05 I. Hrivnacova (analysis-V11-03-03)
- New implementation of generic 'G4Analysis::GetHnType()'' and 'IsProfile()' functions
which does not rely on the histogram/profile name position in the long
type name provided via tools 's_class()'
## 2025-03-21 Ben Morgan (analysis-V11-03-02)
- Modernize g4tools macro-based for loops with range-based for
## 2025-03-14 I. Hrivnacova (analysis-V11-03-01)
- Removed false warnings about non-existing ntuple
and debug messages when filling inactivated ntuple
## 2025-01-09 Ben Morgan
## 2025-01-09 Ben Morgan (analysis-V11-03-00)
- Qualify use of `G4Accumulables` namespace to avoid clashes and order
dependence of inclusion of headers.
@@ -968,7 +976,7 @@ May 4, 2016 I. Hrivnacova (analysis-V10-02-02)
April 18, 2016 I. Hrivnacova (analysis-V10-02-01)
- Updated to g4tools 1.27.0 (Guy Barrand):
Fixed incompatibility with ROOT 5.x and 6.x formats reported in ROOT forum:
https://root.cern.ch/phpBB3/viewtopic.php?t=21315
https://root.cern/phpBB3/viewtopic.php?t=21315
December 8, 2015 I. Hrivnacova (analysis-V10-02-00)
- Fixed definition of /analysis/ntuple command directory
+1 -1
View File
@@ -679,7 +679,7 @@ May 4, 2016 I. Hrivnacova (analysis-V10-02-02)
April 18, 2016 I. Hrivnacova (analysis-V10-02-01)
- Updated to g4tools 1.27.0 (Guy Barrand):
Fixed incompatibility with ROOT 5.x and 6.x formats reported in ROOT forum:
https://root.cern.ch/phpBB3/viewtopic.php?t=21315
https://root.cern/phpBB3/viewtopic.php?t=21315
December 8, 2015 I. Hrivnacova (analysis-V10-02-00)
- Fixed definition of /analysis/ntuple command directory
+2 -6
View File
@@ -46,8 +46,7 @@ namespace {
void HD_style(tools::sg::plots& a_plots,float a_line_width) {
std::vector<tools::sg::plotter*> plotters;
a_plots.plotters(plotters);
tools_vforcit(tools::sg::plotter*,plotters,it) {
tools::sg::plotter* _plotter = *it;
for (auto* _plotter : plotters) {
_plotter->bins_style(0).line_width = a_line_width;
_plotter->inner_frame_style().line_width = a_line_width;
_plotter->grid_style().line_width = a_line_width;
@@ -105,9 +104,7 @@ void regions_style(tools::sg::plots& a_plots,float a_plotter_scale = 1) {
std::vector<tools::sg::plotter*> plotters;
a_plots.plotters(plotters);
tools_vforcit(tools::sg::plotter*,plotters,it) {
tools::sg::plotter* _plotter = *it;
for (auto* _plotter : plotters) {
_plotter->left_margin = _plotter->left_margin * wfac;
_plotter->right_margin = _plotter->right_margin * wfac;
_plotter->bottom_margin = _plotter->bottom_margin * hfac;
@@ -121,7 +118,6 @@ void regions_style(tools::sg::plots& a_plots,float a_plotter_scale = 1) {
_plotter->x_axis().label_height = _plotter->x_axis().label_height * hfac * label_cooking;
_plotter->y_axis().label_height = _plotter->y_axis().label_height * hfac * label_cooking;
}
}
@@ -93,7 +93,16 @@ G4String GetHnType()
G4String hnTypeLong = HT::s_class();
// tools::histo::h1d -> h1 etc.
return hnTypeLong.substr(14, 2);
std::size_t lastColon = hnTypeLong.rfind(":");
if (lastColon != G4String::npos && lastColon + 1 < hnTypeLong.length()) {
G4String potentialType = hnTypeLong.substr(lastColon + 1);
if (potentialType.length() >= 2 &&
(potentialType.substr(0, 1) == "h" || potentialType.substr(0, 1) == "p")) {
return potentialType.substr(0, 2);
}
}
G4cerr << "Warning: Could not extract short hnType for " << hnTypeLong << G4endl;
return "";
}
template <typename HT>
@@ -101,9 +110,9 @@ G4bool IsProfile()
{
// tools::histo::h1d etc.
G4String hnTypeLong = HT::s_class();
// tools::histo::h1d -> h1 etc.
return hnTypeLong[14] == 'p';
std::size_t length = hnTypeLong.length();
return (length >= 3 && hnTypeLong.substr(length - 3) == "p1d") ||
(length >= 3 && hnTypeLong.substr(length - 3) == "p2d");
}
// String conversion
@@ -179,8 +179,8 @@ void G4RootPNtupleManager::CreateNtupleFromMain(
}
else {
std::vector<tools::uint32> basketSizes;
tools_vforcit(tools::wroot::branch*, ntupleDescription->GetMainBranches(), it) {
basketSizes.push_back((*it)->basket_size());
for (const auto* branch : ntupleDescription->GetMainBranches()) {
basketSizes.push_back(branch->basket_size());
}
auto basketEntries = fMainNtupleManager->GetBasketEntries();