From 6653e908c70574c5e03a7432b0a841ae50d2877d Mon Sep 17 00:00:00 2001 From: kochebina Date: Tue, 2 Apr 2024 15:17:16 +0200 Subject: [PATCH] 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