Skip to content
Closed
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
39 changes: 39 additions & 0 deletions .github/workflows/clean-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Clean PR builds

'on':
workflow_dispatch:
inputs:
pr:
description: PR number in this repo to be cleaned
type: string # can't use number here
required: true

# Warning: GitHub limits the total number of inputs to 10, so a maximum of
# 9 checks is allowed here!
# Warning: the check_* keys are magic and must consist of the string
# "check_" followed by the applicable check name exactly. The
# "description" field is only the human-readable label for the input.
'check_build/O2DPG/sim/o2':
description: build/O2DPG/sim/o2
type: boolean
default: true
'check_build/O2DPG/O2fst/o2':
description: build/O2DPG/O2fst/o2
type: boolean
default: true

permissions: {}

jobs:
clean:
name: Clean PR checks
uses: alisw/ali-bot/.github/workflows/clean-pr-checks.yml@master
with:
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
pr: ${{ github.event.inputs.pr }}
checks: ${{ toJSON(github.event.inputs) }}
permissions:
pull-requests: read # to get last commit for pr (octokit/graphql-action)
statuses: write # for set-github-status
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ R__ADD_INCLUDE_PATH($O2DPG_ROOT/MC/config/PWGDQ/EvtGen)
#include <string>

using namespace o2::eventgen;
using namespace Pythia8;

namespace o2
{
Expand Down Expand Up @@ -140,7 +139,7 @@ Pythia8::Event mOutputEvent;
// Control gap-triggering
unsigned long long mGeneratedEvents;
int mInverseTriggerRatio;
Pythia pythiaMBgen; // minimum bias event
Pythia8::Pythia pythiaMBgen; // minimum bias event
TString mConfigMBdecays;
int mPDG;
std::vector<int> mHadronsPDGs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ funcName = GeneratorBplusToJpsiKaon_EvtGen()
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_hf.cfg
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
hooksFuncName = pythia8_userhooks_bbbar(-1.5,1.5)

### The setup inhibits transport of primary particles which are produce at forward rapidity.
### The settings below only transports particles in the barrel, which is currently defined as |eta| < 2

[Stack]
transportPrimary = barrel
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ funcName = GeneratorBeautyToPsiAndJpsi_EvtGenMidY()
config = ${O2DPG_MC_CONFIG_ROOT}/MC/config/common/pythia8/generator/pythia8_hf.cfg
hooksFileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/hooks/pythia8_userhooks_qqbar.C
hooksFuncName = pythia8_userhooks_bbbar(-1.5,1.5)

### The setup inhibits transport of primary particles which are produce at forward rapidity.
### The settings below only transports particles in the barrel, which is currently defined as |eta| < 2

[Stack]
transportPrimary = barrel
6 changes: 6 additions & 0 deletions MC/config/PWGEM/ini/GeneratorEMCocktailwithFlow3040.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### The setup uses an external event generator
### This part sets the path of the file and the function call to retrieve it

[GeneratorExternal]
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/GeneratorEMCocktailV2.C
funcName=GenerateEMCocktail(400,0,3,63,"${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/parametrizations/PbPb5TeV_central.json","5TeV_3040_wRatio",350,0.0,30.0,10000,1,1,0,0,"5TeV_3040_wRatio",0,1.1,"${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/decaytables/decaytable_LMee.dat",1)
6 changes: 6 additions & 0 deletions MC/config/PWGEM/ini/GeneratorEMCocktailwithFlow4050.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### The setup uses an external event generator
### This part sets the path of the file and the function call to retrieve it

[GeneratorExternal]
fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/external/generator/GeneratorEMCocktailV2.C
funcName=GenerateEMCocktail(400,0,3,63,"${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/parametrizations/PbPb5TeV_central.json","5TeV_4050_wRatio",350,0.0,30.0,10000,1,1,0,0,"5TeV_4050_wRatio",0,1.1,"${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/decaytables/decaytable_LMee.dat",1)
52 changes: 41 additions & 11 deletions MC/config/PWGEM/parametrizations/PbPb5TeV_central.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ int External()
20223, // f_1(1285)
20333, // f_1(1420)
335, // f_2(1525)
115, // a_2(1230)
10323, // K1(1270)+
-10323, // K1(1270)-bar
123314, // Xi(1820)-
Expand All @@ -28,6 +29,7 @@ int External()
{310, -321, 211}, // f_1(1285)
{310, -321, 211}, // f_1(1420)
{310, 310}, // f_2(1525)
{310, 310}, // a_2(1230)
{321, 211}, // K1(1270)+
{-321, -211}, // K1(1270)-bar
{2212, 211}, // Delta(1232)+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
"etaMax": 1.2,
"genDecayed": true
},
"a_2(1230)" : {
"pdg": 115,
"n": 1,
"ptMin": 0.0,
"ptMax": 20,
"etaMin": -1.2,
"etaMax": 1.2,
"genDecayed": true
},
"K1(1270)+": {
"pdg": 10323,
"n": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
"etaMax": 1.2,
"genDecayed": true
},
"a_2(1230)" : {
"pdg": 115,
"n": 1,
"ptMin": 0.0,
"ptMax": 20,
"etaMin": -1.2,
"etaMax": 1.2,
"genDecayed": true
},
"K1(1270)+": {
"pdg": 10323,
"n": 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,9 @@ private:

FairGenerator *generator_extraStrangeness()
{
return new GeneratorPythia8ExtraStrangeness();
auto generator = new GeneratorPythia8ExtraStrangeness();
gRandom->SetSeed(0);
generator->readString("Random:setSeed = on");
generator->readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}
6 changes: 5 additions & 1 deletion MC/config/PWGLF/pythia8/generator_pythia8_syntheFlow.C
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,9 @@ private:

FairGenerator *generator_syntheFlow()
{
return new GeneratorPythia8SyntheFlow();
auto generator = new GeneratorPythia8SyntheFlow();
gRandom->SetSeed(0);
generator->readString("Random:setSeed = on");
generator->readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}
6 changes: 5 additions & 1 deletion MC/config/PWGLF/pythia8/generator_pythia8_syntheFlowXi.C
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,9 @@ private:

FairGenerator *generator_syntheFlowXi()
{
return new GeneratorPythia8SyntheFlowXi();
auto generator = new GeneratorPythia8SyntheFlowXi();
gRandom->SetSeed(0);
generator->readString("Random:setSeed = on");
generator->readString("Random:seed =" + std::to_string(gRandom->Integer(900000000 - 2) + 1));
return generator;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Decay tau-
0.5 e- anti-nu_e nu_tau PHOTOS TAULNUNU; #[Reconstructed PDG2011]
0.5 mu- anti-nu_mu nu_tau PHOTOS TAULNUNU; #[Reconstructed PDG2011]
Enddecay
Decay tau+
0.5 e+ anti-nu_tau nu_e PHOTOS TAULNUNU; #[Reconstructed PDG2011]
0.5 mu+ anti-nu_tau nu_mu PHOTOS TAULNUNU; #[Reconstructed PDG2011]
Enddecay
End
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Decay tau-
1.0 e- anti-nu_e nu_tau PHOTOS TAULNUNU; #[Reconstructed PDG2011]
Enddecay
Decay tau+
0.25 pi+ anti-nu_tau TAUSCALARNU; #[Reconstructed PDG2011]
0.25 pi+ pi0 anti-nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400; #[Reconstructed PDG2011]
0.25 pi0 pi0 pi+ anti-nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400 1.23 0.4; #[Reconstructed PDG2011]
0.25 anti-nu_tau pi+ pi0 pi0 pi0 PYTHIA 41; #[Reconstructed PDG2011]
Enddecay
End
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Decay tau+
1.0 e+ nu_e anti-nu_tau PHOTOS TAULNUNU; #[Reconstructed PDG2011]
Enddecay
Decay tau-
0.25 pi- nu_tau TAUSCALARNU; #[Reconstructed PDG2011]
0.25 pi- pi0 nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400; #[Reconstructed PDG2011]
0.25 pi0 pi0 pi- nu_tau TAUHADNU -0.108 0.775 0.149 1.364 0.400 1.23 0.4; #[Reconstructed PDG2011]
0.25 nu_tau pi- pi0 pi0 pi0 PYTHIA 41; #[Reconstructed PDG2011]
Enddecay
End
22 changes: 13 additions & 9 deletions MC/config/PWGUD/external/generator/GeneratorStarlight.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
R__LOAD_LIBRARY(libDPMJET.so)
R__LOAD_LIBRARY(libDpmJetLib.so)
//R__LOAD_LIBRARY(libDPMJET.so)
//R__LOAD_LIBRARY(libDpmJetLib.so)
R__LOAD_LIBRARY(libStarlib.so)
R__ADD_INCLUDE_PATH($STARlight_ROOT/include)

Expand Down Expand Up @@ -63,12 +63,13 @@ class GeneratorStarlight_class : public Generator
{"kCohRhoToPi", 3, 113, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kCohRhoToElEl", 3, 113011, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kCohRhoToMuMu", 3, 113013, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kCohRhoToPiWithCont", 3, 913, 1200, -1.0, -1.0, 0.02, -1, 0 }, //
{"kCohRhoToPiWithCont", 3, 913, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kCohRhoToPiFlat", 3, 113, 1, -1.0, 2.5, 0.02, 113, 0 }, //
{"kCohPhiToKa", 2, 333, 20, -1.0, -1.0, 0.01, 333, 0 }, //
{"kCohPhiToEl", 2, 333011, 20, -1.0, -1.0, 0.01, 333, 0 }, //
{"kDirectPhiToKaKa", 3, 933, 20, -1.0, -1.0, 0.01, 333, 0 }, //
{"kCohOmegaTo2Pi", 2, 223, 20, -1.0, -1.0, 0.01, 223, 0 }, //
{"kCohOmegaTo3Pi", 2, 223, 20, -1.0, -1.0, 0.01, 223, 0 }, //
{"kCohOmegaTo3Pi", 2, 223, 20, -1.0, -1.0, 0.01, 223, 1 }, //
{"kCohOmegaToPiPiPi", 2, 223211111, 20, -1.0, -1.0, 0.01, 333, 0 }, //
{"kCohJpsiToMu", 2, 443013, 20, -1.0, -1.0, 0.01, 443, 0 }, //
{"kCohJpsiToEl", 2, 443011, 20, -1.0, -1.0, 0.01, 443, 0 }, //
Expand All @@ -83,11 +84,11 @@ class GeneratorStarlight_class : public Generator
{"kIncohRhoToPi", 4, 113, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kIncohRhoToElEl", 4, 113011, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kIncohRhoToMuMu", 4, 113013, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kIncohRhoToPiWithCont",4, 913, 1200, -1.0, -1.0, 0.02, -1, 0 }, //
{"kIncohRhoToPiWithCont",4, 913, 1200, -1.0, -1.0, 0.02, 113, 0 }, //
{"kIncohRhoToPiFlat", 4, 113, 1, -1.0, 2.5, 0.02, 113, 0 }, //
{"kIncohPhiToKa", 4, 333, 20, -1.0, -1.0, 0.01, 333, 0 }, //
{"kIncohOmegaTo2Pi", 4, 223, 20, -1.0, -1.0, 0.01, 223, 0 }, //
{"kIncohOmegaTo3Pi", 4, 223, 20, -1.0, -1.0, 0.01, 223, 0 }, //
{"kIncohOmegaTo3Pi", 4, 223, 20, -1.0, -1.0, 0.01, 223, 1 }, //
{"kIncohOmegaToPiPiPi", 4, 223211111, 20, -1.0, -1.0, 0.01, 223, 0 }, //
{"kIncohJpsiToMu", 4, 443013, 20, -1.0, -1.0, 0.01, 443, 0 }, //
{"kIncohJpsiToEl", 4, 443011, 20, -1.0, -1.0, 0.01, 443, 0 }, //
Expand All @@ -100,13 +101,16 @@ class GeneratorStarlight_class : public Generator
{"kIncohPsi2sToElPi", 4, 444011, 20, -1.0, -1.0, 0.01, 100443, 1 }, //
{"kIncohUpsilonToMu", 4, 553013, 20, -1.0, -1.0, 0.01, 553, 0 }, //
{"kIncohUpsilonToEl", 4, 553011, 20, -1.0, -1.0, 0.01, 553, 0 }, //
{"kDpmjetSingle", 5, 113, 20, -1.0, -1.0, 0.01, -1, 0 }, //
// {"kDpmjetSingle", 5, 113, 20, -1.0, -1.0, 0.01, -1, 0 }, //
{"kTauLowToEl3Pi", 1, 15, 292, 0.4, 15.0, 0.01, -1, 1 }, // from 0.4 to 15 GeV
{"kTauLowToPo3Pi", 1, 15, 292, 0.4, 15.0, 0.01, -1, 1 }, // from 0.4 to 15 GeV
{"kTauMediumToEl3Pi", 1, 15, 264, 1.8, 15.0, 0.01, -1, 1 }, // from 1.8 to 15 GeV
{"kTauMediumToPo3Pi", 1, 15, 264, 1.8, 15.0, 0.01, -1, 1 }, // from 1.8 to 15 GeV
{"kTauHighToEl3Pi", 1, 15, 220, 4.0, 15.0, 0.01, -1, 1 }, // from 4.0 to 15 GeV
{"kTauHighToPo3Pi", 1, 15, 220, 4.0, 15.0, 0.01, -1, 1 }, // from 4.0 to 15 GeV
{"kTauLowToElMu", 1, 15, 292, 0.4, 15.0, 0.01, -1, 1 }, // from 0.4 to 15 GeV
{"kTauLowToElPiPi0", 1, 15, 292, 0.4, 15.0, 0.01, -1, 1 }, // from 0.4 to 15 GeV
{"kTauLowToPoPiPi0", 1, 15, 292, 0.4, 15.0, 0.01, -1, 1 }, // from 0.4 to 15 GeV
};

const int nProcess = sizeof(slConfig)/sizeof(SLConfig);
Expand Down Expand Up @@ -266,8 +270,8 @@ class GeneratorStarlight_class : public Generator
1,
(mPdgMother != -1 ? 0 :-1),
-1,
slPart->getFirstDaughter(),
slPart->getLastDaughter(),
-1,
-1,
slPart->GetPx(),
slPart->GetPy(),
slPart->GetPz(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// o2-sim -j 4 -n 10 -g external -t external -m "PIPE ITS TPC" -o sgn --configFile GeneratorHF_bbbar_midy.ini
//
//
R__ADD_INCLUDE_PATH($O2DPG_ROOT/MC/config/PWGDQ/EvtGen)
R__ADD_INCLUDE_PATH($O2DPG_ROOT/MC/config/PWGUD/external/generator)
R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT/MC/config/PWGDQ/EvtGen)
R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT/MC/config/PWGUD/external/generator)
#include "GeneratorEvtGen.C"
#include "GeneratorStarlight.C"

Expand All @@ -24,14 +24,17 @@ FairGenerator*
gen->AddPdg(-15,4);
if (configuration.find("kTau") == std::string::npos) gen->SetPolarization(1); //Transversal

TString pathO2 = gSystem->ExpandPathName("$O2DPG_ROOT/MC/config/PWGUD/external/generator/DecayTablesEvtGen");
TString pathO2 = gSystem->ExpandPathName("$O2DPG_MC_CONFIG_ROOT/MC/config/PWGUD/external/generator/DecayTablesEvtGen");
if (configuration.find("Psi2sToMuPi") != std::string::npos) gen->SetDecayTable(Form("%s/PSI2S.MUMUPIPI.DEC",pathO2.Data()));
else if (configuration.find("Psi2sToElPi") != std::string::npos) gen->SetDecayTable(Form("%s/PSI2S.EEPIPI.DEC",pathO2.Data()));
else if (configuration.find("RhoPrime") != std::string::npos) gen->SetDecayTable(Form("%s/RHOPRIME.RHOPIPI.DEC",pathO2.Data()));
else if (configuration.find("OmegaTo3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/OMEGA.3PI.DEC",pathO2.Data()));
else if (configuration.find("JpsiToElRad") != std::string::npos) gen->SetDecayTable(Form("%s/JPSI.EE.DEC",pathO2.Data()));
else if (configuration.find("ToEl3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.EL3PI.DEC",pathO2.Data()));
else if (configuration.find("ToPo3Pi") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.PO3PI.DEC",pathO2.Data()));
else if (configuration.find("ToElMu") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.ELMU.DEC",pathO2.Data()));
else if (configuration.find("ToElPiPi0") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.ELPI.DEC",pathO2.Data()));
else if (configuration.find("ToPoPiPi0") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.POPI.DEC",pathO2.Data()));

return gen;
}
8 changes: 4 additions & 4 deletions MC/config/PWGUD/ini/makeStarlightConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
parser.add_argument('--rapidity', default='cent', choices=['cent_rap', 'muon_rap', 'cent_eta', 'muon_eta'],
help='Rapidity to select')

parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa','kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl', 'kDpmjetSingle', 'kTauLowToEl3Pi', 'kTauLowToPo3Pi', 'kTauMediumToEl3Pi', 'kTauMediumToPo3Pi' ,'kTauHighToEl3Pi' ,'kTauHighToPo3Pi'],
parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa', 'kCohPhiToEl', 'kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl', 'kDpmjetSingle', 'kTauLowToEl3Pi', 'kTauLowToPo3Pi', 'kTauMediumToEl3Pi', 'kTauMediumToPo3Pi', 'kTauHighToEl3Pi', 'kTauHighToPo3Pi', 'kTauLowToElMu', 'kTauLowToElPiPi0', 'kTauLowToPoPiPi0'],
help='Process to switch on')


Expand Down Expand Up @@ -69,15 +69,15 @@
### Generator
fout.write('[GeneratorExternal] \n')
if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'RhoPrime' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process or 'kTau' in args.process:
fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n')
fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n')
fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,pZ,pA,tZ,tA))
else:
fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C \n')
fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C \n')
fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,pZ,pA,tZ,tA))

###Trigger
fout.write('[TriggerExternal] \n')
fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C \n')
fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C \n')
if 'kTwoGamma' in args.process or 'kTau' in args.process:
if args.rapidity == 'cent_eta':
fout.write('funcName = selectDirectPartInAcc(-0.9,0.9) \n')
Expand Down
41 changes: 41 additions & 0 deletions MC/config/examples/epos4/epos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
# Script based on CRMC example
# EPOS4 option files must contain ihepmc set to 2 to print HepMC
# data on stdout. -hepmc flag is not needed anymore, but -hepstd is fundamental
# in order not to print useless information on stdout (a z-*optns*.mtr file will be created)

optns="example"
seed=$RANDOM

while test $# -gt 0 ; do
case $1 in
-i|--input) optns=$2 ; shift ;;
-s|--seed) seed=$2 ; shift ;;
-h|--help) usage; exit 0 ;;
esac
shift
done

if [ ! -f $optns.optns ]; then
echo "Error: Options file $optns.optns not found"
exit 1
fi

if [ $seed -eq 0 ]; then
echo "Seed can't be 0, random number will be used"
seed=$RANDOM
fi

# Check if the environment variable EPO4 is set (mandatory with o2dpg-sim-tests on CI machines)
# If not, set all the EPOS4 related variables, most likely they are unset as well.
if [ -z "${EPO4}" ]; then
export EPO4=$EPOS4_ROOT/epos4/
export LIBDIR=$EPOS4_ROOT/epos4/bin
export EPO4VSN=4.0.0
export OPT=./
export HTO=./
export CHK=./
fi

# Or filters the stdout with only HepMC2 useful data
$EPOS4_ROOT/epos4/scripts/epos -hepstd -s $seed $optns | sed -n 's/^\(HepMC::\|[EAUWVP] \)/\1/p'
Loading