From e443e084cead17e4eadf19eba34a8fba24dc80d7 Mon Sep 17 00:00:00 2001 From: Juraj Smiesko Date: Thu, 22 Feb 2024 11:08:57 +0100 Subject: [PATCH] Removing SimG4OpticalPhysicsList algorithm --- .../components/SimG4OpticalPhysicsList.cpp | 44 ------------------- .../src/components/SimG4OpticalPhysicsList.h | 25 ----------- 2 files changed, 69 deletions(-) delete mode 100644 DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.cpp delete mode 100644 DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.h diff --git a/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.cpp b/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.cpp deleted file mode 100644 index 8c02515..0000000 --- a/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "SimG4OpticalPhysicsList.h" - -// Geant4 -#include "G4VModularPhysicsList.hh" -#include "G4OpticalPhysics.hh" -#include "G4OpticalParameters.hh" - -DECLARE_COMPONENT(SimG4OpticalPhysicsList) - -SimG4OpticalPhysicsList::SimG4OpticalPhysicsList(const std::string& aType, const std::string& aName, const IInterface* aParent) -: AlgTool(aType, aName, aParent) { - declareInterface(this); - declareProperty("fullphysics", m_physicsListTool, "Handle for the full physics list tool"); -} - -SimG4OpticalPhysicsList::~SimG4OpticalPhysicsList() {} - -StatusCode SimG4OpticalPhysicsList::initialize() { - if (AlgTool::initialize().isFailure()) - return StatusCode::FAILURE; - - m_physicsListTool.retrieve().ignore(); - - return StatusCode::SUCCESS; -} - -StatusCode SimG4OpticalPhysicsList::finalize() { return AlgTool::finalize(); } - -G4VModularPhysicsList* SimG4OpticalPhysicsList::physicsList() { - // ownership passed to SimG4Svc which will register it in G4RunManager. To be deleted in ~G4RunManager() - G4VModularPhysicsList* physicsList = m_physicsListTool->physicsList(); - - G4OpticalPhysics* opticalPhysics = new G4OpticalPhysics(); // deleted in ~G4VModularPhysicsList() - physicsList->RegisterPhysics(opticalPhysics); - - auto* opticalParams = G4OpticalParameters::Instance(); - opticalParams->SetBoundaryInvokeSD(true); - opticalParams->SetProcessActivation("Cerenkov",true); - opticalParams->SetProcessActivation("Scintillation",true); - opticalParams->SetCerenkovTrackSecondariesFirst(true); - opticalParams->SetScintTrackSecondariesFirst(true); - - return physicsList; -} diff --git a/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.h b/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.h deleted file mode 100644 index 386abd3..0000000 --- a/DRsim/DRsimG4Full/src/components/SimG4OpticalPhysicsList.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef SimG4OpticalPhysicsList_h -#define SimG4OpticalPhysicsList_h 1 - -// Gaudi -#include "GaudiKernel/AlgTool.h" -#include "GaudiKernel/ToolHandle.h" - -// FCCSW -#include "k4Interface/ISimG4PhysicsList.h" - -class SimG4OpticalPhysicsList : public AlgTool, virtual public ISimG4PhysicsList { -public: - explicit SimG4OpticalPhysicsList(const std::string& aType, const std::string& aName, const IInterface* aParent); - virtual ~SimG4OpticalPhysicsList(); - - virtual StatusCode initialize(); - virtual StatusCode finalize(); - virtual G4VModularPhysicsList* physicsList(); - -private: - /// Handle for the full physics list tool - ToolHandle m_physicsListTool{"SimG4FtfpBert", this, true}; -}; - -#endif