-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit provides support for FLUKA in O2. FLUKA compilation is optional for the moment. This backend can be selected via: ``` o2-sim -e TFluka ... ```
- Loading branch information
Showing
9 changed files
with
150 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
GLOBAL 50000. 4.0 | ||
DEFAULTS NEW-DEFA | ||
OPEN 1. OLD | ||
random.dat | ||
GEOBEGIN COMBINAT | ||
GEOEND | ||
* | ||
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+ | ||
* | ||
EVENTYPE 1.0 | ||
BEAM 7000.0 MUON- | ||
MGNFIELD 10.0 0.001 | ||
SOURCE | ||
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+ | ||
USERDUMP 200. 37.0 -2.0 1.0 TRAKFILE | ||
START 42000.99999999.0 2.0 | ||
STOP | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
#include "FairRunSim.h" | ||
#include "TFluka.h" | ||
#include "SimulationDataFormat/Stack.h" | ||
#include "SimulationDataFormat/StackParam.h" | ||
#include <iostream> | ||
#include "FairLogger.h" | ||
#include "FairModule.h" | ||
#include "Generators/DecayerPythia8.h" | ||
#include "../commonConfig.C" | ||
|
||
// these are used in commonConfig.C | ||
using o2::eventgen::DecayerPythia8; | ||
|
||
namespace o2 | ||
{ | ||
namespace flukaconfig | ||
{ | ||
|
||
void linkFlukaFiles() | ||
{ | ||
// Link here some special Fluka files needed | ||
gSystem->Exec("ln -s $FLUKADATA/neuxsc.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/elasct.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/gxsect.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/nuclear.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/sigmapi.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/brems_fin.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/cohff.bin ."); | ||
gSystem->Exec("ln -s $FLUKADATA/fluodt.dat ."); | ||
gSystem->Exec("ln -s $FLUKADATA/random.dat ."); | ||
// Copy the random seed | ||
gSystem->Exec("cp $FLUKADATA/random.dat old.seed"); | ||
// Give some meaningfull name to the output | ||
gSystem->Exec("ln -s fluka.out fort.11"); | ||
gSystem->Exec("ln -s fluka.err fort.15"); | ||
gSystem->Exec("ln -fs $ALICE_ROOT/TFluka/macro/FlukaConfig.C Config.C"); | ||
gSystem->Exec("ln -fs $O2_ROOT/share/Detectors/gconfig/data/coreFlukaVmc.inp ."); | ||
} | ||
|
||
void Config() | ||
{ | ||
linkFlukaFiles(); | ||
FairRunSim* run = FairRunSim::Instance(); | ||
TString* gModel = run->GetGeoModel(); | ||
TFluka* fluka = new TFluka("C++ Interface to Fluka", 0); | ||
stackSetup(fluka, run); | ||
|
||
// setup decayer | ||
decayerSetup(fluka); | ||
|
||
// ******* FLUKA specific configuration for simulated Runs ******* | ||
} | ||
|
||
void FlukaConfig() | ||
{ | ||
LOG(INFO) << "Setting up FLUKA sim from library code"; | ||
Config(); | ||
} | ||
} // namespace flukaconfig | ||
} // namespace o2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright CERN and copyright holders of ALICE O2. This software is distributed | ||
# under the terms of the GNU General Public License v3 (GPL Version 3), copied | ||
# verbatim in the file "COPYING". | ||
# | ||
# See http://alice-o2.web.cern.ch/license for full licensing information. | ||
# | ||
# In applying this license CERN does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an Intergovernmental Organization or | ||
# submit itself to any jurisdiction. | ||
|
||
# use the GEANT4_VMCConfig.cmake provided by the Geant4VMC installation but | ||
# amend the target geant4vmc with the include directories | ||
|
||
find_package(FlukaVMC NO_MODULE) | ||
if(NOT FlukaVMC_FOUND) | ||
return() | ||
endif() | ||
|
||
set_target_properties(flukavmc | ||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES | ||
"${FlukaVMC_INCLUDE_DIRS}" | ||
INTERFACE_LINK_DIRECTORIES | ||
$<TARGET_FILE_DIR:flukavmc>) | ||
|
||
# Promote the imported target to global visibility | ||
# (so we can alias it) | ||
set_target_properties(flukavmc PROPERTIES IMPORTED_GLOBAL TRUE) | ||
|
||
add_library(MC::FlukaVMC ALIAS flukavmc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters