diff --git a/DDCore/src/gdml/GdmlPlugins.cpp b/DDCore/src/gdml/GdmlPlugins.cpp index 354236fb545f87ef0d8313a6ddb7af5eb6b18ca2..405e3922c866bfc6e3d437c34d7d88d23efb38b8 100644 --- a/DDCore/src/gdml/GdmlPlugins.cpp +++ b/DDCore/src/gdml/GdmlPlugins.cpp @@ -30,7 +30,7 @@ using namespace std; using namespace dd4hep; -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,13,1) +#if ROOT_VERSION_CODE >= ROOT_VERSION(6,13,0) /// ROOT GDML reader plugin /** diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp index ad2bf134dd80b153dfa46a3d15dc421bed9c115f..d0e6555073cfe67a6e0f3a3dcc03f7246d7a3bac 100644 --- a/DDCore/src/plugins/Compact2Objects.cpp +++ b/DDCore/src/plugins/Compact2Objects.cpp @@ -391,7 +391,9 @@ template <> void Converter<Material>::operator()(xml_h e) const { throw_print("Compact2Objects[ERROR]: Converting material:" + mname + " Element missing: " + nam); } mix->SetRadLen(0e0); - +#if ROOT_VERSION_CODE >= ROOT_VERSION(6,12,0) + mix->ComputeDerivedQuantities(); +#endif //fg: calling SetDensity for TGeoMixture results in incorrect radLen and intLen ( computed only from first element ) // // Update estimated density if not provided. // if ( has_density ) { diff --git a/DDG4/include/DDG4/Geant4PhysicsList.h b/DDG4/include/DDG4/Geant4PhysicsList.h index c0c6be12ca0cc35ae2433af8ead6f74e521c28e8..8b865a91d441775450fe4e81719b76ccde2e348c 100644 --- a/DDG4/include/DDG4/Geant4PhysicsList.h +++ b/DDG4/include/DDG4/Geant4PhysicsList.h @@ -169,6 +169,8 @@ namespace dd4hep { virtual void constructParticles(G4VUserPhysicsList* physics); /// Callback to construct processes (uses the G4 particle table) virtual void constructProcesses(G4VUserPhysicsList* physics); + /// Enable physics list: actions necessary to be propagated to Geant4. + virtual void enable(G4VUserPhysicsList* physics); }; /// The implementation of the single Geant4 physics list action sequence @@ -246,6 +248,8 @@ namespace dd4hep { virtual void constructParticles(G4VUserPhysicsList* physics); /// Execute sequence of G4 physics constructors virtual void constructPhysics(G4VModularPhysicsList* physics); + /// Enable physics list: actions necessary to be propagated to Geant4. + virtual void enable(G4VUserPhysicsList* physics); /// Extend physics list from factory: G4VUserPhysicsList* extensionList(); }; diff --git a/DDG4/src/Geant4Converter.cpp b/DDG4/src/Geant4Converter.cpp index 31efceb846d2ae04f69e370b133c7e8005378923..154db935300174f819062b57abebf744709664e8 100644 --- a/DDG4/src/Geant4Converter.cpp +++ b/DDG4/src/Geant4Converter.cpp @@ -864,7 +864,7 @@ void* Geant4Converter::handleLimitSet(LimitSet limitset, const set<const TGeoVol if (l.name == "step_length_max") g4->SetMaxAllowedStep(l.value*CLHEP::mm/units::mm); else if (l.name == "track_length_max") - g4->SetMaxAllowedStep(l.value*CLHEP::mm/units::mm); + g4->SetUserMaxTrackLength(l.value*CLHEP::mm/units::mm); else if (l.name == "time_max") g4->SetUserMaxTime(l.value*CLHEP::ns/units::ns); else if (l.name == "ekin_min") diff --git a/DDG4/src/Geant4Exec.cpp b/DDG4/src/Geant4Exec.cpp index 27f9cd15439ac4f445d5e5cd84a36a5ecb011a9f..1d211f938bfbea057c38158644e93ab32bb11379 100644 --- a/DDG4/src/Geant4Exec.cpp +++ b/DDG4/src/Geant4Exec.cpp @@ -593,6 +593,7 @@ int Geant4Exec::configure(Geant4Kernel& kernel) { physics->SetCuts(); if( DEBUG == printLevel() ) physics->DumpCutValuesTable(); #endif + phys_seq->enable(physics); runManager.SetUserInitialization(physics); // Construct the remaining user initialization in multi-threaded mode diff --git a/DDG4/src/Geant4PhysicsList.cpp b/DDG4/src/Geant4PhysicsList.cpp index fa70820b89fb5b4ca02f21149aa5c720e55e167c..a876ae7b609d0c086647e405ef04387ce4d2b2d5 100644 --- a/DDG4/src/Geant4PhysicsList.cpp +++ b/DDG4/src/Geant4PhysicsList.cpp @@ -277,6 +277,10 @@ void Geant4PhysicsList::constructProcesses(G4VUserPhysicsList* physics_pointer) } } +/// Enable physics list: actions necessary to be propagated to Geant4. +void Geant4PhysicsList::enable(G4VUserPhysicsList* /* physics */) { +} + /// Standard constructor Geant4PhysicsListActionSequence::Geant4PhysicsListActionSequence(Geant4Context* ctxt, const string& nam) : Geant4Action(ctxt, nam), m_transportation(false), m_decays(false), m_rangecut(0.7*CLHEP::mm) { @@ -377,3 +381,8 @@ void Geant4PhysicsListActionSequence::constructDecays(G4VUserPhysicsList* physic } } +/// Enable physics list: actions necessary to be propagated to Geant4. +void Geant4PhysicsListActionSequence::enable(G4VUserPhysicsList* physics_pointer) { + m_actors(&Geant4PhysicsList::enable, physics_pointer); +} +