Import Geant4 11.1.2 source tree

This commit is contained in:
Gabriele Cosmo
2023-06-19 17:17:14 +02:00
parent 84a556a9dc
commit aef78ca386
309 changed files with 35572 additions and 34678 deletions
+5
View File
@@ -6,6 +6,11 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2023-06-09 I. Hrivnacova (analysis-V11-00-28)
- Fixed creating histograms with user defined bins
- bug report #2541
- Improved 'FillH*'' debug message
## 2022-11-28 I. Hrivnacova (analysis-V11-00-27)
- Implemented analysis manager list command (missing in analysis-V11-00-10):
/analysis/ntuple/list [onlyIfActive]
@@ -189,10 +189,10 @@ G4bool G4THnToolsManager<DIM, HT>::Fill(G4int id,
G4String dims("xyz");
G4String message = " id " + to_string(id);
for (unsigned int idim = 0; idim < DIM; ++idim) {
auto xyz = dims[idim];
auto xyz = dims.substr(idim,1);
message +=
xyz + to_string(value[idim]) + " " +
xyz + "fcn(" + xyz + "value/" + xyz + "xunit) " + to_string(newValue[idim]);
" " + xyz + " " + to_string(value[idim]) + " " +
xyz + "fcn(" + xyz + "value/" + xyz + "unit) " + to_string(newValue[idim]);
}
message += " weight " + to_string(weight);
@@ -121,7 +121,9 @@ void Update(
}
if (binScheme == G4BinScheme::kUser) {
G4Analysis::ComputeEdges(bins.fEdges, unit, fcn, bins.fEdges);
std::vector<G4double> edges = bins.fEdges;
bins.fEdges.clear();
G4Analysis::ComputeEdges(edges, unit, fcn, bins.fEdges);
}
}
@@ -163,18 +165,30 @@ G4bool CheckDimension(unsigned int idim,
result = false;
}
// Check edges
if ( dimension.fEdges.empty() && (info.fBinScheme == G4BinScheme::kUser) ) {
Warn("Illegal value of number of " + xyz.substr(idim,1) + " edges vector size",
// Check min/max
if ( (dimension.fMaxValue <= dimension.fMinValue) &&
(info.fBinScheme != G4BinScheme::kUser) ) {
Warn("Illegal value of " + xyz.substr(idim,1) + " (min >= max)",
kNamespaceName, "CheckDimension");
result = false;
}
// Check min/max
if ( dimension.fMaxValue <= dimension.fMinValue ) {
Warn("Illegal value of " + xyz.substr(idim,1) + " (min >= max)",
kNamespaceName, "CheckDimension");
result = false;
// Check edges
if (info.fBinScheme == G4BinScheme::kUser) {
if ( dimension.fEdges.empty() ) {
Warn(xyz.substr(idim,1) + " edges vector is empty.",
kNamespaceName, "CheckDimension");
result = false;
}
// the edges values must be defined in increasing order
for (size_t i = 1; i < dimension.fEdges.size(); ++i){
if (dimension.fEdges[i-1] >= dimension.fEdges[i]) {
Warn(xyz.substr(idim,1) +
" edges vector values must be defined in increasing order.",
kNamespaceName, "CheckDimension");
result = false;
}
}
}
// Check function
@@ -37,7 +37,7 @@ template <typename HT>
G4bool G4RootHnFileManager<HT>::Write(
tools::wroot::directory* directory, HT* ht, const G4String& htName)
{
// write histpgram
// write histogram
return to(*directory, *ht, htName);
}