diff --git a/Detectors/FIT/FT0/reconstruction/src/test-raw2digit.cxx b/Detectors/FIT/FT0/reconstruction/src/test-raw2digit.cxx index b66c1a9ea1514..568c39bfe6783 100644 --- a/Detectors/FIT/FT0/reconstruction/src/test-raw2digit.cxx +++ b/Detectors/FIT/FT0/reconstruction/src/test-raw2digit.cxx @@ -35,7 +35,7 @@ int main() } }; std::vector vecTotalEvents, vecTotalEvents2; - gSystem->Exec("$O2_ROOT/bin/o2-sim -n 10 -m FT0 -g pythia8"); + gSystem->Exec("$O2_ROOT/bin/o2-sim -n 10 -m FT0 -g pythia8pp"); gSystem->Exec("$O2_ROOT/bin/o2-sim-digitizer-workflow -b"); TFile flIn("ft0digits.root"); std::unique_ptr treeInput((TTree*)flIn.Get("o2sim")); diff --git a/Detectors/FIT/benchmark/README.md b/Detectors/FIT/benchmark/README.md index 9ae77dfc379ac..135c207357a8b 100644 --- a/Detectors/FIT/benchmark/README.md +++ b/Detectors/FIT/benchmark/README.md @@ -22,7 +22,7 @@ To obtain plots of (FairMQ) devices operating in the simulation you will have to e.g. if you wish to monitor 50 pp (pythia) events with Geant3 as the VMC backend using the FIT detector and utilizing parallel mode with 2 simulation workers AND keep track of FairMQ devices, you can do: -`$> ./monitor.sh o2-sim -g pythia8 -e TGeant3 -m FV0 FT0 FDD -j 2 -n 50 | tee o2sim.log` +`$> ./monitor.sh o2-sim -g pythia8pp -e TGeant3 -m FV0 FT0 FDD -j 2 -n 50 | tee o2sim.log` --- @@ -40,7 +40,7 @@ The monitored data has to be processed as: This will generate an output: -```Your command was: o2-sim -g pythia8 -e TGeant3 -m FV0 FT0 FDD -j 2 -n 50 +```Your command was: o2-sim -g pythia8pp -e TGeant3 -m FV0 FT0 FDD -j 2 -n 50 You have monitored o2 simulation in parallel. ******************************** diff --git a/Detectors/TRD/workflow/test/run_trivial_trapsimulator.sh b/Detectors/TRD/workflow/test/run_trivial_trapsimulator.sh index 870faa1d294dc..693335a88961a 100644 --- a/Detectors/TRD/workflow/test/run_trivial_trapsimulator.sh +++ b/Detectors/TRD/workflow/test/run_trivial_trapsimulator.sh @@ -1,5 +1,5 @@ #! /bin/bash -o2-sim -n 10 -g pythia8 --skipModules ZDC > o2sim.log +o2-sim -n 10 -g pythia8pp --skipModules ZDC > o2sim.log o2-sim-digitizer-workflow -b --onlyDET TRD > o2digitizer.log o2-trd-trap-sim -b >trapsim.log diff --git a/Generators/share/egconfig/pythia8_userhooks_charm.C b/Generators/share/egconfig/pythia8_userhooks_charm.C index 19004c3f4a9f2..fc6b847c985cb 100644 --- a/Generators/share/egconfig/pythia8_userhooks_charm.C +++ b/Generators/share/egconfig/pythia8_userhooks_charm.C @@ -1,6 +1,6 @@ // Pythia8 UserHooks // -// usage: o2sim -g pythia8 --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_charm.C" +// usage: o2sim -g pythia8pp --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_charm.C" // /// \author R+Preghenella - February 2020 diff --git a/Generators/src/GeneratorFactory.cxx b/Generators/src/GeneratorFactory.cxx index 798d97f567f1c..cfa6e43b2168c 100644 --- a/Generators/src/GeneratorFactory.cxx +++ b/Generators/src/GeneratorFactory.cxx @@ -66,8 +66,10 @@ void GeneratorFactory::setPrimaryGenerator(o2::conf::SimConfig const& conf, Fair #ifdef GENERATORS_WITH_PYTHIA8 auto makePythia8Gen = [](std::string& config) { auto gen = new o2::eventgen::GeneratorPythia8(); - LOG(INFO) << "Reading \'Pythia8\' base configuration: " << config << std::endl; - gen->readFile(config); + if (!config.empty()) { + LOG(INFO) << "Reading \'Pythia8\' base configuration: " << config << std::endl; + gen->readFile(config); + } auto seed = (gRandom->GetSeed() % 900000000); LOG(INFO) << "Using random seed from gRandom % 900000000: " << seed; gen->readString("Random:setSeed on"); @@ -183,6 +185,10 @@ void GeneratorFactory::setPrimaryGenerator(o2::conf::SimConfig const& conf, Fair auto muon = makeBoxGen(13, 100, -2.5, -4.0, 100, 100, 0., 360); primGen->AddGenerator(muon); } else if (genconfig.compare("pythia8") == 0) { + auto py8config = std::string(); + auto py8 = makePythia8Gen(py8config); + primGen->AddGenerator(py8); + } else if (genconfig.compare("pythia8pp") == 0) { auto py8config = std::string(std::getenv("O2_ROOT")) + "/share/Generators/egconfig/pythia8_inel.cfg"; auto py8 = makePythia8Gen(py8config); primGen->AddGenerator(py8); diff --git a/doc/DetectorSimulation.md b/doc/DetectorSimulation.md index e75cbe9bf7507..5f9cf5df0bbe2 100644 --- a/doc/DetectorSimulation.md +++ b/doc/DetectorSimulation.md @@ -32,7 +32,7 @@ The purpose of the `o2-sim` executable is to simulate the passage of particles e ## Usage overview * **Quick start example:** A typical (exemplary) invocation is of the form - ```o2-sim -n 10 -g pythia8 -e TGeant4 -j 2 --skipModules ZDC,PHS``` + ```o2-sim -n 10 -g pythia8pp -e TGeant4 -j 2 --skipModules ZDC,PHS``` which would launch a simulation for 10 pythia8 events on the whole ALICE detector but ZDC and PHOS, using Geant4 on 2 parallel worker processes. * **Generated output**: The simulation creates the following output files: @@ -55,7 +55,7 @@ The purpose of the `o2-sim` executable is to simulate the passage of particles e | --------------------- | -------------------------------------------------------------------------------------- | | -h,--help | Prints the list of possible command line options and their default values. | | -n,--number | The number of events to simulate. | -| -g,--generator | name of a predefined generator template to use (such as pythia8, pythia8hi). Configuration of generations is explained in a dedicated section. | +| -g,--generator | name of a predefined generator template to use (such as pythia8pp, pythia8hi). Configuration of generations is explained in a dedicated section. | | -e,--engine | Select the VMC transport engine (TGeant4, TGeant3). | | -m,--modules | List of modules/geometries to include (default is ALL); example -m PIPE ITS TPC | | -j,--nworkers | Number of parallel simulation engine workers (default is half the number of hyperthread CPU cores) | @@ -120,7 +120,7 @@ o2-sim -m PIPE ITS MFT -e TGeant3 -g boxgen -n 10 --configKeyValues 'BoxGun.pdg= Configures pythia8 for min.bias pp collisions at 14 TeV ``` -o2-sim -m PIPE ITS MFT -g pythia8 -n 50 +o2-sim -m PIPE ITS MFT -g pythia8pp -n 50 ``` [Describe in detail the environment variables] @@ -181,13 +181,13 @@ All event generator interfaces that comply with the `o2::eventgen::Generator` pr A basic 'particle trigger' is implemented in the `o2::eventgen` core and allows the user to define a trigger particle. The definitions of the trigger particle can be expressed via command line arguments ``` -o2-sim -g pythia8 -t particle --configKeyValues "TriggerParticle.pdg=333;TriggerParticle.ptMin=5.;TriggerParticle.yMin=-0.5;TriggerParticle.yMax=0.5" +o2-sim -g pythia8pp -t particle --configKeyValues "TriggerParticle.pdg=333;TriggerParticle.ptMin=5.;TriggerParticle.yMin=-0.5;TriggerParticle.yMax=0.5" ``` Custom triggers can also be constructed by the user to provide unlimited flexibility in the trigger needs. An external trigger function can be specified via command line arguments ``` -o2-sim -g pythia8 -t external --configKeyValues 'TriggerExternal.fileName=path_to_trigger_macro.C;TriggerExternal.funcName="the_function(some, parameters)"' +o2-sim -g pythia8pp -t external --configKeyValues 'TriggerExternal.fileName=path_to_trigger_macro.C;TriggerExternal.funcName="the_function(some, parameters)"' ``` The function must comply with a simple protocol and return a lambda function defined as follows ``` @@ -205,7 +205,7 @@ To allow users to define triggers that go beyond the particle stack generated by This allows the user to go deep into the core of the event generator, whenever this is possible. For this reason, this is called a 'DeepTrigger'. A 'DeepTrigger' is attached to the simulation in the same way as a normal trigger ``` -o2-sim -g pythia8 -t external --configKeyValues 'TriggerExternal.fileName=path_to_deep_trigger_macro.C;TriggerExternal.funcName="the_deep_function(some, parameters)"' +o2-sim -g pythia8pp -t external --configKeyValues 'TriggerExternal.fileName=path_to_deep_trigger_macro.C;TriggerExternal.funcName="the_deep_function(some, parameters)"' ``` In this case the function must comply with a similar, but different protocol than before and return a lambda function defined as follows ``` o2::eventgen::DeepTrigger the_deep_function() @@ -258,7 +258,7 @@ This functionality might be of use for users who want to be able to steer the ev An example of a configuration macro is this one ``` -// usage: o2sim -g pythia8 --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_charm.C" +// usage: o2sim -g pythia8pp --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_charm.C" #include "Generators/Trigger.h" #include "Pythia8/Pythia.h" diff --git a/run/SimExamples/Inspect_Hits/run.sh b/run/SimExamples/Inspect_Hits/run.sh index e30ba31f424c4..caebcd70c5ae8 100755 --- a/run/SimExamples/Inspect_Hits/run.sh +++ b/run/SimExamples/Inspect_Hits/run.sh @@ -16,7 +16,7 @@ for I in $(seq -w 1 $NRUNS); do cp secondary_and_hits.macro $DIR/. cd $DIR echo " --- starting run $I" - o2-sim -j $NJOBS -n $NEVENTS -e $GEANT -g pythia8 --skipModules ZDC --configKeyValues "Stack.pruneKine=false" &> o2-sim.log + o2-sim -j $NJOBS -n $NEVENTS -e $GEANT -g pythia8pp --skipModules ZDC --configKeyValues "Stack.pruneKine=false" &> o2-sim.log root -b -q -l "primary_and_hits.macro(\"o2sim_Kine.root\", \"barrel\")" & root -b -q -l "primary_and_hits.macro(\"o2sim_Kine.root\", \"muon\")" & diff --git a/run/SimExamples/Jet_Embedding_Pythia8/pythia8_userhooks_jets.macro b/run/SimExamples/Jet_Embedding_Pythia8/pythia8_userhooks_jets.macro index 9986f65e3e5df..47c7c0f607264 100644 --- a/run/SimExamples/Jet_Embedding_Pythia8/pythia8_userhooks_jets.macro +++ b/run/SimExamples/Jet_Embedding_Pythia8/pythia8_userhooks_jets.macro @@ -1,6 +1,6 @@ // Pythia8 UserHooks // -// usage: o2sim -g pythia8 --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_jets.C" +// usage: o2sim -g pythia8pp --configKeyValues "GeneratorPythia8.hooksFileName=pythia8_userhooks_jets.C" // /// \author R+Preghenella - April 2020 diff --git a/run/SimExamples/Jet_Embedding_Pythia8/run.sh b/run/SimExamples/Jet_Embedding_Pythia8/run.sh index e063ee2a1b872..9529039e68754 100755 --- a/run/SimExamples/Jet_Embedding_Pythia8/run.sh +++ b/run/SimExamples/Jet_Embedding_Pythia8/run.sh @@ -19,7 +19,7 @@ o2-sim -j 20 -n ${NBGR} -g pythia8hi -m PIPE ITS TPC -o bkg --configKeyValues \ # produce hard jets using a pythia8 configuration given in a file 'pythia8_hard.cfg'; event selection is done by a user hook specified # in file 'pythia8_userhooks_jets.macro' and using same vertex setting as background events (via --embedInto) NSGN=10 -o2-sim -j 20 -n ${NSGN} -g pythia8 -m PIPE ITS TPC --configKeyValues "GeneratorPythia8.config=pythia8_hard.cfg;GeneratorPythia8.hooksFileName=pythia8_userhooks_jets.macro" --embedIntoFile bkg_Kine.root -o sgn > logsgn 2>&1 +o2-sim -j 20 -n ${NSGN} -g pythia8pp -m PIPE ITS TPC --configKeyValues "GeneratorPythia8.config=pythia8_hard.cfg;GeneratorPythia8.hooksFileName=pythia8_userhooks_jets.macro" --embedIntoFile bkg_Kine.root -o sgn > logsgn 2>&1 # PART c) # digitization with summation of signal on top of background events diff --git a/run/SimExamples/JustPrimaryKinematics/run.sh b/run/SimExamples/JustPrimaryKinematics/run.sh index 018df38f10976..ab1b285bf0782 100755 --- a/run/SimExamples/JustPrimaryKinematics/run.sh +++ b/run/SimExamples/JustPrimaryKinematics/run.sh @@ -6,7 +6,7 @@ # tight geometry cuts so that Geant will not do work. # first stage --> produce events using Pythia8 (no transport) -o2-sim -n 10 -g pythia8 -m CAVE --configFile only_primarykine.ini +o2-sim -n 10 -g pythia8pp -m CAVE --configFile only_primarykine.ini # second stage --> read back events from O2 kine (no transport) o2-sim -n 10 -g extkinO2 --extKinFile o2sim_Kine.root -m CAVE --configFile only_primarykine.ini -o o2sim2 diff --git a/run/SimExamples/Selective_Transport/run.sh b/run/SimExamples/Selective_Transport/run.sh index ab1e51310bb1b..8ba13e41442c4 100755 --- a/run/SimExamples/Selective_Transport/run.sh +++ b/run/SimExamples/Selective_Transport/run.sh @@ -26,7 +26,7 @@ MODULES="PIPE ITS TPC" EVENTS=100 NWORKERS=8 -o2-sim -j ${NWORKERS} -n ${EVENTS} -g pythia8 -m ${MODULES} -o step1 \ +o2-sim -j ${NWORKERS} -n ${EVENTS} -g pythia8pp -m ${MODULES} -o step1 \ --configFile sim.ini \ > logstep1 2>&1 diff --git a/run/SimExamples/Selective_Transport_pi0/run.sh b/run/SimExamples/Selective_Transport_pi0/run.sh index 3c1f84b082e51..98378d0d82547 100755 --- a/run/SimExamples/Selective_Transport_pi0/run.sh +++ b/run/SimExamples/Selective_Transport_pi0/run.sh @@ -34,7 +34,7 @@ NWORKERS=1 ### step 1 -o2-sim -j ${NWORKERS} -n ${NEVENTS1} -g pythia8 -m ${MODULES} -o step1 \ +o2-sim -j ${NWORKERS} -n ${NEVENTS1} -g pythia8pp -m ${MODULES} -o step1 \ --configFile sim_step1.ini --seed 73141128 ### step 2 diff --git a/run/SimExamples/StepMonitoring/Simple1/run.sh b/run/SimExamples/StepMonitoring/Simple1/run.sh index dace460b2270d..2d4d089351123 100755 --- a/run/SimExamples/StepMonitoring/Simple1/run.sh +++ b/run/SimExamples/StepMonitoring/Simple1/run.sh @@ -4,4 +4,4 @@ # alienv enter O2/latest MCStepLogger/latest # This demonstrates the most basic usage of the steplogger -LD_PRELOAD=$MCSTEPLOGGER_ROOT/lib/libMCStepLoggerIntercept.so o2-sim-serial -n 1 -g pythia8 -m PIPE ITS TPC +LD_PRELOAD=$MCSTEPLOGGER_ROOT/lib/libMCStepLoggerIntercept.so o2-sim-serial -n 1 -g pythia8pp -m PIPE ITS TPC diff --git a/run/startSim.sh b/run/startSim.sh index 5e1e2f1d44603..2678477c4b68d 100755 --- a/run/startSim.sh +++ b/run/startSim.sh @@ -10,7 +10,7 @@ killall -9 o2-sim-hit-merger-runner topologyfile=${O2_ROOT}/share/config/o2simtopology.json # we have one primary distributor -xterm -geometry 80x25+0+0 -e "o2-sim-primary-server-device-runner --control static --id primary-server --mq-config ${topologyfile} -n 20 -m PIPE TOF TRD TPC PHS EMC FIT MCH -g pythia8 -e TGeant3 | tee serverlog;bash" & +xterm -geometry 80x25+0+0 -e "o2-sim-primary-server-device-runner --control static --id primary-server --mq-config ${topologyfile} -n 20 -m PIPE TOF TRD TPC PHS EMC FIT MCH -g pythia8pp -e TGeant3 | tee serverlog;bash" & for i in `seq 1 ${NSIMWORKERS}`; do xterm -geometry 80x25+500+0 -e "o2-sim-device-runner --control static --id worker${i} --config-key worker --mq-config ${topologyfile} --severity info | tee simlog${i};bash" &