From af947fe94bfd4cbd85974e5016bac8db1c97655a Mon Sep 17 00:00:00 2001 From: kochebina Date: Tue, 2 Apr 2024 15:17:16 +0200 Subject: [PATCH 1/3] cosmetics for 9.4 --- CMakeLists.txt | 10 +- Gate.cc | 3 +- GateHitConvertor.cc | 204 ----------------------------------------- readme.md | 2 +- release_notes/v9.4.txt | 69 ++++++++++++++ 5 files changed, 75 insertions(+), 213 deletions(-) delete mode 100644 GateHitConvertor.cc create mode 100644 release_notes/v9.4.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index be2d046c9..90c7771ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,9 +67,6 @@ ELSE() ENDIF() set(CMAKE_CXX_STANDARD ${Geant4_CXX_STANDARD}) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - #========================================================= # Refuse to build with MT geant4, allow dev override IF(Geant4_multithreaded_FOUND) @@ -315,15 +312,14 @@ MESSAGE("Your current Geant4 version is ${Geant4_VERSION}") #========================================================= # Display message about this version -MESSAGE("IMPORTANT! This version of GATE (9.3) is version of passage for new digitizer.") +MESSAGE("IMPORTANT! This version of GATE (9.4) has still some traces of passage for new digitizer.") MESSAGE("Please, be aware that some of functionalities are NOT YET re-implemented: ") MESSAGE("- Coincidence digitizer modules (combining of several Coincidence Sorters)") -MESSAGE("- Compton Camera digitizer modules and output") MESSAGE("- Output: Sinogram, Ecat7, LMF") MESSAGE("- ARF may work not properly yet") MESSAGE("We apologize for this inconvenience and kindly ask for your patience.") -MESSAGE("This functionalities will be added during 2023.") -MESSAGE("Meanwhile, please, use Gate 9.2") +MESSAGE("This functionalities will be added during 2024.") +MESSAGE("Meanwhile, please, use Gate 9.3") diff --git a/Gate.cc b/Gate.cc index 62ef53987..9c0088cbf 100644 --- a/Gate.cc +++ b/Gate.cc @@ -158,12 +158,13 @@ void welcome() { GateMessage("Core", 0, G4endl); GateMessage("Core", 0, "*******************************************************" << G4endl); - GateMessage("Core", 0, " GATE version 9.3 (2023)" << G4endl); + GateMessage("Core", 0, " GATE version 9.4 (2024)" << G4endl); GateMessage("Core", 0, " Copyright : OpenGATE Collaboration" << G4endl); GateMessage("Core", 0, " Reference : Phys. Med. Biol. 49(19) 4543-4561 2004 " << G4endl); GateMessage("Core", 0, " Reference : Phys. Med. Biol. 56(4) 881-901 2011 " << G4endl); GateMessage("Core", 0, " Reference : Med. Phys. 41(6) 1-14 2014" << G4endl); GateMessage("Core", 0, " Reference : Phys. Med. Biol. 66(10) 1-23 2021" << G4endl); + GateMessage("Core", 0, " Reference : Frontiers in Physics, 12 2024" << G4endl); GateMessage("Core", 0, " http://www.opengatecollaboration.org " << G4endl); GateMessage("Core", 0, "*******************************************************" << G4endl); #ifdef GATE_USE_GPU diff --git a/GateHitConvertor.cc b/GateHitConvertor.cc deleted file mode 100644 index 22f3c894c..000000000 --- a/GateHitConvertor.cc +++ /dev/null @@ -1,204 +0,0 @@ -/*---------------------- - Copyright (C): OpenGATE Collaboration - - This software is distributed under the terms - of the GNU Lesser General Public Licence (LGPL) - See LICENSE.md for further details - ----------------------*/ - -#include "GateHitConvertor.hh" - -#include "G4UnitsTable.hh" - -#include "GateHitConvertorMessenger.hh" -#include "GateTools.hh" -#include "GateDigitizer.hh" -#include "GateConfiguration.h" - -const G4String GateHitConvertor::theOutputAlias = "Hits"; - - -GateHitConvertor* GateHitConvertor::GetInstance() -{ - static GateHitConvertor* theHitConvertor = 0; - - if (!theHitConvertor) - theHitConvertor = new GateHitConvertor(); - - return theHitConvertor; -} - -GateHitConvertor::GateHitConvertor() - : GateClockDependent("digitizer/convertor",false) -{ - m_messenger = new GateHitConvertorMessenger(this); -} - - - - -GateHitConvertor::~GateHitConvertor() -{ - delete m_messenger; -} - - - -GatePulseList* GateHitConvertor::ProcessHits(const GateCrystalHitsCollection* hitCollection) -{ - if (!hitCollection) - return 0; - - size_t n_hit = hitCollection->entries(); - if (nVerboseLevel==1) - G4cout << "[GateHitConvertor::ProcessHits]: " - "processing hit-collection with " << n_hit << " entries\n"; - if (!n_hit) - return 0; - - - GatePulseList* pulseList = new GatePulseList(GetObjectName()); - - size_t i; - for (i=0;i1) - G4cout << "[GateHitConvertor::ProcessHits]: processing hit[" << i << "]\n"; - - if((*hitCollection)[i]->GetEdep()==0){ - if (nVerboseLevel>1) - G4cout << "[GateHitConvertor::ProcessOneHit]: energy is null for " << *(*hitCollection)[i] << " -> hit ignored\n\n"; - } - else{ - ProcessOneHit( (*hitCollection)[i], pulseList); - } - - - } - - if (nVerboseLevel>1) { - G4cout << "[GateHitConvertor::ProcessHits]: returning pulse-list with " << pulseList->size() << " entries\n"; - for (i=0; isize(); i++) - G4cout << *((*pulseList)[i]) << Gateendl; - G4cout << Gateendl; - } - - GateDigitizer::GetInstance()->StorePulseList(pulseList); - GateDigitizer::GetInstance()->StorePulseListAlias(GetOutputAlias(),pulseList); - - return pulseList; -} - - - GatePulseList* GateHitConvertor::ProcessHits(std::vector vhitCollection){ - - size_t n_hit = vhitCollection.size(); - if (nVerboseLevel==1) - G4cout << "[GateHitConvertor::ProcessHits]: " - "processing hit-collection with " << n_hit << " entries\n"; - if (!n_hit) - return 0; - - GatePulseList* pulseList = new GatePulseList(GetObjectName()); - - size_t i; - for (i=0;i1) - G4cout << "[GateHitConvertor::ProcessHits]: processing hit[" << i << "]\n"; - //Here no problem - // ProcessOneHit( (std::make_shared(vhitCollection.at(i))).get(), pulseList); - ProcessOneHit(vhitCollection.at(i), pulseList); - } - - if (nVerboseLevel==1) { - G4cout << "[GateHitConvertor::ProcessHits]: returning pulse-list with " << pulseList->size() << " entries\n"; - for (i=0; isize(); i++) - G4cout << *((*pulseList)[i]) << Gateendl; - G4cout << Gateendl; - } - - GateDigitizer::GetInstance()->StorePulseList(pulseList); - GateDigitizer::GetInstance()->StorePulseListAlias(GetOutputAlias(),pulseList); - - return pulseList; -} - -void GateHitConvertor::ProcessOneHit(const GateCrystalHit* hit,GatePulseList* pulseList) -{ - /*if (hit->GetEdep()==0) { - if (nVerboseLevel>1) - G4cout << "[GateHitConvertor::ProcessOneHit]: energy is null for " << *hit << " -> hit ignored\n\n"; - return; - }*/ - - GatePulse* pulse = new GatePulse(hit); - - pulse->SetRunID( hit->GetRunID() ); - - //G4cout << "HitConvertor : eventID = " << hit->GetEventID() << Gateendl; - //G4cout << "HitConvertor : edep = " << hit->GetEdep() << Gateendl; - - - pulse->SetEventID( hit->GetEventID() ); - pulse->SetSourceID( hit->GetSourceID() ); - pulse->SetSourcePosition( hit->GetSourcePosition() ); - pulse->SetTime( hit->GetTime() ); - pulse->SetEnergy( hit->GetEdep() ); - pulse->SetMaxEnergy( hit->GetEdep() ); - pulse->SetLocalPos( hit->GetLocalPos() ); - pulse->SetGlobalPos( hit->GetGlobalPos() ); - pulse->SetPDGEncoding( hit->GetPDGEncoding() ); - pulse->SetOutputVolumeID( hit->GetOutputVolumeID() ); - pulse->SetNPhantomCompton( hit->GetNPhantomCompton() ); - pulse->SetNCrystalCompton( hit->GetNCrystalCompton() ); - pulse->SetNPhantomRayleigh( hit->GetNPhantomRayleigh() ); - pulse->SetNCrystalRayleigh( hit->GetNCrystalRayleigh() ); - pulse->SetComptonVolumeName( hit->GetComptonVolumeName() ); - pulse->SetRayleighVolumeName( hit->GetRayleighVolumeName() ); - pulse->SetVolumeID( hit->GetVolumeID() ); - pulse->SetScannerPos( hit->GetScannerPos() ); - pulse->SetScannerRotAngle( hit->GetScannerRotAngle() ); -#ifdef GATE_USE_OPTICAL - pulse->SetOptical( hit->GetPDGEncoding() == -22 ); -#endif - pulse->SetNSeptal( hit->GetNSeptal() ); // HDS : septal penetration - - // AE : Added for IdealComptonPhot adder which take into account several Comptons in the same volume - pulse->SetPostStepProcess(hit->GetPostStepProcess()); - pulse->SetEnergyIniTrack(hit->GetEnergyIniTrack()); - pulse->SetEnergyFin(hit->GetEnergyFin()); - pulse->SetProcessCreator(hit->GetProcess()); - pulse->SetTrackID(hit->GetTrackID()); - pulse->SetParentID(hit->GetParentID()); - pulse->SetSourceEnergy(hit->GetSourceEnergy()); - pulse->SetSourcePDG(hit->GetSourcePDG()); - pulse->SetNCrystalConv( hit->GetNCrystalConv() ); - - - -//------------------------------------------------- - - - - if (hit->GetComptonVolumeName().empty()) { - pulse->SetComptonVolumeName( "NULL" ); - pulse->SetSourceID( -1 ); - } - - if (hit->GetRayleighVolumeName().empty()) { - pulse->SetRayleighVolumeName( "NULL" ); - pulse->SetSourceID( -1 ); - } - - if (nVerboseLevel>1) - G4cout << "[GateHitConvertor::ProcessOneHit]: \n" - << "\tprocessed " << *hit << Gateendl - << "\tcreated new pulse:\n" - << *pulse << Gateendl; - - pulseList->push_back(pulse); -} - -void GateHitConvertor::DescribeMyself(size_t indent) -{ - G4cout << GateTools::Indent(indent) << "Convert hits into pulses for '" << GateDigitizer::GetInstance()->GetObjectName() << "'\n"; -} diff --git a/readme.md b/readme.md index d0871749b..e8d0d2957 100644 --- a/readme.md +++ b/readme.md @@ -15,7 +15,7 @@ More details : http://www.opengatecollaboration.org Documentation : https://opengate.readthedocs.io -* The stable version is tag 9.3: https://github.com/OpenGATE/Gate/tree/v9.3 with Geant4 11.1 +* The stable version is tag 9.4: https://github.com/OpenGATE/Gate/tree/v9.4 with Geant4 11.2.1 * The current development version is branch 'develop' (default): http://github.com/OpenGATE/Gate/tree/develop * [Benchmarks](https://github.com/OpenGATE/GateBenchmarks) * [Examples](https://github.com/OpenGATE/GateContrib) diff --git a/release_notes/v9.4.txt b/release_notes/v9.4.txt new file mode 100644 index 000000000..ff5956a37 --- /dev/null +++ b/release_notes/v9.4.txt @@ -0,0 +1,69 @@ +# *ooooOOOO0000OOOOoooo* # +# # +# GATE v9.3 # +# # +# 02/2023 # +# # +# *ooooOOOO0000OOOOoooo* # + + +This version is intended to be used with Geant4 11.1 only. +Gate cannot be compiled with earlier Geant4 versions. +It *may* works with other ROOT, ITK, libtorch version but it is not tested. + +Dependencies: +- Geant4: v11.2.1 (cxx17 is required) +- ROOT: v6-24-06 (must be compiled with -DCMAKE_CXX_STANDARD=17) +- ITK: v5.2.0 (with RTK enabled) +- libtorch: v1.10.1 + + +----------------- +Main new features +----------------- + +- Possible changes in results (bug corrections): +1) Since Geant4 version 11.0, a time threshold for the radioactive decay of ions has been introduced: +https://geant4-userdoc.web.cern.ch/UsersGuides/ForApplicationDeveloper/html/TrackingAndPhysics/physicsProcess.html?highlight=thresholdforverylongdecaytime#note-on-the-time-threshold-for-radioactive-decay-of-ions +in GateVProcess.cc l.35 + + +- Bug corrections: +1) Add MixMaxRng as an option to the list of random engines PR #665 +2) Digitizer merger simplification PR #658 +3) Compton Camer digitzer modules are adapted to GND PR #657 +4) Digitizer modules adapted: Crosstalk, Buffer, IntrinsicResolution +5) Fixed forced detection fixes PR #646 +6) Fixing Memory leaks in GND +7) Add a "invert" command for filters of actors PR #614 +8) DNA physics lists and DNA Activator from G4 PR #610 +9) Coincidence Digitizer: main module PR #605 + +From 9.3 version: +1) Some of functionalities are temporarily disabled: + - Coincidence digitizers + - Outputs: Sino, LMF, Ecat7 + +New features: +1) vpgTLE-tt: new TLE of prompt gamma with time tagging +2) BioDose Actor + +- additional Benchmarks +https://github.com/OpenGATE/GateBenchmarks + +---------- +Gate Tools +---------- + +- add Digitizer macro convertion tool +gt_digi_mac_converter in https://github.com/OpenGATE/GateTools/ + +------------- +Documentation +------------- + +GATE home page: http://www.opengatecollaboration.org +GATE documentation: https://opengate.readthedocs.io +GATE examples: https://github.com/OpenGATE/GateContrib +GATE benchmarks: https://github.com/OpenGATE/GateBenchmarks +GATE tools: https://github.com/OpenGATE/GateTools From 9d38dcdb78b7ae25c8d7830790dc7be8a8f90060 Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Thu, 4 Apr 2024 08:57:17 +0200 Subject: [PATCH 2/3] Remove t32_isotope until the patch --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c508f813..eede25bd1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -298,7 +298,6 @@ jobs: t29_optical_digi, t30_dna, t31_vpgTLE-tt, - t32_isotopes, t33_invert_filter, t34_biodose_actor] From a208fcb4ff047e48a9a06b1bb3e2fbac23be3613 Mon Sep 17 00:00:00 2001 From: Thomas BAUDIER Date: Thu, 4 Apr 2024 09:07:13 +0200 Subject: [PATCH 3/3] Update doc for 9.4 --- docs/compilation_instructions.rst | 30 +++++++++++++++--------------- docs/installation.rst | 7 +------ release_notes/v9.4.txt | 6 +++--- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/docs/compilation_instructions.rst b/docs/compilation_instructions.rst index bd773caae..54526e18c 100644 --- a/docs/compilation_instructions.rst +++ b/docs/compilation_instructions.rst @@ -1,6 +1,6 @@ .. _compilation_instructions-label: -Compiling GATE V9.2 +Compiling GATE V9.4 ===================== @@ -35,9 +35,9 @@ Direct dependencies of GATE --------------------------- -For compiling GATE V9.2, the required dependencies are +For compiling GATE V9.4, the required dependencies are -* Geant4 11 (available in http://geant4.web.cern.ch/geant4/support/download.shtml), but remains backward compatible with 10.7 also. +* Geant4 11.2.1 (available in http://geant4.web.cern.ch/geant4/support/download.shtml). * ROOT (ROOT 6.xx) # still required, but it may become optional in the future Geant4 needs to be compiled. ROOT is avalaible as binary on some platform (or has to be compiled) @@ -133,19 +133,19 @@ In some configuration, the following path should also be set :: We recommend you to use libtorch version 1.10.1 but other version may works. You can download libtorch from (pytorch)[https://pytorch.org/get-started/locally], select "LibTorch" in the matrix. -GATE V9.2 +GATE V9.4 --------- -First, download the GATE sources at this address: https://github.com/OpenGATE/Gate/archive/v9.2.zip +First, download the GATE sources at this address: https://github.com/OpenGATE/Gate/archive/v9.4.zip Unzip the downloaded file:: - unzip Gate-9.2.zip + unzip Gate-9.4.zip -Alternatively, if you are familiar with git, then instead of downloading and extracting the tar file, you can also clone the sources from github and check out the *v9.2* release tag. +Alternatively, if you are familiar with git, then instead of downloading and extracting the tar file, you can also clone the sources from github and check out the *v9.4* release tag. git clone https://github.com/OpenGATE/Gate.git Gate cd Gate - git checkout v9.2 + git checkout v9.4 Create two directories to build and install GATE:: @@ -158,7 +158,7 @@ Move into the GATE build directory:: Run ccmake as follows:: - ccmake ../Gate-9.2 + ccmake ../Gate-9.4 You need to change the *CMAKE_INSTALL_PREFIX*, it should be set to the install directory (defined above). The default given by CMake is */usr/local*; if you have root/sudo permissions on your machine then it's possible to install Gate there, but it's not recommended, especially if you need to work with more than one version of Gate (for instance, if you want to do development on Gate, or if you want to verify that a new release is compatible with the old release that you have been using). You should get something like this (the screen shot is taken from the 8.0 release, the only difference is the version number): @@ -221,7 +221,7 @@ This file should be defined as follows: setenv PATH ${PATH}:/PATH_TO/2.3.4.3/CLHEP/bin setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/PATH_TO/2.3.4.3/CLHEP/lib -Save this file in */PATH_TO/gate_v9.2-install/bin*. Finally, before to start a GATE session:: +Save this file in */PATH_TO/gate_v9.4-install/bin*. Finally, before to start a GATE session:: source /PATH_TO/gate-install/bin/gate_env.sh @@ -361,9 +361,9 @@ Installation of cluster tools jobsplitter ~~~~~~~~~~~ -Go to /PATH_TO/gate_v9.2/cluster_tools/jobsplitter:: +Go to /PATH_TO/gate_v9.4/cluster_tools/jobsplitter:: - cd /PATH_TO/gate_v9.2/cluster_tools/jobsplitter + cd /PATH_TO/gate_v9.4/cluster_tools/jobsplitter Make sure ROOT and Geant4 environment variables are set:: @@ -376,12 +376,12 @@ Compile:: Copy the gjs executable file to the correct place:: - cp /PATH_TO/gate_v9.2/cluster_tools/jobsplitter/gjs /PATH_TO/gate_v9.1-install/bin + cp /PATH_TO/gate_v9.4/cluster_tools/jobsplitter/gjs /PATH_TO/gate_v9.4-install/bin filemerger ~~~~~~~~~~~ -Go to /PATH_TO/gate_v9.2/cluster_tools/filemerger +Go to /PATH_TO/gate_v9.4/cluster_tools/filemerger Make sure ROOT and Geant4 environment variables are set:: source /PATH_TO/root_v6.XX/bin/thisroot.sh @@ -393,6 +393,6 @@ Compile:: Copy the gjs executable file to the correct place:: - cp /PATH_TO/gate_v9.2/cluster_tools/filemerger/gjm /PATH_TO/gate_v9.1-install/bin + cp /PATH_TO/gate_v9.4/cluster_tools/filemerger/gjm /PATH_TO/gate_v9.4-install/bin diff --git a/docs/installation.rst b/docs/installation.rst index 20dfe4a62..6615dd0fe 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,6 +1,6 @@ .. _installation_guide-label: -Installation Guide V9.2 +Installation Guide V9.4 ======================= .. contents:: Table of Contents @@ -42,11 +42,6 @@ With Docker See :ref:`docker_gate-label` -With Singularity -~~~~~~~~~~~~~~~~ - -To be written - Via virtual machine ~~~~~~~~~~~~~~~~~~~ diff --git a/release_notes/v9.4.txt b/release_notes/v9.4.txt index ff5956a37..557e729c0 100644 --- a/release_notes/v9.4.txt +++ b/release_notes/v9.4.txt @@ -1,13 +1,13 @@ # *ooooOOOO0000OOOOoooo* # # # -# GATE v9.3 # +# GATE v9.4 # # # -# 02/2023 # +# 04/2024 # # # # *ooooOOOO0000OOOOoooo* # -This version is intended to be used with Geant4 11.1 only. +This version is intended to be used with Geant4 11.2.1 only. Gate cannot be compiled with earlier Geant4 versions. It *may* works with other ROOT, ITK, libtorch version but it is not tested.