Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/cmake-build-debug/
/.idea/

*.DS_Store
21 changes: 18 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,21 @@ find_library(MCINI NAMES McIniData PATHS $ENV{MCINI}/build)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc ${PROJECT_SOURCE_DIR}/FermiBreakUp/*.cc ${PROJECT_SOURCE_DIR}/photon_evaporation/src/*.cc ${PROJECT_SOURCE_DIR}/Evaporation/src/*.cc ${PROJECT_SOURCE_DIR}/Fission/src/*.cc ${PROJECT_SOURCE_DIR}/Multifragmentation/src/*.cc) # ${PROJECT_SOURCE_DIR}/Abla/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh ${PROJECT_SOURCE_DIR}/FermiBreakUp/*.hh ${PROJECT_SOURCE_DIR}/photon_evaporation/include/*.hh ${PROJECT_SOURCE_DIR}/Evaporation/include/*.hh ${PROJECT_SOURCE_DIR}/Fission/include/*.hh ${PROJECT_SOURCE_DIR}/Multifragmentation/include/*.hh) #${PROJECT_SOURCE_DIR}/Abla/include/*.hh)
file(GLOB sources
${PROJECT_SOURCE_DIR}/src/*.cc
${PROJECT_SOURCE_DIR}/photon_evaporation/src/*.cc
${PROJECT_SOURCE_DIR}/Evaporation/src/*.cc
${PROJECT_SOURCE_DIR}/Fission/src/*.cc
${PROJECT_SOURCE_DIR}/Multifragmentation/src/*.cc
${PROJECT_SOURCE_DIR}/PureNeutrons/src/*.cc) # ${PROJECT_SOURCE_DIR}/Abla/src/*.cc)

file(GLOB headers
${PROJECT_SOURCE_DIR}/include/*.hh
${PROJECT_SOURCE_DIR}/photon_evaporation/include/*.hh
${PROJECT_SOURCE_DIR}/Evaporation/include/*.hh
${PROJECT_SOURCE_DIR}/Fission/include/*.hh
${PROJECT_SOURCE_DIR}/Multifragmentation/include/*.hh
${PROJECT_SOURCE_DIR}/PureNeutrons/include/*.hh) #${PROJECT_SOURCE_DIR}/Abla/include/*.hh)

include_directories(ROOT_BUG)
include_directories(/usr/local/include)
Expand All @@ -49,16 +62,18 @@ include_directories(${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/Fission/include/
${PROJECT_SOURCE_DIR}/Multifragmentation/include/
${PROJECT_SOURCE_DIR}/photon_evaporation/include/
${PROJECT_SOURCE_DIR}
${Geant4_INCLUDE_DIR}
${ROOT_INCLUDE_DIRS})
add_subdirectory(TGlauber)
add_subdirectory(FermiBreakUp)
link_directories(${ROOT_LIBRARY_DIR})
link_directories(/usr/local/lib)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
add_executable(GRATE GRATE.cc ${sources} ${headers})
#target_link_libraries(GRATE TGlauNucleon TGlauNucleus TGlauberMC ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} TGlauberLib)
target_link_libraries(GRATE ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} TGlauberLib McIniData)
target_link_libraries(GRATE ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} TGlauberLib McIniData AAMCCFermiBreakUp)

#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
Expand Down
35 changes: 35 additions & 0 deletions FermiBreakUp/AAMCCFermiBreakUp.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Created by Artem Novikov on 20.05.2023.
//

#include <vector>

#include "G4Fragment.hh"
#include "AAMCCFermiBreakUp.hh"
#include "FermiBreakUp.h"

AAMCCFermiBreakUp::AAMCCFermiBreakUp() : fermi_model_(std::make_unique<FermiBreakUp>()) {}

AAMCCFermiBreakUp::AAMCCFermiBreakUp(std::unique_ptr<VFermiBreakUp>&& model) : fermi_model_(std::move(model)) {}

void AAMCCFermiBreakUp::BreakFragment(G4FragmentVector* fragments_ptr, G4Fragment* fragment) {
auto results = fermi_model_->BreakItUp(FermiParticle(MassNumber(fragment->GetA_asInt()),
ChargeNumber(fragment->GetZ_asInt()),
fragment->GetMomentum()));

for (auto& particle : results) {
fragments_ptr->push_back(new G4Fragment(G4int(particle.GetMassNumber()),
G4int(particle.GetChargeNumber()),
G4LorentzVector(particle.GetMomentum())));
}
}

void AAMCCFermiBreakUp::Initialise() {}

G4bool AAMCCFermiBreakUp::IsFermiPossible(G4int Z, G4int A, [[maybe_unused]] G4double excitation_energy) {
return Z < 9 && A < 19;
}

G4bool AAMCCFermiBreakUp::IsApplicable(G4int Z, G4int A, G4double excitation_energy) const {
return IsFermiPossible(Z, A, excitation_energy);
}
31 changes: 31 additions & 0 deletions FermiBreakUp/AAMCCFermiBreakUp.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// Created by Artem Novikov on 20.05.2023.
//

#ifndef FERMIBREAKUP_MYFERMIBREAKUP_AAMCCFERMIBREAKUP_H_
#define FERMIBREAKUP_MYFERMIBREAKUP_AAMCCFERMIBREAKUP_H_

#include <memory>

#include "G4VFermiBreakUp.hh"
#include "VFermiBreakUp.h"

class AAMCCFermiBreakUp : public G4VFermiBreakUp {
public:
AAMCCFermiBreakUp();

AAMCCFermiBreakUp(std::unique_ptr<VFermiBreakUp>&& model);

void Initialise() override;

void BreakFragment(G4FragmentVector* fragments_ptr, G4Fragment* fragment) override;

static G4bool IsFermiPossible(G4int Z, G4int A, G4double excitation_energy);

G4bool IsApplicable(G4int Z, G4int A, G4double excitation_energy) const override;

private:
std::unique_ptr<VFermiBreakUp> fermi_model_;
};

#endif //FERMIBREAKUP_MYFERMIBREAKUP_AAMCCFERMIBREAKUP_H_
16 changes: 16 additions & 0 deletions FermiBreakUp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.16)
project(AAMCCFermiBreakUp)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic -Werror")

find_package(Geant4 REQUIRED)

include(${Geant4_USE_FILE})

add_library(AAMCCFermiBreakUp STATIC AAMCCFermiBreakUp.cc)

add_subdirectory(lib)
target_link_libraries(AAMCCFermiBreakUp FermiBreakUp ${Geant4_LIBRARIES})

95 changes: 0 additions & 95 deletions FermiBreakUp/G4B9FermiFragment.cc

This file was deleted.

59 changes: 0 additions & 59 deletions FermiBreakUp/G4B9FermiFragment.hh

This file was deleted.

91 changes: 0 additions & 91 deletions FermiBreakUp/G4Be8FermiFragment.cc

This file was deleted.

Loading