diff --git a/DDG4/plugins/Geant4OpticalPhotonPhysics.cpp b/DDG4/plugins/Geant4OpticalPhotonPhysics.cpp index e67d5794d3f6040d82079d5171ec75058866d299..0964dca43167f52245b69a772097c03b21ebaf8d 100644 --- a/DDG4/plugins/Geant4OpticalPhotonPhysics.cpp +++ b/DDG4/plugins/Geant4OpticalPhotonPhysics.cpp @@ -67,6 +67,7 @@ namespace dd4hep { : Geant4PhysicsList(ctxt, nam) { declareProperty("VerboseLevel", m_verbosity = 0); + declareProperty("BoundaryInvokeSD", m_boundaryInvokeSD = false); } /// Default destructor virtual ~Geant4OpticalPhotonPhysics() = default; @@ -92,11 +93,15 @@ namespace dd4hep { params->SetRayleighVerboseLevel(m_verbosity); params->SetMieVerboseLevel(m_verbosity); params->SetBoundaryVerboseLevel(m_verbosity); + params->SetBoundaryInvokeSD(m_boundaryInvokeSD); #else fAbsorptionProcess->SetVerboseLevel(m_verbosity); fRayleighScatteringProcess->SetVerboseLevel(m_verbosity); fMieHGScatteringProcess->SetVerboseLevel(m_verbosity); fBoundaryProcess->SetVerboseLevel(m_verbosity); +#if G4VERSION_NUMBER >= 1000 + fBoundaryProcess->SetInvokeSD(m_boundaryInvokeSD); +#endif #endif G4ProcessManager* pmanager = particle->GetProcessManager(); pmanager->AddDiscreteProcess(fAbsorptionProcess); @@ -106,6 +111,7 @@ namespace dd4hep { } private: int m_verbosity; + bool m_boundaryInvokeSD; }; } } diff --git a/DDG4/plugins/Geant4ScintillationPhysics.cpp b/DDG4/plugins/Geant4ScintillationPhysics.cpp index ed486895da5fd250d8cb6b08c81d295524c6ec55..e58b602fa64730ba29fd3253c533d1a698db17d3 100644 --- a/DDG4/plugins/Geant4ScintillationPhysics.cpp +++ b/DDG4/plugins/Geant4ScintillationPhysics.cpp @@ -71,6 +71,8 @@ namespace dd4hep { declareProperty("FiniteRiseTime", m_finiteRiseTime = false); declareProperty("TrackSecondariesFirst", m_trackSecondariesFirst = false); declareProperty("StackPhotons", m_stackPhotons = true); + declareProperty("ByParticleType", m_byParticleType = false); + declareProperty("TrackInfo", m_trackInfo = false); declareProperty("VerboseLevel", m_verbosity = 0); } /// Default destructor @@ -92,15 +94,23 @@ namespace dd4hep { params->SetScintTrackSecondariesFirst(m_trackSecondariesFirst); params->SetScintYieldFactor(m_scintillationYieldFactor); params->SetScintExcitationRatio(m_scintillationExcitationRatio); + params->SetScintByParticleType(m_byParticleType); + params->SetScintTrackInfo(m_trackInfo); #else process->SetVerboseLevel(m_verbosity); process->SetFiniteRiseTime(m_finiteRiseTime); -#if G4VERSION_NUMBER>1030 +#if G4VERSION_NUMBER >= 1030 process->SetStackPhotons(m_stackPhotons); #endif process->SetTrackSecondariesFirst(m_trackSecondariesFirst); process->SetScintillationYieldFactor(m_scintillationYieldFactor); process->SetScintillationExcitationRatio(m_scintillationExcitationRatio); +#if G4VERSION_NUMBER >= 940 + process->SetScintByParticleType(m_byParticleType); +#endif +#if G4VERSION_NUMBER >= 1030 + process->SetScintTrackInfo(m_trackInfo); +#endif #endif // Use Birks Correction in the Scintillation process if ( G4Threading::IsMasterThread() ) { @@ -128,6 +138,8 @@ namespace dd4hep { bool m_stackPhotons; bool m_finiteRiseTime; bool m_trackSecondariesFirst; + bool m_byParticleType; + bool m_trackInfo; }; } }