|
| 1 | +// Copyright CERN and copyright holders of ALICE O2. This software is |
| 2 | +// distributed under the terms of the GNU General Public License v3 (GPL |
| 3 | +// Version 3), copied verbatim in the file "COPYING". |
| 4 | +// |
| 5 | +// See http://alice-o2.web.cern.ch/license for full licensing information. |
| 6 | +// |
| 7 | +// In applying this license CERN does not waive the privileges and immunities |
| 8 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 9 | +// or submit itself to any jurisdiction. |
| 10 | + |
| 11 | +#include "FairRunSim.h" |
| 12 | +#include "TFluka.h" |
| 13 | +#include "SimulationDataFormat/Stack.h" |
| 14 | +#include "SimulationDataFormat/StackParam.h" |
| 15 | +#include <iostream> |
| 16 | +#include "FairLogger.h" |
| 17 | +#include "FairModule.h" |
| 18 | +#include "Generators/DecayerPythia8.h" |
| 19 | +#include "../commonConfig.C" |
| 20 | + |
| 21 | +// these are used in commonConfig.C |
| 22 | +using o2::eventgen::DecayerPythia8; |
| 23 | + |
| 24 | +namespace o2 |
| 25 | +{ |
| 26 | +namespace flukaconfig |
| 27 | +{ |
| 28 | + |
| 29 | +void linkFlukaFiles() |
| 30 | +{ |
| 31 | + // Link here some special Fluka files needed |
| 32 | + gSystem->Exec("ln -s $FLUKADATA/neuxsc.bin ."); |
| 33 | + gSystem->Exec("ln -s $FLUKADATA/elasct.bin ."); |
| 34 | + gSystem->Exec("ln -s $FLUKADATA/gxsect.bin ."); |
| 35 | + gSystem->Exec("ln -s $FLUKADATA/nuclear.bin ."); |
| 36 | + gSystem->Exec("ln -s $FLUKADATA/sigmapi.bin ."); |
| 37 | + gSystem->Exec("ln -s $FLUKADATA/brems_fin.bin ."); |
| 38 | + gSystem->Exec("ln -s $FLUKADATA/cohff.bin ."); |
| 39 | + gSystem->Exec("ln -s $FLUKADATA/fluodt.dat ."); |
| 40 | + gSystem->Exec("ln -s $FLUKADATA/random.dat ."); |
| 41 | + // Copy the random seed |
| 42 | + gSystem->Exec("cp $FLUKADATA/random.dat old.seed"); |
| 43 | + // Give some meaningfull name to the output |
| 44 | + gSystem->Exec("ln -s fluka.out fort.11"); |
| 45 | + gSystem->Exec("ln -s fluka.err fort.15"); |
| 46 | + gSystem->Exec("ln -fs $ALICE_ROOT/TFluka/macro/FlukaConfig.C Config.C"); |
| 47 | + gSystem->Exec("ln -fs $O2_ROOT/share/Detectors/gconfig/data/coreFlukaVmc.inp ."); |
| 48 | +} |
| 49 | + |
| 50 | +void Config() |
| 51 | +{ |
| 52 | + linkFlukaFiles(); |
| 53 | + FairRunSim* run = FairRunSim::Instance(); |
| 54 | + TString* gModel = run->GetGeoModel(); |
| 55 | + TFluka* fluka = new TFluka("C++ Interface to Fluka", 0); |
| 56 | + stackSetup(fluka, run); |
| 57 | + |
| 58 | + // setup decayer |
| 59 | + decayerSetup(fluka); |
| 60 | + |
| 61 | + // ******* FLUKA specific configuration for simulated Runs ******* |
| 62 | +} |
| 63 | + |
| 64 | +void FlukaConfig() |
| 65 | +{ |
| 66 | + LOG(INFO) << "Setting up FLUKA sim from library code"; |
| 67 | + Config(); |
| 68 | +} |
| 69 | +} // namespace flukaconfig |
| 70 | +} // namespace o2 |
0 commit comments