From 7107204582c31022f0b5a23f142b740b382af163 Mon Sep 17 00:00:00 2001 From: swenzel Date: Mon, 10 Jun 2024 22:17:39 +0200 Subject: [PATCH 01/20] Fix return code in grid_submit --- GRID/utils/grid_submit.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GRID/utils/grid_submit.sh b/GRID/utils/grid_submit.sh index 0a9fd83cf..d8fb95397 100755 --- a/GRID/utils/grid_submit.sh +++ b/GRID/utils/grid_submit.sh @@ -576,12 +576,14 @@ export PATH=$PATH:$PWD # source the actual job script from the work dir chmod +x ./alien_jobscript.sh ./alien_jobscript.sh +# fetch the return code +RC=$? # just to be sure that we get the logs (temporarily disabled since the copy seems to hang sometimes) #cp alien_log_${ALIEN_PROC_ID:-0}.txt logtmp_${ALIEN_PROC_ID:-0}.txt #[ "${ALIEN_JOB_OUTPUTDIR}" ] && upload_to_Alien logtmp_${ALIEN_PROC_ID:-0}.txt ${ALIEN_JOB_OUTPUTDIR}/ -echo "Job done" +echo "Job done ... exiting with ${RC}" # We need to exit for the ALIEN JOB HANDLER! -exit 0 +exit ${RC} From 1ec989d4011dda8c54a62596db405f4298734798 Mon Sep 17 00:00:00 2001 From: Ole Schmidt Date: Fri, 31 May 2024 15:19:13 +0200 Subject: [PATCH 02/20] Prepare QC json fetching from apricot --- DATA/common/gen_topo_helper_functions.sh | 16 ++++++++++++++++ DATA/production/qc-workflow.sh | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/DATA/common/gen_topo_helper_functions.sh b/DATA/common/gen_topo_helper_functions.sh index 6efe2d7f8..e7fc3fa68 100755 --- a/DATA/common/gen_topo_helper_functions.sh +++ b/DATA/common/gen_topo_helper_functions.sh @@ -252,6 +252,7 @@ if [[ "${GEN_TOPO_DEPLOYMENT_TYPE:-}" == "ALICE_STAGING" ]]; then else GEN_TOPO_QC_CONSUL_SERVER=alio2-cr1-hv-con01.cern.ch fi +GEN_TOPO_QC_APRICOT_SERVER=`curl -s "http://${GEN_TOPO_QC_CONSUL_SERVER}:8500/v1/kv/o2/runtime/aliecs/vars/apricot_endpoint?raw"` add_QC_from_consul() { @@ -268,4 +269,19 @@ add_QC_from_consul() add_W o2-qc "--config $QC_CONFIG_ARG $2" } +add_QC_from_apricot() +{ + if [[ ! -z ${GEN_TOPO_QC_JSON_FILE:-} ]]; then + curl -s -o $GEN_TOPO_QC_JSON_FILE "${GEN_TOPO_QC_APRICOT_SERVER}/${1}?process=true" + if [[ $? != 0 ]]; then + echo "Error fetching QC JSON $1" + exit 1 + fi + QC_CONFIG_ARG="json://${GEN_TOPO_QC_JSON_FILE}" + else + QC_CONFIG_ARG="apricot://${GEN_TOPO_QC_APRICOT_SERVER}$1" + fi + add_W o2-qc "--config $QC_CONFIG_ARG $2" +} + fi # functions.sh sourced diff --git a/DATA/production/qc-workflow.sh b/DATA/production/qc-workflow.sh index c739109e3..10fc2c058 100755 --- a/DATA/production/qc-workflow.sh +++ b/DATA/production/qc-workflow.sh @@ -26,6 +26,13 @@ add_QC_JSON() { echo "Error fetching QC JSON $2" exit 1 fi + elif [[ ${2} =~ ^apricot://.* ]]; then + TMP_FILENAME=$FETCHTMPDIR/$1.$RANDOM.$RANDOM.json + curl -s -o $TMP_FILENAME "${GEN_TOPO_QC_APRICOT_SERVER}/${2/apricot:\/\/o2\//}?process=true" + if [[ $? != 0 ]]; then + echo "Error fetching QC JSON $2" + exit 1 + fi else TMP_FILENAME=$2 fi From 3362e43f2fec01d56e59752f25480e43956699c8 Mon Sep 17 00:00:00 2001 From: Markus Fasel Date: Wed, 12 Jun 2024 09:15:39 +0200 Subject: [PATCH 03/20] [EMCAL-756] Moving windows for EMCAL async QC (#1661) Histograms from cell task: - Amp vs. SM - Time vs. SM - Occupancy > 500 MeV - Av. energy - Av. time For calibration checks. Cycle duration: 5 minutes. --- DATA/production/qc-async/emc.json | 11 +++++++++-- DATA/production/qc-async/emc_PbPb.json | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/DATA/production/qc-async/emc.json b/DATA/production/qc-async/emc.json index be56b362a..d726cdc96 100644 --- a/DATA/production/qc-async/emc.json +++ b/DATA/production/qc-async/emc.json @@ -21,11 +21,18 @@ "className": "o2::quality_control_modules::emcal::CellTask", "moduleName": "QcEMCAL", "detectorName": "EMC", - "cycleDurationSeconds": "60", + "cycleDurationSeconds": "300", "dataSource": { "type": "direct", "query": "emcal-cells:EMC/CELLS/0;emcal-triggerecords:EMC/CELLSTRGR/0" - } + }, + "movingWindows": [ + "averageCellTime_PHYS", + "cellAmplitudeSupermodule_PHYS", + "averageCellEnergy_PHYS", + "averageCellTime_PHYS", + "cellOccupancyEMCwThr_PHYS" + ] }, "ClusterTaskEMCAL": { "active": "true", diff --git a/DATA/production/qc-async/emc_PbPb.json b/DATA/production/qc-async/emc_PbPb.json index 5e39f780f..0380c2283 100644 --- a/DATA/production/qc-async/emc_PbPb.json +++ b/DATA/production/qc-async/emc_PbPb.json @@ -21,7 +21,7 @@ "className": "o2::quality_control_modules::emcal::CellTask", "moduleName": "QcEMCAL", "detectorName": "EMC", - "cycleDurationSeconds": "60", + "cycleDurationSeconds": "300", "dataSource": { "type": "direct", "query": "emcal-cells:EMC/CELLS/0;emcal-triggerecords:EMC/CELLSTRGR/0" @@ -35,7 +35,14 @@ "TotalEnergyRangeSM": "200", "TotalEnergyRange": "2000", "TotalEnergyMaxCellTime": "25" - } + }, + "movingWindows": [ + "averageCellTime_PHYS", + "cellAmplitudeSupermodule_PHYS", + "averageCellEnergy_PHYS", + "averageCellTime_PHYS", + "cellOccupancyEMCwThr_PHYS" + ] }, "ClusterTaskEMCAL": { "active": "true", From 676794369b2c8bcd2e29e8d25d09ef251d257161 Mon Sep 17 00:00:00 2001 From: jesgum Date: Wed, 12 Jun 2024 11:21:03 +0200 Subject: [PATCH 04/20] Add PbPb 5.36 TeV configuration --- MC/config/ALICE3/ini/pythia8_PbPb_536tev.ini | 9 +++++++++ .../ALICE3/ini/tests/pythia8_PbPb_536tev.C | 8 ++++++++ .../pythia8/generator/pythia8_PbPb_536tev.cfg | 17 +++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 MC/config/ALICE3/ini/pythia8_PbPb_536tev.ini create mode 100644 MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C create mode 100644 MC/config/ALICE3/pythia8/generator/pythia8_PbPb_536tev.cfg diff --git a/MC/config/ALICE3/ini/pythia8_PbPb_536tev.ini b/MC/config/ALICE3/ini/pythia8_PbPb_536tev.ini new file mode 100644 index 000000000..7728968bf --- /dev/null +++ b/MC/config/ALICE3/ini/pythia8_PbPb_536tev.ini @@ -0,0 +1,9 @@ +[Diamond] +width[2]=6.0 + +[GeneratorExternal] +fileName=${O2DPG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C +funcName=generator_pythia8_ALICE3() + +[GeneratorPythia8] +config=${O2DPG_ROOT}/MC/config/ALICE3/pythia8/generator/pythia8_PbPb_536tev.cfg diff --git a/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C b/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C new file mode 100644 index 000000000..49c15680f --- /dev/null +++ b/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C @@ -0,0 +1,8 @@ +int External() { + return 0; +} + +int Pythia8() +{ + return External(); +} \ No newline at end of file diff --git a/MC/config/ALICE3/pythia8/generator/pythia8_PbPb_536tev.cfg b/MC/config/ALICE3/pythia8/generator/pythia8_PbPb_536tev.cfg new file mode 100644 index 000000000..be69adf17 --- /dev/null +++ b/MC/config/ALICE3/pythia8/generator/pythia8_PbPb_536tev.cfg @@ -0,0 +1,17 @@ +### Specify beams +Beams:idA = 1000822080 +Beams:idB = 1000822080 +Beams:eCM = 5360.0 ### energy + +Beams:frameType = 1 +ParticleDecays:limitTau0 = on +ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c + +### Initialize the Angantyr model to fit the total and semi-includive +### cross sections in Pythia within some tolerance. +HeavyIon:SigFitErr = 0.02,0.02,0.1,0.05,0.05,0.0,0.1,0.0 + +### These parameters are typicall suitable for sqrt(S_NN)=5TeV +HeavyIon:SigFitDefPar = 17.24,2.15,0.33,0.0,0.0,0.0,0.0,0.0 + +Random:setSeed = on From a1182d966b535b2756ea540867624331af9fcf88 Mon Sep 17 00:00:00 2001 From: DanielSamitz Date: Wed, 12 Jun 2024 11:51:19 +0200 Subject: [PATCH 05/20] change weighting mode --- MC/config/PWGEM/ini/GeneratorEMCocktail.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MC/config/PWGEM/ini/GeneratorEMCocktail.ini b/MC/config/PWGEM/ini/GeneratorEMCocktail.ini index 1959479f4..ab2373620 100644 --- a/MC/config/PWGEM/ini/GeneratorEMCocktail.ini +++ b/MC/config/PWGEM/ini/GeneratorEMCocktail.ini @@ -3,4 +3,4 @@ [GeneratorExternal] fileName = ${O2DPG_ROOT}/MC/config/PWGEM/external/generator/GeneratorEMCocktailV2.C -funcName=GenerateEMCocktail(400,0,3,63,"${O2DPG_ROOT}/MC/config/PWGEM/parametrizations/PbPb5TeV_central.json","5TeV_0005_wRatio_etatest",350,0.0,30.0,10000,1,1,0,0,"",0,1.1,"${O2DPG_ROOT}/MC/config/PWGEM/decaytables/decaytable_LMee.dat",0) \ No newline at end of file +funcName=GenerateEMCocktail(400,0,3,63,"${O2DPG_ROOT}/MC/config/PWGEM/parametrizations/PbPb5TeV_central.json","5TeV_0005_wRatio_etatest",350,0.0,30.0,10000,1,1,0,0,"",0,1.1,"${O2DPG_ROOT}/MC/config/PWGEM/decaytables/decaytable_LMee.dat",1) \ No newline at end of file From 36522d475666654e39c9b526ac41e3dc01cf5b0d Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Fri, 14 Jun 2024 12:06:06 +0200 Subject: [PATCH 06/20] PWGHF: Pb-Pb generator to embed N HF events in a single underlying event. (#1666) * Pb-Pb generator to embed N HF events in a single underlying event. * Fix HF ev. generator creation. * fix * Fix particle stack filling and mother/daughter indixing. * Add .ini configuration file and tester, and hardQCD.cfg file. * Define mNumSigEvs depending on the collision impact parameter. * Fix o2sim_Kine path in test. * Add description. * Update author list of .cfg file. * Implement suggestions by fgrosa. * Function documentation. * Overriding generate event, to avoid simulating 1 untriggered event. --------- Co-authored-by: Mattia Faggin --- .../generator/generator_pythia8_embed_hf.C | 191 ++++++++++++++++++ .../GeneratorHF_D2H_ccbar_and_bbbar_PbPb.ini | 8 + .../GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C | 129 ++++++++++++ ...adronic_with_decays_Mode2_hardQCD_5TeV.cfg | 148 ++++++++++++++ 4 files changed, 476 insertions(+) create mode 100644 MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C create mode 100644 MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.ini create mode 100644 MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C create mode 100644 MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg diff --git a/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C b/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C new file mode 100644 index 000000000..8815f5ae1 --- /dev/null +++ b/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C @@ -0,0 +1,191 @@ +/////////////////////////////////////////////////////////////////////////////// +/// /// +/// HF MC generator for Pb-Pb /// +/// Option 1: generate N PYTHIA events triggered on ccbar and/or bbbar /// +/// to be embedded with a underlying Pb-Pb event /// +/// /// +/////////////////////////////////////////////////////////////////////////////// + +#include "generator_pythia8_gaptriggered_hf.C" + +using namespace Pythia8; + +namespace hf_generators +{ + enum GenType : int { + GapTriggeredCharm = 0, // --> GeneratorPythia8GapTriggeredCharm: charm enriched + GapTriggeredBeauty, // --> GeneratorPythia8GapTriggeredBeauty: beauty enriched + GapTriggeredCharmAndBeauty, // --> GeneratorPythia8GapTriggeredCharmAndBeauty: charm and beauty enriched (with same ratio) + GapHF, // --> GeneratorPythia8GapHF + NGenType + }; +} + +class GeneratorPythia8EmbedHF : public o2::eventgen::GeneratorPythia8 +{ +public: + + /// default constructor + GeneratorPythia8EmbedHF() = default; + + /// constructor + //GeneratorPythia8EmbedHF(int numSigEvs = 1) { + // mNumSigEvs = numSigEvs; + // //mGeneratedEvents = 0; + //} + + /// Destructor + ~GeneratorPythia8EmbedHF() = default; + + /// Init + bool Init() override + { + return o2::eventgen::GeneratorPythia8::Init(); + } + + /// @brief setup the event generator for HF signals + /// \param gentype generator type (only ccbar, only bbbar, both) + /// \param yQuarkMin minimum quark rapidity + /// \param yQuarkMax maximum quark rapidity + /// \param yHadronMin minimum hadron rapidity + /// \param yHadronMax maximum hadron rapidity + /// \param hadronPdgList list of PDG codes for hadrons to be used in trigger + void setupGeneratorEvHF(int genType, float yQuarkMin, float yQuarkMax, float yHadronMin, float yHadronMax, std::vector hadronPdgList = {}) { + mGeneratorEvHF = nullptr; + switch (genType) + { + case hf_generators::GapTriggeredCharm: + LOG(info) << "********** [GeneratorPythia8EmbedHF] configuring GeneratorPythia8GapTriggeredCharm **********"; + LOG(info) << "********** Default number of HF signal events to be merged (updated by notifyEmbedding): " << mNumSigEvs; + mGeneratorEvHF = dynamic_cast(GeneratorPythia8GapTriggeredCharm(/*no gap trigger*/1, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList)); + break; + case hf_generators::GapTriggeredBeauty: + LOG(info) << "********** [GeneratorPythia8EmbedHF] configuring GeneratorPythia8GapTriggeredBeauty **********"; + LOG(info) << "********** Default number of HF signal events to be merged (updated by notifyEmbedding): " << mNumSigEvs; + mGeneratorEvHF = dynamic_cast(GeneratorPythia8GapTriggeredBeauty(/*no gap trigger*/1, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList)); + break; + case hf_generators::GapTriggeredCharmAndBeauty: + LOG(info) << "********** [GeneratorPythia8EmbedHF] configuring GeneratorPythia8GapTriggeredCharmAndBeauty **********"; + LOG(info) << "********** Default number of HF signal events to be merged (updated by notifyEmbedding): " << mNumSigEvs; + mGeneratorEvHF = dynamic_cast(GeneratorPythia8GapTriggeredCharmAndBeauty(/*no gap trigger*/1, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList)); + break; + case hf_generators::GapHF: + LOG(info) << "********** [GeneratorPythia8EmbedHF] configuring GeneratorPythia8GapHF **********"; + LOG(info) << "********** Default number of HF signal events to be merged (updated by notifyEmbedding): " << mNumSigEvs; + mGeneratorEvHF = dynamic_cast(GeneratorPythia8GapHF(/*no gap trigger*/1, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList)); + break; + default: + LOG(fatal) << "********** [GeneratorPythia8EmbedHF] bad configuration, fix it! **********"; + break; + } + mGeneratorEvHF->Init(); + } + + // This function is called by the primary generator + // for each event in case we are in embedding mode. + // We use it to setup the number of signal events + // to be generated and to be embedded on the background. + void notifyEmbedding(const o2::dataformats::MCEventHeader* bkgHeader) override + { + LOG(info) << "[notifyEmbedding] ----- Function called"; + + /// Impact parameter between the two nuclei + const float x = bkgHeader->GetB(); + LOG(info) << "[notifyEmbedding] ----- Collision impact parameter: " << x; + + /// number of events to be embedded in a background event + mNumSigEvs = std::max(1.,120.*(x<5.)+80.*(1.-x/20.)*(x>5.)*(x<11.)+240.*(1.-x/13.)*(x>11.)); + LOG(info) << "[notifyEmbedding] ----- generating " << mNumSigEvs << " signal events " << std::endl; + }; + +protected: + +/// @brief Main function for event generation +bool generateEvent() override +{ + /// Overriding that from GeneratorPythia8, to avoid the simulation of an untriggered event as first + return true; +} + +/// @brief Main function to copy the generated particles in mPythia.event into the stack (this.mParticles) +Bool_t importParticles() override +{ + /// Import particles from generated event + /// This should not do anything now, since we override generateEvent + GeneratorPythia8::importParticles(); + + /// Generate mNumSigEvs HF events to be merged in one + int nEvsHF = 0; + while(nEvsHF < mNumSigEvs) { + + /// generate the HF event + bool genOk = false; + while(!genOk) { + genOk = (mGeneratorEvHF->generateEvent() && mGeneratorEvHF->importParticles() /*copy particles from mGeneratorEvHF.mPythia.event to mGeneratorEvHF.mParticles*/ ); + } + + /// copy the particles from the HF event in the particle stack + auto particlesHfEvent = mGeneratorEvHF->getParticles(); + int originalSize = mParticles.size(); // stack of this event generator + for(int iPart=0; iPart= 0) particle.SetFirstMother(particle.GetFirstMother() + originalSize); + if(particle.GetFirstDaughter() >= 0) particle.SetFirstDaughter(particle.GetFirstDaughter() + originalSize); + if(particle.GetLastDaughter() >= 0) particle.SetLastDaughter(particle.GetLastDaughter() + originalSize); + + /// copy inside this.mParticles from mGeneratorEvHF.mParticles, i.e. the particles generated in mGeneratorEvHF + mParticles.push_back(particle); + } + + /// one more event generated, let's update the counter and clear it, to allow the next generation + nEvsHF++; + //mGeneratedEvents++; + mGeneratorEvHF->clearParticles(); + } + + return true; +} + +private: + + Generator* mGeneratorEvHF; // to generate HF signal events + + int mNumSigEvs{1}; // number of HF signal events to be merged in one Pythia event + //unsigned long long mGeneratedEvents; + +}; + +// Charm enriched +FairGenerator * GeneratorPythia8EmbedHFCharm(float yQuarkMin = -1.5, float yQuarkMax = 1.5, float yHadronMin = -1.5, float yHadronMax = 1.5, std::vector hadronPdgList = {}) +{ + auto myGen = new GeneratorPythia8EmbedHF(); + + /// setup the internal generator for HF events + myGen->setupGeneratorEvHF(hf_generators::GapTriggeredCharm, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList); + + return myGen; +} + +// Beauty enriched +FairGenerator * GeneratorPythia8EmbedHFBeauty(float yQuarkMin = -1.5, float yQuarkMax = 1.5, float yHadronMin = -1.5, float yHadronMax = 1.5, std::vector hadronPdgList = {}) +{ + auto myGen = new GeneratorPythia8EmbedHF(); + + /// setup the internal generator for HF events + myGen->setupGeneratorEvHF(hf_generators::GapTriggeredBeauty, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList); + + return myGen; +} + +// Charm and beauty enriched (with same ratio) +FairGenerator * GeneratorPythia8EmbedHFCharmAndBeauty(float yQuarkMin = -1.5, float yQuarkMax = 1.5, float yHadronMin = -1.5, float yHadronMax = 1.5, std::vector hadronPdgList = {}) +{ + auto myGen = new GeneratorPythia8EmbedHF(); + + /// setup the internal generator for HF events + myGen->setupGeneratorEvHF(hf_generators::GapTriggeredCharmAndBeauty, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList); + + return myGen; +} \ No newline at end of file diff --git a/MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.ini b/MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.ini new file mode 100644 index 000000000..8c71faab3 --- /dev/null +++ b/MC/config/PWGHF/ini/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.ini @@ -0,0 +1,8 @@ +### The external generator derives from GeneratorPythia8. +[GeneratorExternal] +fileName=${O2DPG_ROOT}/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C +funcName=GeneratorPythia8EmbedHFCharmAndBeauty() + +[GeneratorPythia8] +config=${O2DPG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg +includePartonEvent=true diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C new file mode 100644 index 000000000..84d39b433 --- /dev/null +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C @@ -0,0 +1,129 @@ +int External() { + std::string path{"o2sim_Kine.root"}; + //std::string path{"tf1/sgn_1_Kine.root"}; + + int checkPdgQuarkOne{4}; + int checkPdgQuarkTwo{5}; + float ratioTrigger = 1.; // one event triggered out of 1 + + std::vector checkPdgHadron{411, 421, 431, 4122, 4132, 4232, 4332}; + std::map>> checkHadronDecays{ // sorted pdg of daughters + {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ + {421, {{-321, 211}, {-321, 111, 211}}}, // D0 + {431, {{211, 333}, {-313, 321}}}, // Ds+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4132, {{211, 3312}}}, // Xic0 + {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ + {4332, {{211, 3334}}} // Omegac+ + }; + + TFile file(path.c_str(), "READ"); + if (file.IsZombie()) { + std::cerr << "Cannot open ROOT file " << path << "\n"; + return 1; + } + + auto tree = (TTree *)file.Get("o2sim"); + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + o2::dataformats::MCEventHeader *eventHeader = nullptr; + tree->SetBranchAddress("MCEventHeader.", &eventHeader); + + int nEventsMB{}, nEventsInjOne{}, nEventsInjTwo{}; + int nQuarksOne{}, nQuarksTwo{}, nSignals{}, nSignalGoodDecay{}; + auto nEvents = tree->GetEntries(); + + for (int i = 0; i < nEvents; i++) { + tree->GetEntry(i); + + // check subgenerator information + //if (eventHeader->hasInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID)) { + // bool isValid = false; + // int subGeneratorId = eventHeader->getInfo(o2::mcgenid::GeneratorProperty::SUBGENERATORID, isValid); + // if (subGeneratorId == 0) { + // nEventsMB++; + // } else if (subGeneratorId == checkPdgQuarkOne) { + // nEventsInjOne++; + // } else if (subGeneratorId == checkPdgQuarkTwo) { + // nEventsInjTwo++; + // } + //} + + for (auto &track : *tracks) { + auto pdg = track.GetPdgCode(); + if (std::abs(pdg) == checkPdgQuarkOne) { + nQuarksOne++; + continue; + } + if (std::abs(pdg) == checkPdgQuarkTwo) { + nQuarksTwo++; + continue; + } + if (std::find(checkPdgHadron.begin(), checkPdgHadron.end(), std::abs(pdg)) != checkPdgHadron.end()) { // found signal + nSignals++; // count signal PDG + + std::vector pdgsDecay{}; + std::vector pdgsDecayAntiPart{}; + for (int j{track.getFirstDaughterTrackId()}; j <= track.getLastDaughterTrackId(); ++j) { + auto pdgDau = tracks->at(j).GetPdgCode(); + pdgsDecay.push_back(pdgDau); + if (pdgDau != 333) { // phi is antiparticle of itself + pdgsDecayAntiPart.push_back(-pdgDau); + } else { + pdgsDecayAntiPart.push_back(pdgDau); + } + } + + std::sort(pdgsDecay.begin(), pdgsDecay.end()); + std::sort(pdgsDecayAntiPart.begin(), pdgsDecayAntiPart.end()); + + for (auto &decay : checkHadronDecays[std::abs(pdg)]) { + if (pdgsDecay == decay || pdgsDecayAntiPart == decay) { + nSignalGoodDecay++; + break; + } + } + } + } + } + + std::cout << "--------------------------------\n"; + std::cout << "# Events: " << nEvents << "\n"; + //std::cout << "# MB events: " << nEventsMB << "\n"; + //std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkOne) << nEventsInjOne << "\n"; + //std::cout << Form("# events injected with %d quark pair: ", checkPdgQuarkTwo) << nEventsInjTwo << "\n"; + std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkOne) << nQuarksOne << "\n"; + std::cout << Form("# %d (anti)quarks: ", checkPdgQuarkTwo) << nQuarksTwo << "\n"; + std::cout <<"# signal hadrons: " << nSignals << "\n"; + std::cout <<"# signal hadrons decaying in the correct channel: " << nSignalGoodDecay << "\n"; + + //if (nEventsMB < nEvents * (1 - ratioTrigger) * 0.95 || nEventsMB > nEvents * (1 - ratioTrigger) * 1.05) { // we put some tolerance since the number of generated events is small + // std::cerr << "Number of generated MB events different than expected\n"; + // return 1; + //} + //if (nEventsInjOne < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInjOne > nEvents * ratioTrigger * 0.5 * 1.05) { + // std::cerr << "Number of generated events injected with " << checkPdgQuarkOne << " different than expected\n"; + // return 1; + //} + //if (nEventsInjTwo < nEvents * ratioTrigger * 0.5 * 0.95 || nEventsInjTwo > nEvents * ratioTrigger * 0.5 * 1.05) { + // std::cerr << "Number of generated events injected with " << checkPdgQuarkTwo << " different than expected\n"; + // return 1; + //} + + if (nQuarksOne < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation + std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkOne << " lower than expected\n"; + return 1; + } + if (nQuarksTwo < nEvents * ratioTrigger) { // we expect anyway more because the same quark is repeated several time, after each gluon radiation + std::cerr << "Number of generated (anti)quarks " << checkPdgQuarkTwo << " lower than expected\n"; + return 1; + } + + float fracForcedDecays = float(nSignalGoodDecay) / nSignals; + if (fracForcedDecays < 0.9) { // we put some tolerance (e.g. due to oscillations which might change the final state) + std::cerr << "Fraction of signals decaying into the correct channel " << fracForcedDecays << " lower than expected\n"; + return 1; + } + + return 0; +} diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg new file mode 100644 index 000000000..90910a942 --- /dev/null +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg @@ -0,0 +1,148 @@ +### authors: Fabrizio Grosa (fabrizio.grosa@cern.ch) +### Mattia Faggin (mattia.faggin@cern.ch) +### last update: June 2024 + +### beams +Beams:idA 2212 # proton +Beams:idB 2212 # proton +Beams:eCM 5360. # GeV + +### processes: c-cbar and b-bbar processes +HardQCD:hardccbar on +HardQCD:hardbbbar on +HardQCD:gg2ccbar on +HardQCD:qqbar2ccbar on +HardQCD:gg2bbbar on +HardQCD:qqbar2bbbar on + +### decays +ParticleDecays:limitTau0 on +ParticleDecays:tau0Max 10. + +### switching on Pythia Mode2 +ColourReconnection:mode 1 +ColourReconnection:allowDoubleJunRem off +ColourReconnection:m0 0.3 +ColourReconnection:allowJunctions on +ColourReconnection:junctionCorrection 1.20 +ColourReconnection:timeDilationMode 2 +ColourReconnection:timeDilationPar 0.18 +StringPT:sigma 0.335 +StringZ:aLund 0.36 +StringZ:bLund 0.56 +StringFlav:probQQtoQ 0.078 +StringFlav:ProbStoUD 0.2 +StringFlav:probQQ1toQQ0join 0.0275,0.0275,0.0275,0.0275 +MultiPartonInteractions:pT0Ref 2.15 +BeamRemnants:remnantMode 1 +BeamRemnants:saturation 5 + +# Correct decay lengths (wrong in PYTHIA8 decay table) +# Lb +5122:tau0 = 0.4390 +# Xic0 +4132:tau0 = 0.0455 +# OmegaC +4332:tau0 = 0.0803 + +### Force golden charm hadrons decay modes for D2H studies +### add D+ decays absent in PYTHIA8 decay table and set BRs from PDG for other +411:oneChannel = 1 0.0752 0 -321 211 211 +411:addChannel = 1 0.0104 0 -313 211 +411:addChannel = 1 0.0156 0 311 211 +411:addChannel = 1 0.0752 0 333 211 # to have the same amount of D+->KKpi and D+->Kpipi +## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other +4122:oneChannel = 1 0.0196 100 2212 -313 +4122:addChannel = 1 0.0108 100 2224 -321 +4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.035 0 2212 -321 211 +4122:addChannel = 1 0.0159 0 2212 311 +### add Xic+ decays absent in PYTHIA8 decay table +4232:addChannel = 1 0.2 0 2212 -313 +4232:addChannel = 1 0.2 0 2212 -321 211 +4232:addChannel = 1 0.2 0 3324 211 +4232:addChannel = 1 0.2 0 3312 211 211 +### add Xic0 decays absent in PYTHIA8 decay table +4132:addChannel = 1 0.0143 0 3312 211 +### add OmegaC decays absent in PYTHIA8 decay table +4332:addChannel = 1 0.5 0 3334 211 +4332:addChannel = 1 0.5 0 3312 211 + +### K* -> K pi +313:onMode = off +313:onIfAll = 321 211 +### for Ds -> Phi pi+ +333:onMode = off +333:onIfAll = 321 321 +### for D0 -> rho0 pi+ k- +113:onMode = off +113:onIfAll = 211 211 +### for Lambda_c -> Delta++ K- +2224:onMode = off +2224:onIfAll = 2212 211 +### for Lambda_c -> Lambda(1520) K- +102134:onMode = off +102134:onIfAll = 2212 321 +### for Xic0 -> pi Xi -> pi pi Lambda -> pi pi pi p +### and Omega_c -> pi Xi -> pi pi Lambda -> pi pi pi p +3312:onMode = off +3312:onIfAll = 3122 -211 +3122:onMode = off +3122:onIfAll = 2212 -211 +### for Omega_c -> pi Omega -> pi K Lambda -> pi K pi p +3334:onMode = off +3334:onIfAll = 3122 -321 + +### switch off all decay channels +411:onMode = off +421:onMode = off +431:onMode = off +4112:onMode = off +4122:onMode = off +4232:onMode = off +4132:onMode = off +443:onMode = off +4332:onMode = off + +### D0 -> K pi +421:onIfMatch = 321 211 + +### D+/- -> K pi pi +411:onIfMatch = 321 211 211 +### D+/- -> K* pi +411:onIfMatch = 313 211 +### D+/- -> phi pi +411:onIfMatch = 333 211 + +### D_s -> K K* +431:onIfMatch = 321 313 +### D_s -> Phi pi +431:onIfMatch = 333 211 + +### Lambda_c -> p K* +4122:onIfMatch = 2212 313 +### Lambda_c -> Delta K +4122:onIfMatch = 2224 321 +### Lambda_c -> Lambda(1520) pi +4122:onIfMatch = 3124 211 +### Lambda_c -> p K pi +4122:onIfMatch = 2212 321 211 +### Lambda_c -> pK0s +4122:onIfMatch = 2212 311 + +### Xic+ -> pK*0 +4232:onIfMatch = 2212 313 +### Xic+ -> p K- pi+ +4232:onIfMatch = 2212 321 211 +### Xic+ -> Xi*0 pi+, Xi*->Xi- pi+ +4232:onIfMatch = 3324 211 +### Xic+ -> Xi- pi+ pi+ +4232:onIfMatch = 3312 211 211 + +### Xic0 -> Xi- pi+ +4132:onIfMatch = 3312 211 + +### Omega_c -> Omega pi +4332:onIfMatch = 3334 211 +### Omega_c -> Xi pi +4332:onIfMatch = 3312 211 From b860a964bf50b268a0dc770a8f420d9b5c3574ec Mon Sep 17 00:00:00 2001 From: rmunzer <97919772+rmunzer@users.noreply.github.com> Date: Tue, 18 Jun 2024 00:55:13 +0200 Subject: [PATCH 07/20] Change from consul to apricot (tpc standalone + global sync) (#1667) * Change tpc qc from consul to apricot configuration * change path of laser qc --- DATA/production/calib/tpc-laser-aggregator.sh | 16 ++-------- DATA/production/calib/tpc-laser-filter.sh | 31 ++----------------- DATA/production/calib/tpc-laser.sh | 4 +-- DATA/production/calib/tpc-pedestal.sh | 4 +-- DATA/production/calib/tpc-pulser-long.sh | 4 +-- DATA/production/calib/tpc-pulser.sh | 4 +-- DATA/production/qc-workflow.sh | 2 +- 7 files changed, 13 insertions(+), 52 deletions(-) diff --git a/DATA/production/calib/tpc-laser-aggregator.sh b/DATA/production/calib/tpc-laser-aggregator.sh index d326e0b2e..2507a1e39 100755 --- a/DATA/production/calib/tpc-laser-aggregator.sh +++ b/DATA/production/calib/tpc-laser-aggregator.sh @@ -14,7 +14,7 @@ HOST=localhost QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-raw-qcmn" -QC_CONFIG_CONSUL="/o2/components/qc/ANY/any/tpc-raw-qcmn" +QC_CONFIG="components/qc/ANY/any/tpc-raw-qcmn" max_events=300 publish_after=440 min_tracks=0 @@ -50,7 +50,7 @@ add_W o2-dpl-raw-proxy " --proxy-name tpc-laser-input-proxy --dataspec \"$PROXY_ add_W o2-tpc-calib-laser-tracks "${REMAP} --use-filtered-tracks ${EXTRA_CONFIG_TRACKS} --min-tfs=${min_tracks} " add_W o2-tpc-calib-pad-raw " ${EXTRA_CONFIG}" "${CALIB_CONFIG}" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path ${CCDB_PATH}" "" 0 -#add_QC_from_consul "${QC_CONFIG_CONSUL}" "--local --host lcoalhost" +#add_QC_from_apricot "${QC_CONFIG_CONSUL}" "--local --host lcoalhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" if [ $WORKFLOWMODE == "print" ]; then @@ -62,16 +62,4 @@ else eval $WORKFLOW fi -#o2-dpl-raw-proxy $ARGS_ALL \ -# --proxy-name tpc-laser-input-proxy \ -# --dataspec "${PROXY_INSPEC}" \ -# --network-interface ib0 \ -# --channel-config "name=tpc-laser-input-proxy,method=bind,type=pull,rateLogging=0,transport=zeromq" \ -# | o2-tpc-calib-laser-tracks ${ARGS_ALL} --use-filtered-tracks ${EXTRA_CONFIG_TRACKS} --min-tfs=${min_tracks} \ -# --condition-remap "file:///home/wiechula/processData/inputFilesTracking/triggeredLaser/=GLO/Config/GRPECS;file:///home/wiechula/processData/inputFilesTracking/triggeredLaser/=GLO/Config/GRPMagField;file:///home/wiechula/processData/inputFilesTracking/triggeredLaser=TPC/Calib/LaserTracks" \ -# | o2-tpc-calib-pad-raw ${ARGS_ALL} \ -# --configKeyValues ${CALIB_CONFIG} ${EXTRA_CONFIG} \ -# | o2-calibration-ccdb-populator-workflow ${ARGS_ALL} \ -# --ccdb-path ${CCDB_PATH} \ -# | o2-dpl-run $ARGS_ALL --dds ${WORKFLOWMODE_FILE} diff --git a/DATA/production/calib/tpc-laser-filter.sh b/DATA/production/calib/tpc-laser-filter.sh index 26041ec6e..06a98525e 100755 --- a/DATA/production/calib/tpc-laser-filter.sh +++ b/DATA/production/calib/tpc-laser-filter.sh @@ -47,7 +47,7 @@ PROXY_OUTSPEC="A:TPC/LASERTRACKS;B:TPC/CEDIGITS;D:TPC/CLUSREFS" HOST=localhost QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-laser-calib-qcmn" -QC_CONFIG_CONSUL=/o2/components/qc/ANY/any/tpc-laser-calib-qcmn +QC_CONFIG="components/qc/ANY/any/tpc-laser-calib-qcmn" RAWDIGIT_CONFIG="TPCDigitDump.NoiseThreshold=3;TPCDigitDump.LastTimeBin=600;NameConf.mDirGRP=$FILEWORKDIR;NameConf.mDirGeom=$FILEWORKDIR2;NameConf.mDirCollContext=$FILEWORKDIR;NameConf.mDirMatLUT=$FILEWORKDIR" @@ -74,7 +74,7 @@ add_W o2-tpc-raw-to-digits-workflow "--ignore-grp --input-spec \"$CALIB_INSPEC\" add_W o2-tpc-reco-workflow " ${TPC_CORR_SCALING:-} --disable-ctp-lumi-request --input-type digitizer --output-type \"tracks,disable-writer,clusters\" --disable-mc --pipeline tpc-zsEncoder:20,tpc-tracker:8 ${GPU_CONFIG} ${REMAP} " "${RECO_CONFIG}" add_W o2-tpc-laser-track-filter "" "" 0 add_W o2-dpl-output-proxy " --proxy-name tpc-laser-input-proxy --proxy-channel-name tpc-laser-input-proxy --dataspec \"$PROXY_OUTSPEC\" --channel-config \"name=tpc-laser-input-proxy,method=connect,type=push,transport=zeromq,rateLogging=0\" " "" 0 -add_QC_from_consul "${QC_CONFIG_CONSUL}" "--local --host lcoalhost" +add_QC_from_apricot "${QC_CONFIG}" "--local --host lcoalhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" if [ $WORKFLOWMODE == "print" ]; then @@ -86,30 +86,3 @@ else eval $WORKFLOW fi -#o2-dpl-raw-proxy ${ARGS_ALL} \ -# --dataspec "$PROXY_INSPEC" --inject-missing-data \ -# --readout-proxy "--channel-config 'name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1'" \ -# | o2-tpc-raw-to-digits-workflow ${ARGS_ALL} ${LASER_DECODER_ADD} \ -# --input-spec "$CALIB_INSPEC" \ -# --configKeyValues "TPCDigitDump.NoiseThreshold=3;TPCDigitDump.LastTimeBin=600;$ARGS_ALL_CONFIG" \ -# --pipeline tpc-raw-to-digits-0:20 \ -# --remove-duplicates \ -# --send-ce-digits \ -# | o2-tpc-reco-workflow ${ARGS_ALL} ${TPC_CORR_SCALING:-} \ -# --input-type digitizer \ -# --output-type "tracks,disable-writer,clusters" \ -# --disable-ctp-lumi-request \ -# --disable-mc \ -# --pipeline tpc-zsEncoder:20,tpc-tracker:8 \ -# ${GPU_CONFIG} \ -# --condition-remap "file:///home/wiechula/processData/inputFilesTracking/triggeredLaser/=GLO/Config/GRPECS;file:///home/wiechula/processData/inputFilesTracking/triggeredLaser/=GLO/Config/GRPMagField;file:///home/wiechula/processData/inputFilesTracking/triggeredLaser=TPC/Calib/LaserTracks" \ -# --configKeyValues "${ARGS_ALL_CONFIG};align-geom.mDetectors=none;GPU_global.deviceType=$GPUTYPE;GPU_proc.tpcIncreasedMinClustersPerRow=500000;GPU_proc.ignoreNonFatalGPUErrors=1;$GPU_CONFIG_KEY;GPU_global.tpcTriggeredMode=1;GPU_rec_tpc.clusterError2AdditionalY=0.1;GPU_rec_tpc.clusterError2AdditionalZ=0.15;GPU_rec_tpc.clustersShiftTimebinsClusterizer=35;GPU_proc.memoryScalingFactor=2;GPU_proc_param.tpcTriggerHandling=0" \ -# | o2-tpc-laser-track-filter ${ARGS_ALL} \ -# | o2-dpl-output-proxy ${ARGS_ALL} \ -# --dataspec "$PROXY_OUTSPEC" \ -# --proxy-name tpc-laser-input-proxy \ -# --proxy-channel-name tpc-laser-input-proxy \ -# --channel-config "name=tpc-laser-input-proxy,method=connect,type=push,transport=zeromq,rateLogging=0" \ -# | o2-qc ${ARGS_ALL} --config ${QC_CONFIG} --local --host ${HOST} \ -# | o2-dpl-run ${ARGS_ALL} --dds ${WORKFLOWMODE_FILE} ${GLOBALDPLOPT} - diff --git a/DATA/production/calib/tpc-laser.sh b/DATA/production/calib/tpc-laser.sh index 03b0ec009..a5135b330 100755 --- a/DATA/production/calib/tpc-laser.sh +++ b/DATA/production/calib/tpc-laser.sh @@ -48,7 +48,7 @@ HOST=localhost QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-raw-qcmn" -QC_CONFIG_CONSUL="/o2/components/qc/ANY/any/tpc-raw-qcmn" +QC_CONFIG="components/qc/ANY/any/tpc-raw-qcmn" max_events=300 publish_after=440 @@ -95,7 +95,7 @@ add_W o2-tpc-laser-track-filter "" "" 0 add_W o2-tpc-calib-laser-tracks "--use-filtered-tracks ${EXTRA_CONFIG_TRACKS} --min-tfs=${min_tracks}" add_W o2-tpc-calib-pad-raw " ${EXTRA_CONFIG}" "${CALIB_CONFIG}" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path ${CCDB_PATH}" "" 0 -add_QC_from_consul "${QC_CONFIG_CONSUL}" "--local --host lcoalhost" +add_QC_from_apricot "${QC_CONFIG_CONSUL}" "--local --host lcoalhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" if [ $WORKFLOWMODE == "print" ]; then diff --git a/DATA/production/calib/tpc-pedestal.sh b/DATA/production/calib/tpc-pedestal.sh index 69be9183a..161d27d7a 100755 --- a/DATA/production/calib/tpc-pedestal.sh +++ b/DATA/production/calib/tpc-pedestal.sh @@ -18,7 +18,7 @@ CCDB_PATH="http://o2-ccdb.internal" HOST=localhost #QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-pedestal-calib-qcmn" -QC_CONFIG="/o2/components/qc/ANY/any/tpc-pedestal-calib-qcmn" +QC_CONFIG="components/qc/ANY/any/tpc-pedestal-calib-qcmn" max_events=50 publish_after=400 @@ -39,7 +39,7 @@ WORKFLOW= add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\"" "" 0 add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"http://o2-ccdb.internal\" " "" 0 -add_QC_from_consul "${QC_CONFIG}" "--local --host localhost" +add_QC_from_apricot "${QC_CONFIG}" "--local --host localhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" diff --git a/DATA/production/calib/tpc-pulser-long.sh b/DATA/production/calib/tpc-pulser-long.sh index d2a7fb9b0..20edc981f 100755 --- a/DATA/production/calib/tpc-pulser-long.sh +++ b/DATA/production/calib/tpc-pulser-long.sh @@ -18,7 +18,7 @@ CCDB_PATH="http://o2-ccdb.internal" HOST=localhost #QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-raw-qcmn" -QC_CONFIG="/o2/components/qc/ANY/any/tpc-pulser-calib-qcmn" +QC_CONFIG="components/qc/ANY/any/tpc-pulser-calib-qcmn" max_events=1000000 publish_after=200 @@ -38,7 +38,7 @@ WORKFLOW= add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\"" "" 0 add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --calib-type pulser --reset-after-publish --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36 --check-calib-infos" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"http://o2-ccdb.internal\" " "" 0 -add_QC_from_consul "${QC_CONFIG}" "--local --host localhost" +add_QC_from_apricot "${QC_CONFIG}" "--local --host localhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" diff --git a/DATA/production/calib/tpc-pulser.sh b/DATA/production/calib/tpc-pulser.sh index aa2f4313d..f5f4bba53 100755 --- a/DATA/production/calib/tpc-pulser.sh +++ b/DATA/production/calib/tpc-pulser.sh @@ -19,7 +19,7 @@ CCDB_PATH="http://o2-ccdb.internal" HOST=localhost -QC_CONFIG="/o2/components/qc/ANY/any/tpc-pulser-calib-qcmn" +QC_CONFIG="components/qc/ANY/any/tpc-pulser-calib-qcmn" max_events=200 publish_after=230 @@ -40,7 +40,7 @@ WORKFLOW= add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\"" "" 0 add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --calib-type pulser --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36 --check-calib-infos" "${CALIB_CONFIG}" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"http://o2-ccdb.internal\" " "" 0 -add_QC_from_consul "${QC_CONFIG}" "--local --host localhost" +add_QC_from_apricot "${QC_CONFIG}" "--local --host localhost" WORKFLOW+="o2-dpl-run ${ARGS_ALL} ${GLOBALDPLOPT}" diff --git a/DATA/production/qc-workflow.sh b/DATA/production/qc-workflow.sh index 10fc2c058..a4a29d951 100755 --- a/DATA/production/qc-workflow.sh +++ b/DATA/production/qc-workflow.sh @@ -52,7 +52,7 @@ if [[ -z ${QC_JSON_FROM_OUTSIDE:-} && ! -z ${GEN_TOPO_QC_JSON_FILE:-} && -f $GEN QC_JSON_FROM_OUTSIDE=$GEN_TOPO_QC_JSON_FILE elif [[ -z ${QC_JSON_FROM_OUTSIDE:-} ]]; then if [[ $EPNSYNCMODE == 1 || "${GEN_TOPO_LOAD_QC_JSON_FROM_CONSUL:-}" == "1" ]]; then # Sync processing running on the EPN - [[ -z "${QC_JSON_TPC:-}" ]] && QC_JSON_TPC=consul://o2/components/qc/ANY/any/tpc-full-qcmn + [[ -z "${QC_JSON_TPC:-}" ]] && QC_JSON_TPC=apricot://o2/components/qc/ANY/any/tpc-full-qcmn [[ -z "${QC_JSON_ITS:-}" ]] && QC_JSON_ITS=consul://o2/components/qc/ANY/any/its-qcmn-epn-full if [[ -z "${QC_JSON_MFT:-}" ]]; then if has_detector MFT && has_processing_step MFT_RECO; then From aa264e9e976a367c7466f6c115ddc726d8835ce1 Mon Sep 17 00:00:00 2001 From: Sebastian Scheid Date: Tue, 18 Jun 2024 18:22:54 +0200 Subject: [PATCH 08/20] Add generators to constructor (#1668) --- .../generator/Generator_pythia8_GapTriggered_HFLepton.C | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_HFLepton.C b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_HFLepton.C index f3638d1e7..061ccad0d 100644 --- a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_HFLepton.C +++ b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_HFLepton.C @@ -47,6 +47,11 @@ public: // flag the generators using type // addCocktailConstituent(type, "interesting"); // addCocktailConstitent(0, "minbias"); + // Add Sub generators + addSubGenerator(0, "default generator"); + addSubGenerator(1, "charm lepton"); + addSubGenerator(2, "beauty forced decay"); + addSubGenerator(3, "beauty no foced decay"); } /// Destructor From eb217a31b2823b3ba466e0aa4e4a476ba01df76d Mon Sep 17 00:00:00 2001 From: rmunzer <97919772+rmunzer@users.noreply.github.com> Date: Tue, 18 Jun 2024 23:01:39 +0200 Subject: [PATCH 09/20] TPC - Add min ADC value in pedestal workflow (#1669) * Add min adc value for tpc-pedestal * correct syntax --- DATA/production/calib/tpc-pedestal.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DATA/production/calib/tpc-pedestal.sh b/DATA/production/calib/tpc-pedestal.sh index 161d27d7a..5c7d7e55f 100755 --- a/DATA/production/calib/tpc-pedestal.sh +++ b/DATA/production/calib/tpc-pedestal.sh @@ -19,6 +19,8 @@ HOST=localhost #QC_CONFIG="consul-json://alio2-cr1-hv-con01.cern.ch:8500/o2/components/qc/ANY/any/tpc-pedestal-calib-qcmn" QC_CONFIG="components/qc/ANY/any/tpc-pedestal-calib-qcmn" +CALIB_CONFIG="TPCCalibPedestal.ADCMin=20" + max_events=50 publish_after=400 @@ -37,7 +39,7 @@ fi WORKFLOW= add_W o2-dpl-raw-proxy "--dataspec \"$PROXY_INSPEC\" --inject-missing-data --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@tf-builder-pipe-0,transport=shmem,rateLogging=1\"" "" 0 -add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36" +add_W o2-tpc-calib-pad-raw "--input-spec \"$CALIB_INSPEC\" --publish-after-tfs ${publish_after} --max-events ${max_events} --lanes 36" "${CALIB_CONFIG}" add_W o2-calibration-ccdb-populator-workflow "--ccdb-path \"http://o2-ccdb.internal\" " "" 0 add_QC_from_apricot "${QC_CONFIG}" "--local --host localhost" From dc90bb072fedac21d72359278738a5fca407c180 Mon Sep 17 00:00:00 2001 From: benedikt-voelkel Date: Wed, 19 Jun 2024 10:53:03 +0200 Subject: [PATCH 10/20] [GenCI] Fix recursive check for macros contained in INI files (#1670) Co-authored-by: Benedikt Volkel --- test/run_generator_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/run_generator_tests.sh b/test/run_generator_tests.sh index 79addd3ea..f6f6761c2 100755 --- a/test/run_generator_tests.sh +++ b/test/run_generator_tests.sh @@ -152,6 +152,8 @@ add_ini_files_from_macros() # given a list of macros, collect all INI files which contain at least one of them local macro_files=$@ for mf in ${macro_files} ; do + # if any, strip the leading O2DPG_ROOT path to only grep for the relative trailing path + mf=${mf##${O2DPG_ROOT}/} local other_ini_files=$(grep -r -l ${mf} | grep ".ini$") # so this macro is not included in any of the INI file, # maybe it is included by another macro which is then included in an INI file From 538c0b1c01352cb8f0640dfb74d7af13cee250f4 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Fri, 21 Jun 2024 15:09:48 +0200 Subject: [PATCH 11/20] ITS: add deltaRof=1 in default pp/PbPb async (#1621) --- DATA/production/configurations/asyncReco/setenv_extra.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DATA/production/configurations/asyncReco/setenv_extra.sh b/DATA/production/configurations/asyncReco/setenv_extra.sh index 7db196aec..038a1f104 100644 --- a/DATA/production/configurations/asyncReco/setenv_extra.sh +++ b/DATA/production/configurations/asyncReco/setenv_extra.sh @@ -427,9 +427,9 @@ export ITSEXTRAERR="ITSCATrackerParam.sysErrY2[0]=$ERRIB;ITSCATrackerParam.sysEr # ad-hoc options for ITS reco workflow EXTRA_ITSRECO_CONFIG= if [[ $BEAMTYPE == "PbPb" ]]; then - EXTRA_ITSRECO_CONFIG="ITSVertexerParam.clusterContributorsCut=16;ITSVertexerParam.lowMultBeamDistCut=0;ITSCATrackerParam.nROFsPerIterations=12;ITSCATrackerParam.perPrimaryVertexProcessing=true" + EXTRA_ITSRECO_CONFIG="ITSCATrackerParam.deltaRof=1;ITSVertexerParam.clusterContributorsCut=16;ITSVertexerParam.lowMultBeamDistCut=0;ITSCATrackerParam.nROFsPerIterations=12;ITSCATrackerParam.perPrimaryVertexProcessing=true" elif [[ $BEAMTYPE == "pp" ]]; then - EXTRA_ITSRECO_CONFIG="ITSVertexerParam.phiCut=0.5;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.tanLambdaCut=0.2;" + EXTRA_ITSRECO_CONFIG="ITSCATrackerParam.deltaRof=1;ITSVertexerParam.phiCut=0.5;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.tanLambdaCut=0.2;" fi export CONFIG_EXTRA_PROCESS_o2_its_reco_workflow+=";$MAXBCDIFFTOMASKBIAS_ITS;$MAXBCDIFFTOSQUASHBIAS_ITS;$EXTRA_ITSRECO_CONFIG;" From 328c82607d5fa7e3410ddd9b4cb37f5737ac8adf Mon Sep 17 00:00:00 2001 From: Mattia Faggin Date: Mon, 24 Jun 2024 09:33:12 +0200 Subject: [PATCH 12/20] PWGHF: fix PDG code of L(1520) in Lc decays. (#1673) * Fix PDG code of L(1520) in Lc decays. * Fix L(1520) PDG code also in testers. * Fix PDG code also in force_hadronic_D.cfg. --------- Co-authored-by: Mattia Faggin --- MC/config/PWGHF/ini/tests/GeneratorHFTrigger_Bforced.C | 2 +- MC/config/PWGHF/ini/tests/GeneratorHFTrigger_bbbar.C | 2 +- MC/config/PWGHF/ini/tests/GeneratorHFTrigger_ccbar.C | 2 +- MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_gap5.C | 2 +- .../tests/GeneratorHF_D2H_ccbar_and_bbbar_Mode2_ptHardBins.C | 2 +- .../PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C | 2 +- .../PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3.C | 2 +- .../ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3_Mode2.C | 2 +- .../PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5.C | 2 +- .../ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2.C | 2 +- .../PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap8.C | 2 +- MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_gap5.C | 2 +- MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg | 4 ++-- .../pythia8/generator/pythia8_charmhadronic_with_decays.cfg | 4 ++-- .../generator/pythia8_charmhadronic_with_decays_Mode2.cfg | 4 ++-- .../pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg | 4 ++-- .../pythia8_charmhadronic_with_decays_Mode2_ptHardBins.cfg | 4 ++-- .../generator/pythia8_charmtriggers_with_Bforced_decay.cfg | 4 ++-- .../pythia8/generator/pythia8_charmtriggers_with_decays.cfg | 4 ++-- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_Bforced.C b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_Bforced.C index 979334f30..c3cb9bcfb 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_Bforced.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_Bforced.C @@ -9,7 +9,7 @@ int External() {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}}}, // Ds+ {443, {{-11, 11}}}, // Jpsi - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}}, // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_bbbar.C b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_bbbar.C index 2e1ae3e6e..d67a9b48d 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_bbbar.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_bbbar.C @@ -9,7 +9,7 @@ int External() {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}}}, // Ds+ {443, {{-11, 11}}}, // Jpsi - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_ccbar.C b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_ccbar.C index e4433e23f..ac58836b2 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_ccbar.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHFTrigger_ccbar.C @@ -9,7 +9,7 @@ int External() {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}}}, // Ds+ {443, {{-11, 11}}}, // Jpsi - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_gap5.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_gap5.C index 4a1d2d7d7..0dda90492 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_gap5.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_bbbar_gap5.C @@ -10,7 +10,7 @@ int External() {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_Mode2_ptHardBins.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_Mode2_ptHardBins.C index a119e684a..0177751d0 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_Mode2_ptHardBins.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_Mode2_ptHardBins.C @@ -11,7 +11,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C index 84d39b433..497b80acd 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_PbPb.C @@ -11,7 +11,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3.C index 79321e058..d29245b32 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3.C @@ -10,7 +10,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3_Mode2.C index 79321e058..d29245b32 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3_Mode2.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap3_Mode2.C @@ -10,7 +10,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5.C index 90d850360..e5c0bf08d 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5.C @@ -10,7 +10,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2.C index 90d850360..e5c0bf08d 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap5_Mode2.C @@ -10,7 +10,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap8.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap8.C index c66f02807..b6828e205 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap8.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_and_bbbar_gap8.C @@ -10,7 +10,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_gap5.C b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_gap5.C index b56b3db5c..99a039e6f 100644 --- a/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_gap5.C +++ b/MC/config/PWGHF/ini/tests/GeneratorHF_D2H_ccbar_gap5.C @@ -9,7 +9,7 @@ int External() { {411, {{-321, 211, 211}, {-313, 211}, {211, 311}, {211, 333}}}, // D+ {421, {{-321, 211}, {-321, 111, 211}}}, // D0 {431, {{211, 333}, {-313, 321}}}, // Ds+ - {4122, {{-313, 2212}, {-321, 2224}, {211, 3124}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ + {4122, {{-313, 2212}, {-321, 2224}, {211, 102134}, {-321, 211, 2212}, {311, 2212}}}, // Lc+ {4132, {{211, 3312}}}, // Xic0 {4232, {{-313, 2212}, {-321, 3324}, {211, 211, 3312}, {-321, 211, 2212}}}, // Xic+ {4332, {{211, 3334}}} // Omegac+ diff --git a/MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg b/MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg index 369b8f234..2c93ef893 100644 --- a/MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg +++ b/MC/config/PWGHF/pythia8/decayer/force_hadronic_D.cfg @@ -14,7 +14,7 @@ ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 4122:addChannel = 1 0.0159 0 2212 311 4122:addChannel = 1 0.0130 0 3122 211 @@ -75,7 +75,7 @@ ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 ### Lambda_c -> Lambda pi diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays.cfg index cc26a7c9d..bfa0c323d 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays.cfg @@ -32,7 +32,7 @@ ParticleDecays:tau0Max 10. ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 4122:addChannel = 1 0.0159 0 2212 311 ### add Xic+ decays absent in PYTHIA8 decay table @@ -102,7 +102,7 @@ ParticleDecays:tau0Max 10. ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 ### Lambda_c -> pK0s diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2.cfg index 13bd3ebdf..e94cc8654 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2.cfg @@ -50,7 +50,7 @@ BeamRemnants:saturation 5 ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 4122:addChannel = 1 0.0159 0 2212 311 ### add Xic+ decays absent in PYTHIA8 decay table @@ -120,7 +120,7 @@ BeamRemnants:saturation 5 ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 ### Lambda_c -> pK0s diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg index 90910a942..2afc707b6 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_hardQCD_5TeV.cfg @@ -54,7 +54,7 @@ BeamRemnants:saturation 5 ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 4122:addChannel = 1 0.0159 0 2212 311 ### add Xic+ decays absent in PYTHIA8 decay table @@ -124,7 +124,7 @@ BeamRemnants:saturation 5 ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 ### Lambda_c -> pK0s diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_ptHardBins.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_ptHardBins.cfg index 578b5383f..c1c6df234 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_ptHardBins.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmhadronic_with_decays_Mode2_ptHardBins.cfg @@ -59,7 +59,7 @@ PhaseSpace:pTHatMax = 200 ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 4122:addChannel = 1 0.0159 0 2212 311 ### add Xic+ decays absent in PYTHIA8 decay table @@ -129,7 +129,7 @@ PhaseSpace:pTHatMax = 200 ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 ### Lambda_c -> pK0s diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_Bforced_decay.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_Bforced_decay.cfg index 5298cc9e9..41c4123ad 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_Bforced_decay.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_Bforced_decay.cfg @@ -23,7 +23,7 @@ ParticleDecays:tau0Max 10. ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 ### add Xic+ decays absent in PYTHIA8 decay table 4232:addChannel = 1 0.2 0 2212 -313 @@ -93,7 +93,7 @@ ParticleDecays:tau0Max 10. ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 diff --git a/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_decays.cfg b/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_decays.cfg index e4272e8aa..0492d92b8 100644 --- a/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_decays.cfg +++ b/MC/config/PWGHF/pythia8/generator/pythia8_charmtriggers_with_decays.cfg @@ -23,7 +23,7 @@ ParticleDecays:tau0Max 10. ## add Lc decays absent in PYTHIA8 decay table and set BRs from PDG for other 4122:oneChannel = 1 0.0196 100 2212 -313 4122:addChannel = 1 0.0108 100 2224 -321 -4122:addChannel = 1 0.022 100 3124 211 +4122:addChannel = 1 0.022 100 102134 211 4122:addChannel = 1 0.035 0 2212 -321 211 ### add Xic+ decays absent in PYTHIA8 decay table 4232:addChannel = 1 0.2 0 2212 -313 @@ -78,7 +78,7 @@ ParticleDecays:tau0Max 10. ### Lambda_c -> Delta K 4122:onIfMatch = 2224 321 ### Lambda_c -> Lambda(1520) pi -4122:onIfMatch = 3124 211 +4122:onIfMatch = 102134 211 ### Lambda_c -> p K pi 4122:onIfMatch = 2212 321 211 From 585ab0bab03d4c99753c0e09da845c70064af3fe Mon Sep 17 00:00:00 2001 From: benedikt-voelkel Date: Tue, 25 Jun 2024 08:46:28 +0200 Subject: [PATCH 13/20] [RelVal] Except more TLeaf Types (#1671) --- RelVal/utils/ExtractAndFlatten.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RelVal/utils/ExtractAndFlatten.C b/RelVal/utils/ExtractAndFlatten.C index 889ed0e47..11a00dc8e 100644 --- a/RelVal/utils/ExtractAndFlatten.C +++ b/RelVal/utils/ExtractAndFlatten.C @@ -168,7 +168,7 @@ void ExtractAndFlattenDirectory(TDirectory* inDir, TDirectory* outDir, std::vect void ExtractTree(TTree* tree, TDirectory* outDir, std::vector& collectNames, std::string const& basedOnTree, std::string const& currentPrefix) { - const std::vector acceptedLeafTypes{"char", "int", "float", "double"}; + const std::vector acceptedLeafTypes{"char", "int", "float", "double", "short", "long"}; TIter next(tree->GetListOfLeaves()); std::vector leafNames; TLeaf* obj = nullptr; From f79426f195d72ee2f3fe45227fb7150758f5dbcf Mon Sep 17 00:00:00 2001 From: mbroz84 Date: Tue, 25 Jun 2024 13:50:45 +0200 Subject: [PATCH 14/20] PWGUD Starlight interface (#1663) * PWGUD Starlight interface --- .../generator/DecayTablesEvtGen/JPSI.EE.DEC | 5 + .../generator/DecayTablesEvtGen/JPSI.MUMU.DEC | 5 + .../generator/DecayTablesEvtGen/OMEGA.3PI.DEC | 11 + .../generator/DecayTablesEvtGen/PHI.KK.DEC | 4 + .../DecayTablesEvtGen/PSI2S.EEPIPI.DEC | 11 + .../DecayTablesEvtGen/PSI2S.MUMUPIPI.DEC | 11 + .../DecayTablesEvtGen/RHOPRIME.RHOPIPI.DEC | 15 + .../external/generator/GeneratorStarlight.C | 283 ++++++++++++++++++ .../generator/GeneratorStarlightToEvtGen.C | 33 ++ ...nStarlight_kCohJpsiToMu_PbPb_5360_Muon.ini | 6 + ...arlight_kCohPsi2sToElPi_PbPb_5360_Cent.ini | 6 + MC/config/PWGUD/ini/makeStarlightConfig.py | 60 ++++ ...GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.C | 37 +++ ...Starlight_kCohPsi2sToElPi_PbPb_5360_Cent.C | 51 ++++ .../trigger/selectParticlesInAcceptance.C | 31 ++ 15 files changed, 569 insertions(+) create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.EE.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.MUMU.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/OMEGA.3PI.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/PHI.KK.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.EEPIPI.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.MUMUPIPI.DEC create mode 100644 MC/config/PWGUD/external/generator/DecayTablesEvtGen/RHOPRIME.RHOPIPI.DEC create mode 100644 MC/config/PWGUD/external/generator/GeneratorStarlight.C create mode 100644 MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C create mode 100644 MC/config/PWGUD/ini/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.ini create mode 100644 MC/config/PWGUD/ini/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.ini create mode 100755 MC/config/PWGUD/ini/makeStarlightConfig.py create mode 100644 MC/config/PWGUD/ini/tests/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.C create mode 100644 MC/config/PWGUD/ini/tests/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.C create mode 100644 MC/config/PWGUD/trigger/selectParticlesInAcceptance.C diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.EE.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.EE.DEC new file mode 100644 index 000000000..3bfe3a10b --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.EE.DEC @@ -0,0 +1,5 @@ +Decay J/psi +1.000 e+ e- PHOTOS VLL; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.MUMU.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.MUMU.DEC new file mode 100644 index 000000000..7e5ab4de6 --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.MUMU.DEC @@ -0,0 +1,5 @@ +Decay J/psi +1.000 mu+ mu- PHOTOS VLL; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/OMEGA.3PI.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/OMEGA.3PI.DEC new file mode 100644 index 000000000..c6641a920 --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/OMEGA.3PI.DEC @@ -0,0 +1,11 @@ +Alias mypi0 pi0 + +Decay omega +1.000 pi- pi+ mypi0 OMEGA_DALITZ; +Enddecay + +Decay mypi0 +#1.000 gamma gamma PHSP; +Enddecay + +End diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PHI.KK.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PHI.KK.DEC new file mode 100644 index 000000000..5fa682ee8 --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PHI.KK.DEC @@ -0,0 +1,4 @@ +Decay phi +1.000 K+ K- VSS; +Enddecay +End diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.EEPIPI.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.EEPIPI.DEC new file mode 100644 index 000000000..25eea861a --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.EEPIPI.DEC @@ -0,0 +1,11 @@ +Alias myJ/psi J/psi +## +Decay psi(2S) +1.000 myJ/psi pi+ pi- VVPIPI; +Enddecay + +Decay myJ/psi +1.000 e+ e- PHOTOS VLL; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.MUMUPIPI.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.MUMUPIPI.DEC new file mode 100644 index 000000000..d20651ed5 --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/PSI2S.MUMUPIPI.DEC @@ -0,0 +1,11 @@ +Alias myJ/psi J/psi +## +Decay psi(2S) +1.000 myJ/psi pi+ pi- VVPIPI; +Enddecay + +Decay myJ/psi +1.000 mu+ mu- PHOTOS VLL; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/RHOPRIME.RHOPIPI.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/RHOPRIME.RHOPIPI.DEC new file mode 100644 index 000000000..777ef942a --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/RHOPRIME.RHOPIPI.DEC @@ -0,0 +1,15 @@ +Alias myrho0 rho0 +## +Decay rho(2S)0 +1.000 myrho0 pi+ pi- VVPIPI; +Enddecay + +Decay rho(3S)0 +1.000 myrho0 pi+ pi- VVPIPI; +Enddecay + +Decay myrho0 +1.000 pi+ pi- VSS; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/GeneratorStarlight.C b/MC/config/PWGUD/external/generator/GeneratorStarlight.C new file mode 100644 index 000000000..21054104e --- /dev/null +++ b/MC/config/PWGUD/external/generator/GeneratorStarlight.C @@ -0,0 +1,283 @@ +R__LOAD_LIBRARY(libStarlib.so) +R__ADD_INCLUDE_PATH($STARlight_ROOT/include) + +#include "randomgenerator.h" +#include "upcXevent.h" +#include "starlight.h" +#include "inputParameters.h" + +// usage: o2-sim -g external --configKeyValues 'GeneratorExternal.fileName=GeneratorStarlight.C;GeneratorExternal.funcName=GeneratorStarlight("kCohJpsiToMu")' + +namespace o2 +{ +namespace eventgen +{ +class GeneratorStarlight_class : public Generator +{ + public: + GeneratorStarlight_class(){}; + ~GeneratorStarlight_class() = default; + void selectConfiguration(std::string val) { mSelectedConfiguration = val; }; + void setCollisionSystem(float energyCM, int beam1Z, int beam1A, int beam2Z, int beam2A) {eCM = energyCM; projZ=beam1Z; projA=beam1A; targZ=beam2Z; targA=beam2A;}; + bool setParameter(std::string line) { + if (not mInputParameters.setParameter(line)){ + std::cout << " --- [ERROR] cannot set parameter: " << line << std::endl; + return false; + } + return true; + } + int getPdgMother(){return mPdgMother;} + + bool Init() override + { + Generator::Init(); + + float beam1energy = TMath::Sqrt(Double_t(projZ)/projA*targA/targZ)*eCM/2; + float beam2energy = TMath::Sqrt(Double_t(projA)/projZ*targZ/targA)*eCM/2; + float gamma1 = beam1energy/0.938272; + float gamma2 = beam2energy/0.938272; + float rapMax = 4.1 + 0.5*(TMath::ACosH(gamma2)-TMath::ACosH(gamma1)); + + const struct SLConfig { + const char* name; + int prod_mode; + int prod_pid; + int nwbins; + float wmin; + float wmax; + float dy; + int pdg_mother; + bool decay_EvtGen; + } slConfig[] = { + {"kTwoGammaToMuLow", 1, 13, 292, 0.4, 15.0, 0.01, -1, 0 }, // from 0.4 to 15 GeV + {"kTwoGammaToElLow", 1, 11, 292, 0.4, 15.0, 0.01, -1, 0 }, // from 0.4 to 15 GeV + {"kTwoGammaToMuMedium", 1, 13, 264, 1.8, 15.0, 0.01, -1, 0 }, // from 1.8 to 15 GeV + {"kTwoGammaToElMedium", 1, 11, 264, 1.8, 15.0, 0.01, -1, 0 }, // from 1.8 to 15 GeV + {"kTwoGammaToMuHigh", 1, 13, 220, 4.0, 15.0, 0.01, -1, 0 }, // from 4.0 to 15 GeV + {"kTwoGammaToElHigh", 1, 11, 220, 4.0, 15.0, 0.01, -1, 0 }, // from 4.0 to 15 GeV + {"kTwoGammaToRhoRho", 1, 33, 20, -1.0, -1.0, 0.01, -1, 0 }, // + {"kTwoGammaToF2", 1, 225, 20, -1.0, -1.0, 0.01, -1, 0 }, // + {"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 }, // + {"kCohRhoToPiFlat", 3, 113, 1, -1.0, 2.5, 0.02, 113, 0 }, // + {"kCohPhiToKa", 2, 333, 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 }, // + {"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 }, // + {"kCohJpsiToElRad", 2, 443011, 20, -1.0, -1.0, 0.01, 443, 1 }, // + {"kCohJpsiToProton", 2, 4432212, 20, -1.0, -1.0, 0.01, 443, 0 }, // + {"kCohPsi2sToMu", 2, 444013, 20, -1.0, -1.0, 0.01, 100443, 0 }, // + {"kCohPsi2sToEl", 2, 444011, 20, -1.0, -1.0, 0.01, 100443, 0 }, // + {"kCohPsi2sToMuPi", 2, 444013, 20, -1.0, -1.0, 0.01, 100443, 1 }, // + {"kCohPsi2sToElPi", 2, 444011, 20, -1.0, -1.0, 0.01, 100443, 1 }, // + {"kCohUpsilonToMu", 2, 553013, 20, -1.0, -1.0, 0.01, 553, 0 }, // + {"kCohUpsilonToEl", 2, 553011, 20, -1.0, -1.0, 0.01, 553, 0 }, // + {"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 }, // + {"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 }, // + {"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 }, // + {"kIncohJpsiToElRad", 4, 443011, 20, -1.0, -1.0, 0.01, 443, 1 }, // + {"kIncohJpsiToProton", 4, 4432212, 20, -1.0, -1.0, 0.01, 443, 0 }, // + {"kIncohJpsiToLLbar", 4, 4433122, 20, -1.0, -1.0, 0.01, 443, 0 }, // + {"kIncohPsi2sToMu", 4, 444013, 20, -1.0, -1.0, 0.01, 100443, 0 }, // + {"kIncohPsi2sToEl", 4, 444011, 20, -1.0, -1.0, 0.01, 100443, 0 }, // + {"kIncohPsi2sToMuPi", 4, 444013, 20, -1.0, -1.0, 0.01, 100443, 1 }, // + {"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 }, // + }; + + const int nProcess = sizeof(slConfig)/sizeof(SLConfig); + int idx = -1; + for (int i=0; i(&random_value), sizeof(random_seed)); + + setParameter(Form("BEAM_1_Z = %3i #Z of target",targZ)); + setParameter(Form("BEAM_1_A = %3i #A of target",targA)); + setParameter(Form("BEAM_2_Z = %3i #Z of projectile",projZ)); + setParameter(Form("BEAM_2_A = %3i #A of projectile",projA)); + setParameter(Form("BEAM_1_GAMMA = %6.1f #Gamma of the target",gamma1)); + setParameter(Form("BEAM_2_GAMMA = %6.1f #Gamma of the projectile",gamma2)); + setParameter(Form("W_MAX = %.1f #Max value of w",slConfig[idx].wmax)); + setParameter(Form("W_MIN = %.1f #Min value of w",slConfig[idx].wmin)); + setParameter(Form("W_N_BINS = %3i #Bins i w",slConfig[idx].nwbins)); + setParameter(Form("RAP_MAX = %.2f #max y",rapMax)); + setParameter(Form("RAP_N_BINS = %.0f #Bins i y",rapMax*2./slConfig[idx].dy)); + setParameter("CUT_PT = 0 #Cut in pT? 0 = (no, 1 = yes)"); + setParameter("PT_MIN = 0 #Minimum pT in GeV"); + setParameter("PT_MAX = 10 #Maximum pT in GeV"); + setParameter("CUT_ETA = 0 #Cut in pseudorapidity? (0 = no, 1 = yes)"); + setParameter("ETA_MIN = -5 #Minimum pseudorapidity"); + setParameter("ETA_MAX = 5 #Maximum pseudorapidity"); + setParameter(Form("PROD_MODE = %i #gg or gP switch (1 = 2-photon, 2 = coherent vector meson (narrow), 3 = coherent vector meson (wide), # 4 = incoherent vector meson, 5 = A+A DPMJet single, 6 = A+A DPMJet double, 7 = p+A DPMJet single, 8 = p+A Pythia single )",slConfig[idx].prod_mode)); + setParameter(Form("PROD_PID = %6i #Channel of interest (not relevant for photonuclear processes)",slConfig[idx].prod_pid)); + setParameter(Form("RND_SEED = %i #Random number seed", random_seed)); + setParameter("BREAKUP_MODE = 5 #Controls the nuclear breakup"); + setParameter("INTERFERENCE = 0 #Interference (0 = off, 1 = on)"); + setParameter("IF_STRENGTH = 1. #% of interfernce (0.0 - 0.1)"); + setParameter("INT_PT_MAX = 0.24 #Maximum pt considered, when interference is turned on"); + setParameter("INT_PT_N_BINS = 120 #Number of pt bins when interference is turned on"); + setParameter("XSEC_METHOD = 1 # Set to 0 to use old method for calculating gamma-gamma luminosity"); //CM + setParameter("BSLOPE_DEFINITION = 0"); // using default slope + setParameter("BSLOPE_VALUE = 4.0"); // default slope value + setParameter("PRINT_VM = 0"); // print cross sections and fluxes vs rapidity in stdout for VM photoproduction processes + + if (not mInputParameters.init()) { + std::cout << "InitStarLight parameter initialization has failed" << std::endl; + return false; + } + + mStarLight = new starlight; + mStarLight->setInputParameters(&mInputParameters); + mRandomGenerator.SetSeed(mInputParameters.randomSeed()); + mStarLight->setRandomGenerator(&mRandomGenerator); + return mStarLight->init(); + + }; + + bool generateEvent() override { + + if (!mStarLight) { + std::cout <<"GenerateEvent: StarLight class/object not properly constructed"<produceEvent(); + // boost event to the experiment CM frame + mEvent.boost(0.5*(TMath::ACosH(mInputParameters.beam1LorentzGamma()) - TMath::ACosH(mInputParameters.beam2LorentzGamma()))); + + return true; + + }; + + // at importParticles we add particles to the output particle vector + // according to the selected configuration + bool importParticles() override + { + int nVtx(0); + float vtx(0), vty(0), vtz(0), vtt(0); + const std::vector* slVtx(mEvent.getVertices()); + if (slVtx == 0) { // not vertex assume 0,0,0,0; + vtx = vty = vtz = vtt = 0.0; + } else { // a vertex exits + slVtx = mEvent.getVertices(); + nVtx = slVtx->size(); + } // end if + + const std::vector* slPartArr(mEvent.getParticles()); + const int npart(mEvent.getParticles()->size()); + + if(mPdgMother != -1){ //Reconstruct mother particle for VM processes + TLorentzVector lmoth; + TLorentzVector ldaug; + for(int ipart=0;ipartat(ipart))); + ldaug.SetPxPyPzE(slPart->GetPx(), slPart->GetPy(), slPart->GetPz(), slPart->GetE()); + lmoth += ldaug; + } + TParticle particle(mPdgMother, + 11, + -1, + -1, + 1, + npart, + lmoth.Px(), + lmoth.Py(), + lmoth.Pz(), + lmoth.E(), + 0,0,0,0); + //particle.Print(); + mParticles.push_back(particle); + o2::mcutils::MCGenHelper::encodeParticleStatusAndTracking(mParticles.back(), 11); + } + if(!mDecayEvtGen){ // Don't import daughters in case of external decayer + for(int ipart=0;ipartat(ipart))); + if (nVtx < 1) { // No verticies + vtx = vty = vtz = vtt = 0.0; + } else { + vtx = (slVtx->at((ipart < nVtx ? ipart : 0))).X(); + vty = (slVtx->at((ipart < nVtx ? ipart : 0))).Y(); + vtz = (slVtx->at((ipart < nVtx ? ipart : 0))).Z(); + vtt = 0.0; // no time given. + } // end if + TParticle particle(slPart->getPdgCode(), + 1, + 0, + -1, + slPart->getFirstDaughter(), + slPart->getLastDaughter(), + slPart->GetPx(), + slPart->GetPy(), + slPart->GetPz(), + slPart->GetE(), + vtx,vty,vtz,vtt); + //particle.Print(); + mParticles.push_back(particle); + o2::mcutils::MCGenHelper::encodeParticleStatusAndTracking(mParticles.back(), 1); + } + } + return true; + } + + private: + starlight *mStarLight = 0x0; + inputParameters mInputParameters; // simulation input information. + randomGenerator mRandomGenerator; // STARLIGHT's own random generator + upcXEvent mEvent; // object holding STARlight simulated event. + std::string mSelectedConfiguration = ""; + int mPdgMother = -1; + bool mDecayEvtGen = 0; + float eCM = 5020; //CMS energy + int projA=208; //Beam + int targA=208; + int projZ=82; + int targZ=82; + + }; + +} // namespace eventgen +} // namespace o2 + + +FairGenerator* + GeneratorStarlight(std::string configuration = "empty",float energyCM = 5020, int beam1Z = 82, int beam1A = 208, int beam2Z = 82, int beam2A = 208) +{ + auto gen = new o2::eventgen::GeneratorStarlight_class(); + gen->selectConfiguration(configuration); + gen->setCollisionSystem(energyCM, beam1Z, beam1A, beam2Z, beam2A); + return gen; +} + + + + diff --git a/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C b/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C new file mode 100644 index 000000000..3fe6e17c0 --- /dev/null +++ b/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C @@ -0,0 +1,33 @@ +// usage (fwdy) : +// o2-sim -j 4 -n 10 -g external -t external -m "PIPE ITS TPC" -o sgn --configFile GeneratorHF_bbbar_fwdy.ini +// usage (midy) : +// 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) +#include "GeneratorEvtGen.C" +#include "GeneratorStarlight.C" + +FairGenerator* + GeneratorStarlightToEvtGen(std::string configuration = "empty",float energyCM = 5020, int beam1Z = 82, int beam1A = 208, int beam2Z = 82, int beam2A = 208) +{ + auto gen = new o2::eventgen::GeneratorEvtGen(); + gen->selectConfiguration(configuration); + gen->setCollisionSystem(energyCM, beam1Z, beam1A, beam2Z, beam2A); + + gen->SetSizePdg(3); + gen->AddPdg(443,0); + gen->AddPdg(100443,1); + gen->AddPdg(223,2); + gen->SetPolarization(1); //Transversal + + TString pathO2 = gSystem->ExpandPathName("$O2DPG_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())); + + return gen; +} \ No newline at end of file diff --git a/MC/config/PWGUD/ini/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.ini b/MC/config/PWGUD/ini/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.ini new file mode 100644 index 000000000..8c38fd160 --- /dev/null +++ b/MC/config/PWGUD/ini/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.ini @@ -0,0 +1,6 @@ +[GeneratorExternal] +fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C +funcName = GeneratorStarlight("kCohJpsiToMu", 5360.000000, 82, 208, 82, 208) +[TriggerExternal] +fileName = ${O2DPG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C +funcName = selectMotherPartInAcc(-4.0,-2.5) diff --git a/MC/config/PWGUD/ini/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.ini b/MC/config/PWGUD/ini/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.ini new file mode 100644 index 000000000..d696abde2 --- /dev/null +++ b/MC/config/PWGUD/ini/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.ini @@ -0,0 +1,6 @@ +[GeneratorExternal] +fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C +funcName = GeneratorStarlightToEvtGen("kCohPsi2sToElPi", 5360.000000, 82, 208, 82, 208) +[TriggerExternal] +fileName = ${O2DPG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C +funcName = selectMotherPartInAcc(-0.9,0.9) diff --git a/MC/config/PWGUD/ini/makeStarlightConfig.py b/MC/config/PWGUD/ini/makeStarlightConfig.py new file mode 100755 index 000000000..6d87e3a9f --- /dev/null +++ b/MC/config/PWGUD/ini/makeStarlightConfig.py @@ -0,0 +1,60 @@ +#! /usr/bin/env python3 + +### @author: Michal Broz +### @email: michal.broz@cern.ch + +import argparse + +parser = argparse.ArgumentParser(description='Make Starlight configuration', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + +parser.add_argument('--pZ', type=int, default='82', + help='Projectile charge') + +parser.add_argument('--pA', type=int, default='208', + help='Projectile atomic number') + +parser.add_argument('--tZ', type=int, default='82', + help='Target charge') + +parser.add_argument('--tA', type=int, default='208', + help='Target atomic number') + +parser.add_argument('--eCM', type=float, default='5360', + help='Centre-of-mass energy') + +parser.add_argument('--rapidity', default='cent', choices=['cent', 'muon'], + 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'], + help='Process to switch on') + + +parser.add_argument('--output', default='GenStarlight.ini', + help='Where to write the configuration') + + +args = parser.parse_args() + +### open output file +fout = open(args.output, 'w') + +### 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 : + fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n') + fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,args.pZ ,args.pA,args.tZ,args.tA)) +else: + fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C \n') + fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d) \n' % (args.process,args.eCM ,args.pZ ,args.pA,args.tZ,args.tA)) + +###Trigger +fout.write('[TriggerExternal] \n') +fout.write('fileName = ${O2DPG_ROOT}/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C \n') +if args.rapidity == 'cent': + fout.write('funcName = selectMotherPartInAcc(-0.9,0.9) \n') +if args.rapidity == 'muon': + fout.write('funcName = selectMotherPartInAcc(-4.0,-2.5) \n') + +### close outout file +fout.close() diff --git a/MC/config/PWGUD/ini/tests/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.C b/MC/config/PWGUD/ini/tests/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.C new file mode 100644 index 000000000..2a9424d87 --- /dev/null +++ b/MC/config/PWGUD/ini/tests/GenStarlight_kCohJpsiToMu_PbPb_5360_Muon.C @@ -0,0 +1,37 @@ +int External() +{ + std::string path{"o2sim_Kine.root"}; + TFile file(path.c_str(), "READ"); + if (file.IsZombie()) + { + std::cerr << "Cannot open ROOT file " << path << "\n"; + return 1; + } + auto tree = (TTree *)file.Get("o2sim"); + if (!tree) + { + std::cerr << "Cannot find tree o2sim in file " << path << "\n"; + return 1; + } + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + + bool goodEvent = kFALSE; + auto nEvents = tree->GetEntries(); + for (int i = 0; i < nEvents; i++) + { + goodEvent = kFALSE; + auto check = tree->GetEntry(i); + for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + { + auto track = tracks->at(idxMCTrack); + if (track.GetPdgCode() == 443 && track.getMotherTrackId() == -1){ //Primary J/psi + auto daugh1 = tracks->at(track.getFirstDaughterTrackId()); + auto daugh2 = tracks->at(track.getLastDaughterTrackId()); + if(TMath::Abs(daugh1.GetPdgCode()) == 13 && TMath::Abs(daugh2.GetPdgCode()) == 13) goodEvent = kTRUE; + } + } + if(!goodEvent) return 1; + } + return 0; +} diff --git a/MC/config/PWGUD/ini/tests/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.C b/MC/config/PWGUD/ini/tests/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.C new file mode 100644 index 000000000..74b40771c --- /dev/null +++ b/MC/config/PWGUD/ini/tests/GenStarlight_kCohPsi2sToElPi_PbPb_5360_Cent.C @@ -0,0 +1,51 @@ +int External() +{ + std::string path{"o2sim_Kine.root"}; + TFile file(path.c_str(), "READ"); + if (file.IsZombie()) + { + std::cerr << "Cannot open ROOT file " << path << "\n"; + return 1; + } + auto tree = (TTree *)file.Get("o2sim"); + if (!tree) + { + std::cerr << "Cannot find tree o2sim in file " << path << "\n"; + return 1; + } + std::vector *tracks{}; + tree->SetBranchAddress("MCTrack", &tracks); + + int nPions = 0; + int nElectrons = 0; + int nPhotons = 0; + auto nEvents = tree->GetEntries(); + for (int i = 0; i < nEvents; i++) + { + nPhotons = 0; + nPions = 0; + nElectrons = 0; + auto check = tree->GetEntry(i); + for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack) + { + auto track = tracks->at(idxMCTrack); + if (track.GetPdgCode() == 100443 && track.getMotherTrackId() == -1){ //Primary psi2s + for(int iDaugh = track.getFirstDaughterTrackId(); iDaugh<=track.getLastDaughterTrackId(); iDaugh++){ + auto daughPsi2s = tracks->at(iDaugh); + if(daughPsi2s.GetPdgCode() == 22) nPhotons++; + if(TMath::Abs(daughPsi2s.GetPdgCode()) == 211) nPions++; + + if(daughPsi2s.GetPdgCode() == 443 ){ + for(int jDaugh = daughPsi2s.getFirstDaughterTrackId(); jDaugh<=daughPsi2s.getLastDaughterTrackId(); jDaugh++){ + auto daughJPsi = tracks->at(jDaugh); + if(daughJPsi.GetPdgCode() == 22) nPhotons++; + if(TMath::Abs(daughJPsi.GetPdgCode()) == 11) nElectrons++; + } + } + } + } + } + if(nElectrons != 2 || nPions != 2)return 1; + } + return 0; +} diff --git a/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C b/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C new file mode 100644 index 000000000..a00bcad6b --- /dev/null +++ b/MC/config/PWGUD/trigger/selectParticlesInAcceptance.C @@ -0,0 +1,31 @@ +R__ADD_INCLUDE_PATH($O2DPG_ROOT) +#include +#include "Generators/Trigger.h" + +/// ================================================================================================================================= +/// Select event with VM or track in a given rapidity or eta window +/// ================================================================================================================================= + +o2::eventgen::Trigger selectMotherPartInAcc(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (const auto& particle : particles) { + if (particle.GetFirstMother() == -1) + if ((particle.Y() > rapidityMin) && (particle.Y() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + +o2::eventgen::Trigger selectDaughterPartInAcc(double etaMin = -1., double etaMax = -1.) +{ + return [etaMin, etaMax](const std::vector& particles) -> bool { + for (const auto& particle : particles) { + if (particle.GetFirstMother() != -1) + if ((particle.Eta() < etaMin) || (particle.Eta() > etaMax)) + return kFALSE; + } + return kTRUE; + }; +} \ No newline at end of file From 96c75a633e49218bec316e06a91bd05c2ba7dbac Mon Sep 17 00:00:00 2001 From: Fabrizio Date: Tue, 25 Jun 2024 17:46:40 +0200 Subject: [PATCH 15/20] PWGHF: Add possibility to pass pT-hard bins from script (#1674) * PWGHF: Add possibility to pass pT-hard bins from script * Add missing cast * Add missing cast * Fix typo --- .../generator/generator_pythia8_embed_hf.C | 17 ++++++++++++++++- .../generator_pythia8_gaptriggered_hf.C | 13 +++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C b/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C index 8815f5ae1..a54aa1874 100644 --- a/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C +++ b/MC/config/PWGHF/external/generator/generator_pythia8_embed_hf.C @@ -78,6 +78,20 @@ public: LOG(fatal) << "********** [GeneratorPythia8EmbedHF] bad configuration, fix it! **********"; break; } + + // we set pT hard bins + auto seed = dynamic_cast(mGeneratorEvHF)->getUsedSeed(); + float ptHardBins[4] = {2.76, 20., 50., 1000.}; + int iPt{0}; + if (seed % 10 < 7) { + iPt = 0; + } else if (seed % 10 < 9) { + iPt = 1; + } else { + iPt = 2; + } + dynamic_cast(mGeneratorEvHF)->readString(Form("PhaseSpace:pTHatMin = %f", ptHardBins[iPt])); + dynamic_cast(mGeneratorEvHF)->readString(Form("PhaseSpace:pTHatMax = %f", ptHardBins[iPt+1])); mGeneratorEvHF->Init(); } @@ -188,4 +202,5 @@ FairGenerator * GeneratorPythia8EmbedHFCharmAndBeauty(float yQuarkMin = -1.5, fl myGen->setupGeneratorEvHF(hf_generators::GapTriggeredCharmAndBeauty, yQuarkMin, yQuarkMax, yHadronMin, yHadronMax, hadronPdgList); return myGen; -} \ No newline at end of file +} + diff --git a/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C b/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C index 462ae589b..2f7ae4226 100644 --- a/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C +++ b/MC/config/PWGHF/external/generator/generator_pythia8_gaptriggered_hf.C @@ -75,6 +75,14 @@ public: mHadRapidityMin = yMin; mHadRapidityMax = yMax; }; + void setUsedSeed(unsigned int seed) + { + mUsedSeed = seed; + }; + unsigned int getUsedSeed() const + { + return mUsedSeed; + }; protected: //__________________________________________________________________ @@ -200,6 +208,7 @@ private: int mHadronPdg; float mHadRapidityMin; float mHadRapidityMax; + unsigned int mUsedSeed; // Control gap-triggering unsigned long long mGeneratedEvents; @@ -218,6 +227,7 @@ FairGenerator *GeneratorPythia8GapTriggeredCharm(int inputTriggerRatio, float yQ { auto myGen = new GeneratorPythia8GapTriggeredHF(inputTriggerRatio, std::vector{4}, hadronPdgList); auto seed = (gRandom->TRandom::GetSeed() % 900000000); + myGen->setUsedSeed(seed); myGen->readString("Random:setSeed on"); myGen->readString("Random:seed " + std::to_string(seed)); myGen->setQuarkRapidity(yQuarkMin, yQuarkMax); @@ -233,6 +243,7 @@ FairGenerator *GeneratorPythia8GapTriggeredBeauty(int inputTriggerRatio, float y { auto myGen = new GeneratorPythia8GapTriggeredHF(inputTriggerRatio, std::vector{5}, hadronPdgList); auto seed = (gRandom->TRandom::GetSeed() % 900000000); + myGen->setUsedSeed(seed); myGen->readString("Random:setSeed on"); myGen->readString("Random:seed " + std::to_string(seed)); myGen->setQuarkRapidity(yQuarkMin, yQuarkMax); @@ -248,6 +259,7 @@ FairGenerator *GeneratorPythia8GapTriggeredCharmAndBeauty(int inputTriggerRatio, { auto myGen = new GeneratorPythia8GapTriggeredHF(inputTriggerRatio, std::vector{4, 5}, hadronPdgList); auto seed = (gRandom->TRandom::GetSeed() % 900000000); + myGen->setUsedSeed(seed); myGen->readString("Random:setSeed on"); myGen->readString("Random:seed " + std::to_string(seed)); myGen->setQuarkRapidity(yQuarkMin, yQuarkMax); @@ -266,6 +278,7 @@ FairGenerator *GeneratorPythia8GapHF(int inputTriggerRatio, float yQuarkMin = -1 } auto myGen = new GeneratorPythia8GapTriggeredHF(inputTriggerRatio, quarkPdgList, hadronPdgList); auto seed = (gRandom->TRandom::GetSeed() % 900000000); + myGen->setUsedSeed(seed); myGen->readString("Random:setSeed on"); myGen->readString("Random:seed " + std::to_string(seed)); myGen->setQuarkRapidity(yQuarkMin, yQuarkMax); From 743647eb6946d0ea7ef8d76eb83bb0cc3c8388dc Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Wed, 26 Jun 2024 09:01:24 +0200 Subject: [PATCH 16/20] PWGEM/MC: remove J/psi from ee and add K0S for nm (#1676) --- .../Generator_pythia8_GapTriggered_LFee.C | 95 ++++++++++--------- .../Generator_pythia8_GapTriggered_LFgamma.C | 17 +++- 2 files changed, 64 insertions(+), 48 deletions(-) diff --git a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFee.C b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFee.C index 1b2761065..ecf5f5de9 100644 --- a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFee.C +++ b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFee.C @@ -263,29 +263,29 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 { genphi->Init(); CocktailParam *newgenphi = new CocktailParam(genphi); - // J/psi and psi(2S) need to be slightly different since no EXODUS but EvtGen decayer - auto genJpsi = new o2::eventgen::O2_GeneratorParamJpsi; - genJpsi->SetNSignalPerEvent(nPart); // signal per event for J/Psi - - auto genPsi = new o2::eventgen::O2_GeneratorParamPsi; - genPsi->SetNSignalPerEvent(nPart); // signal per event for Psi(2s) - - TString pdgs = "443;100443"; - std::string spdg; - TObjArray* obj = pdgs.Tokenize(";"); - fGeneratorCocktail->SetSizePdg(obj->GetEntriesFast()); - for (int i = 0; i < obj->GetEntriesFast(); i++) { - spdg = obj->At(i)->GetName(); - fGeneratorCocktail->AddPdg(std::stoi(spdg), i); - printf("PDG %d \n", std::stoi(spdg)); - } - fGeneratorCocktail->SetForceDecay(kEvtDiElectron); - - int target_pdg = 0; +// // J/psi and psi(2S) need to be slightly different since no EXODUS but EvtGen decayer +// auto genJpsi = new o2::eventgen::O2_GeneratorParamJpsi; +// genJpsi->SetNSignalPerEvent(nPart); // signal per event for J/Psi +// +// auto genPsi = new o2::eventgen::O2_GeneratorParamPsi; +// genPsi->SetNSignalPerEvent(nPart); // signal per event for Psi(2s) +// +// TString pdgs = "443;100443"; +// std::string spdg; +// TObjArray* obj = pdgs.Tokenize(";"); +// fGeneratorCocktail->SetSizePdg(obj->GetEntriesFast()); +// for (int i = 0; i < obj->GetEntriesFast(); i++) { +// spdg = obj->At(i)->GetName(); +// fGeneratorCocktail->AddPdg(std::stoi(spdg), i); +// printf("PDG %d \n", std::stoi(spdg)); +// } +// fGeneratorCocktail->SetForceDecay(kEvtDiElectron); + + int target_pdg = 1; if (mMode < 0) { - target_pdg = 0; - cout << "all-particle mode is selected. all 8 mesons are injected in each event" << endl; + target_pdg = 1; + cout << "all-particle mode is selected. all 6 mesons are injected in each event" << endl; cout << "add pi0 for signal" << endl; fGeneratorCocktail->AddGenerator(newgenpizero, 1); cout << "add eta for signal" << endl; @@ -298,49 +298,50 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 { fGeneratorCocktail->AddGenerator(newgenomega, 1); cout << "add phi for signal" << endl; fGeneratorCocktail->AddGenerator(newgenphi, 1); - cout << "add j/psi for signal" << endl; - fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi - cout << "add psi(2S) for signal" << endl; - fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) + //cout << "add j/psi for signal" << endl; + //fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi + //cout << "add psi(2S) for signal" << endl; + //fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) } else if (mMode < 100) { cout << "1-particle Mode is selected. 1 meson selected randomly per job is injected in each event" << endl; TRandom3 *r3 = new TRandom3(0); double rndm = r3->Rndm(); printf("rndm = %f\n", rndm); - if(rndm < 1/8.) { + if(rndm < 1/6.) { cout << "add pi0 for signal" << endl; fGeneratorCocktail->AddGenerator(newgenpizero, 1); target_pdg = 111; - } else if (rndm < 2/8.) { + } else if (rndm < 2/6.) { cout << "add eta for signal" << endl; fGeneratorCocktail->AddGenerator(newgeneta, 1); target_pdg = 221; - } else if (rndm < 3/8.) { + } else if (rndm < 3/6.) { cout << "add etaprime for signal" << endl; fGeneratorCocktail->AddGenerator(newgenetaprime, 1); target_pdg = 331; - } else if (rndm < 4/8.) { + } else if (rndm < 4/6.) { cout << "add rho for signal" << endl; fGeneratorCocktail->AddGenerator(newgenrho, 1); target_pdg = 113; - } else if (rndm < 5/8.) { + } else if (rndm < 5/6.) { cout << "add omega for signal" << endl; fGeneratorCocktail->AddGenerator(newgenomega, 1); target_pdg = 223; - } else if (rndm < 6/8.) { + } else if (rndm < 6/6.) { cout << "add phi for signal" << endl; fGeneratorCocktail->AddGenerator(newgenphi, 1); target_pdg = 333; - } else if (rndm < 7/8.) { - cout << "add j/psi for signal" << endl; - fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi - target_pdg = 443; - } else { - cout << "add psi(2S) for signal" << endl; - fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) - target_pdg = 100443; } + //else if (rndm < 7/8.) { + // cout << "add j/psi for signal" << endl; + // fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi + // target_pdg = 443; + //} else { + // cout << "add psi(2S) for signal" << endl; + // fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) + // target_pdg = 100443; + //} delete r3; } else { //directly select meson pdg target_pdg = mMode; @@ -369,14 +370,14 @@ class GeneratorPythia8GapTriggeredLFee : public GeneratorPythia8 { cout << "add phi for signal" << endl; fGeneratorCocktail->AddGenerator(newgenphi, 1); break; - case 443 : - cout << "add j/psi for signal" << endl; - fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi - break; - case 100443 : - cout << "add psi(2S) for signal" << endl; - fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) - break; +// case 443 : +// cout << "add j/psi for signal" << endl; +// fGeneratorCocktail->AddGenerator(genJpsi, 1); // add cocktail --> J/Psi +// break; +// case 100443 : +// cout << "add psi(2S) for signal" << endl; +// fGeneratorCocktail->AddGenerator(genPsi, 1); // add cocktail --> Psi(2s) +// break; default: cout << "!WARNING! default : nothing is added to cocktail generator" << endl; target_pdg = 1; diff --git a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFgamma.C b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFgamma.C index 10e6d7e23..7287009b3 100644 --- a/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFgamma.C +++ b/MC/config/PWGEM/external/generator/Generator_pythia8_GapTriggered_LFgamma.C @@ -81,17 +81,32 @@ class GeneratorPythia8GapTriggeredLFgamma : public GeneratorPythia8 { geneta->Init(); CocktailParam *newgeneta = new CocktailParam(geneta); + // eta + auto genk0s = new GeneratorParam(nPart,emlib,GeneratorParamEMlib::kK0s,"k0s"); // 310 for feed down + genk0s->SetName("k0s"); + genk0s->SetMomentumRange(0., 25.); + genk0s->SetPtRange(minPt, maxPt); + genk0s->SetYRange(yMin, yMax); + genk0s->SetPhiRange(phiMin, phiMax); + genk0s->SetWeighting(weightMode); // flat pt, y and v2 zero + genk0s->SetSelectAll(kTRUE); + genk0s->SetDecayer(decayer); + genk0s->Init(); + CocktailParam *newgenk0s = new CocktailParam(genk0s); + cout << "add pi0 for signal" << endl; fGeneratorCocktail->AddGenerator(newgenpizero, 1); cout << "add eta for signal" << endl; fGeneratorCocktail->AddGenerator(newgeneta, 1); + cout << "add k0s for signal" << endl; + fGeneratorCocktail->AddGenerator(newgenk0s, 1); // print debug fGeneratorCocktail->PrintDebug(); fGeneratorCocktail->Init(); addSubGenerator(0, "gap mb pythia"); - addSubGenerator(1, "injected cocktail"); + addSubGenerator(1, "event with injected signals"); }; From 483bc65c9b323f3b0fa0376969c4284542df1dc8 Mon Sep 17 00:00:00 2001 From: Chiara Zampolli Date: Wed, 26 Jun 2024 17:18:25 +0200 Subject: [PATCH 17/20] Using the detector list from GRP for the wf and other minor adjustments (#1672) --- .../configurations/asyncReco/async_pass.sh | 10 +- .../configurations/asyncReco/setenv_extra.sh | 128 ++++++++++-------- 2 files changed, 78 insertions(+), 60 deletions(-) diff --git a/DATA/production/configurations/asyncReco/async_pass.sh b/DATA/production/configurations/asyncReco/async_pass.sh index c1c0c5478..28969d0ce 100755 --- a/DATA/production/configurations/asyncReco/async_pass.sh +++ b/DATA/production/configurations/asyncReco/async_pass.sh @@ -717,15 +717,15 @@ if [[ $ALIEN_JDL_AODOFF != 1 ]]; then if (( $(echo "$PERCENT < $MIN_ALLOWED_AOD_PERCENT_SIZE" | bc -l) )); then AOD_LAST_BUT_ONE=`find . -name AO2D.root | sort | tail -2 | head -1` echo "Too small, merging $AOD_LAST with previous file $AOD_LAST_BUT_ONE" - ls $PWD/$AOD_LAST > list.list - ls $PWD/$AOD_LAST_BUT_ONE >> list.list + ls $PWD/$AOD_LAST > listAOD.list + ls $PWD/$AOD_LAST_BUT_ONE >> listAOD.list echo "List of files for merging:" - cat list.list + cat listAOD.list mkdir tmpAOD cd tmpAOD - ln -s ../list.list . + ln -s ../listAOD.list . timeStart=`date +%s` - time o2-aod-merger --input list.list + time o2-aod-merger --input listAOD.list exitcode=$? timeEnd=`date +%s` timeUsed=$(( $timeUsed+$timeEnd-$timeStart )) diff --git a/DATA/production/configurations/asyncReco/setenv_extra.sh b/DATA/production/configurations/asyncReco/setenv_extra.sh index 038a1f104..4f31c3bd4 100644 --- a/DATA/production/configurations/asyncReco/setenv_extra.sh +++ b/DATA/production/configurations/asyncReco/setenv_extra.sh @@ -24,40 +24,83 @@ if [[ $RUNNUMBER -lt 544772 ]]; then fi echo "RSRUNNUMBER = $RUNNUMBER RANS_OPT = $RANS_OPT" +# IR, duration, B field, detector list +if [[ -z $RUN_IR ]] || [[ -z $RUN_DURATION ]] || [[ -z $RUN_BFIELD ]]; then + echo "In setenv_extra: time used so far = $timeUsed" + timeStart=`date +%s` + time o2-calibration-get-run-parameters -r $RUNNUMBER + timeEnd=`date +%s` + timeUsed=$(( $timeUsed+$timeEnd-$timeStart )) + delta=$(( $timeEnd-$timeStart )) + echo "Time spent in getting run parameters = $delta s" + export RUN_IR=`cat IR.txt` + export RUN_DURATION=`cat Duration.txt` + export RUN_BFIELD=`cat BField.txt` + export RUN_DETECTOR_LIST=`cat DetList.txt` +fi +echo -e "\n" +echo "Printing run features" +echo "DETECTOR LIST for current run ($RUNNUMBER) = $RUN_DETECTOR_LIST" +echo "DURATION for current run ($RUNNUMBER) = $RUN_DURATION" +echo "B FIELD for current run ($RUNNUMBER) = $RUN_BFIELD" +echo "IR for current run ($RUNNUMBER) = $RUN_IR" +if (( $(echo "$RUN_IR <= 0" | bc -l) )); then + echo "Changing run IR to 1 Hz, because $RUN_IR makes no sense" + RUN_IR=1 +fi +echo "BeamType = $BEAMTYPE" +echo "PERIOD = $PERIOD" + # detector list +echo -e "\n" +echo "Printing detector list for reconstruction" if [[ -n $ALIEN_JDL_WORKFLOWDETECTORS ]]; then + echo "WORKFLOW_DETECTORS taken from JDL, ALIEN_JDL_WORKFLOWDETECTORS = $ALIEN_JDL_WORKFLOWDETECTORS" export WORKFLOW_DETECTORS=$ALIEN_JDL_WORKFLOWDETECTORS else - export WORKFLOW_DETECTORS=ITS,TPC,TOF,FV0,FT0,FDD,MID,MFT,MCH,TRD,EMC,PHS,CPV,HMP,ZDC,CTP + export WORKFLOW_DETECTORS=`echo $RUN_DETECTOR_LIST | sed 's/ /,/g'` if [[ $RUNNUMBER == 528529 ]] || [[ $RUNNUMBER == 528530 ]]; then # removing MID for these runs: it was noisy and therefore declared bad, and makes the reco crash - export WORKFLOW_DETECTORS=ITS,TPC,TOF,FV0,FT0,FDD,MFT,MCH,TRD,EMC,PHS,CPV,HMP,ZDC,CTP + echo "Excluding MID since RUNNUMBER = $RUNNUMBER" + export WORKFLOW_DETECTORS_EXCLUDE="MID" fi # list of detectors to possibly exclude if [[ -n $ALIEN_JDL_DETECTORSEXCLUDE ]]; then - echo "ALIEN_JDL_DETECTORSEXCLUDE = $ALIEN_JDL_DETECTORSEXCLUDE" + echo "DETECTORS_EXCLUDE taken from JDL, ALIEN_JDL_DETECTORSEXCLUDE = $ALIEN_JDL_DETECTORSEXCLUDE" export DETECTORS_EXCLUDE=$ALIEN_JDL_DETECTORSEXCLUDE # will be used in the async_pass.sh if we run in split mode - export WORKFLOW_DETECTORS_EXCLUDE=$DETECTORS_EXCLUDE + if [[ -z ${WORKFLOW_DETECTORS_EXCLUDE:+x} ]]; then # there is no WORKFLOW_DETECTORS_EXCLUDE, or it is NULL + export WORKFLOW_DETECTORS_EXCLUDE=$DETECTORS_EXCLUDE + else + export WORKFLOW_DETECTORS_EXCLUDE+=",$DETECTORS_EXCLUDE" + fi fi fi +echo "Final settings for detectors to be processed:" +echo "WORKFLOW_DETECTORS = $WORKFLOW_DETECTORS" +echo "WORKFLOW_DETECTORS_EXCLUDE = $WORKFLOW_DETECTORS_EXCLUDE" + # ad-hoc settings for CTF reader: we are on the grid, we read the files remotely -echo "*********************** mode = ${MODE}" +echo -e "\nProcessing mode = ${MODE}" unset ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow if [[ $MODE == "remote" ]]; then if [[ $ALIEN_JDL_REMOTEREADING != 1 ]]; then + echo "Files will be copied locally: we expect that the JDL has the \"nodownload\" option" export INPUT_FILE_COPY_CMD="\"alien_cp ?src file://?dst\"" - export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow="$ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow --remote-regex \"^alien:///alice/data/.+\"" + export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow+=" --remote-regex \"^alien:///alice/data/.+\"" else + echo "Files will NOT be copied locally: we expect that the job agent takes care" export INPUT_FILE_COPY_CMD="no-copy" fi fi +echo -e "\nSetting up workflow options" + # adjusting for trigger LM_L0 correction, which was not there before July 2022 if [[ $PERIOD == "LHC22c" ]] || [[ $PERIOD == "LHC22d" ]] || [[ $PERIOD == "LHC22e" ]] || [[ $PERIOD == "JUN" ]] || [[ $PERIOD == "LHC22f" ]] ; then if [[ $ALIEN_JDL_LPMPRODUCTIONTYPE != "MC" ]]; then - export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow="$ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow --correct-trd-trigger-offset" + export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow+=" --correct-trd-trigger-offset" fi fi @@ -76,18 +119,16 @@ if [[ $remappingITS == 1 ]] || [[ $remappingMFT == 1 ]]; then REMAPPING=$REMAPPING\" fi -echo remapping = $REMAPPING -echo "BeamType = $BEAMTYPE" -echo "PERIOD = $PERIOD" +echo "Remapping = $REMAPPING" # needed if we need more wf export ADD_EXTRA_WORKFLOW= # other ad-hoc settings for CTF reader -export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow="$ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow --allow-missing-detectors $REMAPPING" +export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow+=" --allow-missing-detectors $REMAPPING" echo RUN = $RUNNUMBER if [[ $RUNNUMBER -ge 521889 ]]; then - export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow="$ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow --its-digits --mft-digits" + export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow+=" --its-digits --mft-digits" export DISABLE_DIGIT_CLUSTER_INPUT="--digits-from-upstream" MAXBCDIFFTOMASKBIAS_ITS="ITSClustererParam.maxBCDiffToMaskBias=-10" # this explicitly disables ITS masking MAXBCDIFFTOSQUASHBIAS_ITS="ITSClustererParam.maxBCDiffToSquashBias=10" # this explicitly enables ITS squashing @@ -195,6 +236,7 @@ else echo "************************************************************" fi +echo -e "\nTPC vdrift:" # TPC vdrift PERIODLETTER=${PERIOD: -1} VDRIFTPARAMOPTION= @@ -213,30 +255,7 @@ else echo "TPC vdrift will be taken from CCDB" fi -# IR -if [[ -z $RUN_IR ]] || [[ -z $RUN_DURATION ]] || [[ -z $RUN_BFIELD ]]; then - cp $O2DPG_ROOT/DATA/production/common/getIRandDuration.C ./ - echo "In setenv_extra: time used so far = $timeUsed" - timeStart=`date +%s` - time o2-calibration-get-run-parameters -r $RUNNUMBER - timeEnd=`date +%s` - timeUsed=$(( $timeUsed+$timeEnd-$timeStart )) - delta=$(( $timeEnd-$timeStart )) - echo "Time spent in getting IR and duration of the run = $delta s" - export RUN_IR=`cat IR.txt` - export RUN_DURATION=`cat Duration.txt` - export RUN_BFIELD=`cat BField.txt` - export RUN_DETECTOR_LIST=`cat DetList.txt` -fi -echo "DETECTOR LIST for current run ($RUNNUMBER) = $RUN_DETECTOR_LIST" -echo "DURATION for current run ($RUNNUMBER) = $RUN_DURATION" -echo "B FIELD for current run ($RUNNUMBER) = $RUN_BFIELD" -echo "IR for current run ($RUNNUMBER) = $RUN_IR" -if (( $(echo "$RUN_IR <= 0" | bc -l) )); then - echo "Changing run IR to 1 Hz, because $RUN_IR makes no sense" - RUN_IR=1 -fi - +echo -e "\nTPC calib configuration:" # Let's check if ZDC is in the detector list; this is needed for TPC dist correction scaling in PbPb 2023 SCALE_WITH_ZDC=1 SCALE_WITH_FT0=1 @@ -252,12 +271,10 @@ if (( RUN_DURATION < 600 )); then export CALIB_TPC_SCDCALIB_SLOTLENGTH=$RUN_DURATION fi -echo "BeamType = $BEAMTYPE" - if [[ $ALIEN_JDL_ENABLEMONITORING != "0" ]]; then # add the performance metrics export ENABLE_METRICS=1 - export ARGS_ALL_EXTRA="$ARGS_ALL_EXTRA --resources-monitoring 50 --resources-monitoring-dump-interval 50" + export ARGS_ALL_EXTRA+=" --resources-monitoring 50 --resources-monitoring-dump-interval 50" else # remove monitoring-backend export ENABLE_METRICS=0 @@ -448,7 +465,7 @@ fi # ad-hoc settings for TOF reco # export ARGS_EXTRA_PROCESS_o2_tof_reco_workflow+="--use-ccdb --ccdb-url-tof \"http://alice-ccdb.cern.ch\"" # since commit on Dec, 4 -export ARGS_EXTRA_PROCESS_o2_tof_reco_workflow="$ARGS_EXTRA_PROCESS_o2_tof_reco_workflow --use-ccdb" +export ARGS_EXTRA_PROCESS_o2_tof_reco_workflow+=" --use-ccdb" # ad-hoc options for primary vtx workflow #export PVERTEXER="pvertexer.acceptableScale2=9;pvertexer.minScale2=2.;pvertexer.nSigmaTimeTrack=4.;pvertexer.timeMarginTrackTime=0.5;pvertexer.timeMarginVertexTime=7.;pvertexer.nSigmaTimeCut=10;pvertexer.dbscanMaxDist2=30;pvertexer.dcaTolerance=3.;pvertexer.pullIniCut=100;pvertexer.addZSigma2=0.1;pvertexer.tukey=20.;pvertexer.addZSigma2Debris=0.01;pvertexer.addTimeSigma2Debris=1.;pvertexer.maxChi2Mean=30;pvertexer.timeMarginReattach=3.;pvertexer.addTimeSigma2Debris=1.;" @@ -490,10 +507,10 @@ export CONFIG_EXTRA_PROCESS_o2_tpcits_match_workflow+=";$ITSEXTRAERR;$ITSTPCMATC [[ ! -z "${TPCITSTIMEERR}" ]] && export CONFIG_EXTRA_PROCESS_o2_tpcits_match_workflow+=";tpcitsMatch.globalTimeExtraErrorMUS=$TPCITSTIMEERR;" # enabling AfterBurner -has_detector FT0 && export ARGS_EXTRA_PROCESS_o2_tpcits_match_workflow="$ARGS_EXTRA_PROCESS_o2_tpcits_match_workflow --use-ft0" +has_detector FT0 && export ARGS_EXTRA_PROCESS_o2_tpcits_match_workflow+=" --use-ft0" # ad-hoc settings for TOF matching -export ARGS_EXTRA_PROCESS_o2_tof_matcher_workflow="$ARGS_EXTRA_PROCESS_o2_tof_matcher_workflow --output-type matching-info,calib-info --enable-dia" +export ARGS_EXTRA_PROCESS_o2_tof_matcher_workflow+=" --output-type matching-info,calib-info --enable-dia" export CONFIG_EXTRA_PROCESS_o2_tof_matcher_workflow+=";$ITSEXTRAERR;$TRACKTUNETPC;$VDRIFTPARAMOPTION;" if [[ $ALIEN_JDL_LPMPASSNAME == "cpass0" ]]; then @@ -505,13 +522,13 @@ fi export CONFIG_EXTRA_PROCESS_o2_trd_global_tracking+=";$ITSEXTRAERR;$TRACKTUNETPC;$VDRIFTPARAMOPTION;GPU_rec_trd.minTrackPt=0.3;" # ad-hoc settings for FT0 -export ARGS_EXTRA_PROCESS_o2_ft0_reco_workflow="$ARGS_EXTRA_PROCESS_o2_ft0_reco_workflow --ft0-reconstructor" +export ARGS_EXTRA_PROCESS_o2_ft0_reco_workflow+=" --ft0-reconstructor" if [[ $BEAMTYPE == "PbPb" ]]; then - export CONFIG_EXTRA_PROCESS_o2_ft0_reco_workflow=";FT0TimeFilterParam.mAmpLower=10;" + export CONFIG_EXTRA_PROCESS_o2_ft0_reco_workflow+=";FT0TimeFilterParam.mAmpLower=10;" fi # ad-hoc settings for FV0 -export ARGS_EXTRA_PROCESS_o2_fv0_reco_workflow="$ARGS_EXTRA_PROCESS_o2_fv0_reco_workflow --fv0-reconstructor" +export ARGS_EXTRA_PROCESS_o2_fv0_reco_workflow+=" --fv0-reconstructor" # ad-hoc settings for FDD #... @@ -564,20 +581,20 @@ if [[ $ADD_CALIB == "1" ]]; then if [[ $DO_TPC_RESIDUAL_EXTRACTION == "1" ]]; then export CALIB_TPC_SCDCALIB=1 export CALIB_TPC_SCDCALIB_SENDTRKDATA=1 - export CONFIG_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow="scdcalib.additionalTracksMap=35000000;scdcalib.minPtNoOuterPoint=0.2;scdcalib.maxQ2Pt=5;scdcalib.minITSNClsNoOuterPoint=6;scdcalib.minITSNCls=4;scdcalib.minTPCNClsNoOuterPoint=90;scdcalib.minTOFTRDPVContributors=2" - export ARGS_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow="$ARGS_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow --tracking-sources-map-extraction ITS-TPC" + export CONFIG_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow+=";scdcalib.additionalTracksMap=35000000;scdcalib.minPtNoOuterPoint=0.2;scdcalib.maxQ2Pt=5;scdcalib.minITSNClsNoOuterPoint=6;scdcalib.minITSNCls=4;scdcalib.minTPCNClsNoOuterPoint=90;scdcalib.minTOFTRDPVContributors=2" + export ARGS_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow+=" --tracking-sources-map-extraction ITS-TPC" # ad-hoc settings for TPC residual extraction - export ARGS_EXTRA_PROCESS_o2_calibration_residual_aggregator="$ARGS_EXTRA_PROCESS_o2_calibration_residual_aggregator --output-type trackParams,unbinnedResid" + export ARGS_EXTRA_PROCESS_o2_calibration_residual_aggregator+=" --output-type trackParams,unbinnedResid" if [[ $ALIEN_JDL_DEBUGRESIDUALEXTRACTION == "1" ]]; then export CONFIG_EXTRA_PROCESS_o2_tpc_scdcalib_interpolation_workflow+=";scdcalib.maxTracksPerCalibSlot=-1;scdcalib.minPtNoOuterPoint=0.8;scdcalib.minTPCNClsNoOuterPoint=120" - export ARGS_EXTRA_PROCESS_o2_trd_global_tracking+="$ARGS_EXTRA_PROCESS_o2_trd_global_tracking --enable-qc" + export ARGS_EXTRA_PROCESS_o2_trd_global_tracking+=" --enable-qc" fi fi export CALIB_EMC_ASYNC_RECALIB="$ALIEN_JDL_DOEMCCALIB" if [[ $ALIEN_JDL_DOTRDVDRIFTEXBCALIB == "1" ]]; then export CALIB_TRD_VDRIFTEXB="$ALIEN_JDL_DOTRDVDRIFTEXBCALIB" - export ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow="$ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow --enable-root-output" - export ARGS_EXTRA_PROCESS_o2_trd_global_tracking="$ARGS_EXTRA_PROCESS_o2_trd_global_tracking --enable-qc" + export ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow+=" --enable-root-output" + export ARGS_EXTRA_PROCESS_o2_trd_global_tracking+=" --enable-qc" fi if [[ $ALIEN_JDL_DOMEANVTXCALIB == 1 ]]; then export CALIB_PRIMVTX_MEANVTX="$ALIEN_JDL_DOMEANVTXCALIB" @@ -586,8 +603,8 @@ if [[ $ADD_CALIB == "1" ]]; then export SVERTEXING_SOURCES=none # disable secondary vertexing fi if [[ $ALIEN_JDL_DOTRDGAINCALIB == 1 ]]; then - export CONFIG_EXTRA_PROCESS_o2_calibration_trd_workflow="TRDCalibParams.minEntriesChamberGainCalib=999999999;TRDCalibParams.minEntriesTotalGainCalib=10000;TRDCalibParams.nTrackletsMinGainCalib=4" - export ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow="$ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow --enable-root-output" + export CONFIG_EXTRA_PROCESS_o2_calibration_trd_workflow+=";TRDCalibParams.minEntriesChamberGainCalib=999999999;TRDCalibParams.minEntriesTotalGainCalib=10000;TRDCalibParams.nTrackletsMinGainCalib=4" + export ARGS_EXTRA_PROCESS_o2_calibration_trd_workflow+=" --enable-root-output" export CALIB_TRD_GAIN=1 fi # extra workflows in case we want to process the currents for FT0, FV0, TOF, TPC @@ -624,6 +641,7 @@ if [[ $ALIEN_JDL_AODOFF != "1" ]]; then fi # ad-hoc settings for AOD +echo -e "\nNeeded for AODs:" echo ALIEN_JDL_LPMPRODUCTIONTAG = $ALIEN_JDL_LPMPRODUCTIONTAG echo ALIEN_JDL_LPMPASSNAME = $ALIEN_JDL_LPMPASSNAME # Track QC table sampling @@ -648,9 +666,9 @@ else fi fi echo TRACKQC_FRACTION = $TRACKQC_FRACTION -export ARGS_EXTRA_PROCESS_o2_aod_producer_workflow="$ARGS_EXTRA_PROCESS_o2_aod_producer_workflow --aod-writer-maxfilesize $AOD_FILE_SIZE --lpmp-prod-tag $ALIEN_JDL_LPMPRODUCTIONTAG --reco-pass $ALIEN_JDL_LPMPASSNAME --trackqc-fraction $TRACKQC_FRACTION" +export ARGS_EXTRA_PROCESS_o2_aod_producer_workflow+=" --aod-writer-maxfilesize $AOD_FILE_SIZE --lpmp-prod-tag $ALIEN_JDL_LPMPRODUCTIONTAG --reco-pass $ALIEN_JDL_LPMPASSNAME --trackqc-fraction $TRACKQC_FRACTION" if [[ $PERIOD == "LHC22c" ]] || [[ $PERIOD == "LHC22d" ]] || [[ $PERIOD == "LHC22e" ]] || [[ $PERIOD == "JUN" ]] || [[ $PERIOD == "LHC22f" ]] || [[ $PERIOD == "LHC22m" ]] || [[ "$RUNNUMBER" == @(526463|526465|526466|526467|526468|526486|526505|526508|526510|526512|526525|526526|526528|526534|526559|526596|526606|526612|526638|526639|526641|526643|526647|526649|526689|526712|526713|526714|526715|526716|526719|526720|526776|526886|526926|526927|526928|526929|526934|526935|526937|526938|526963|526964|526966|526967|526968|527015|527016|527028|527031|527033|527034|527038|527039|527041|527057|527076|527108|527109|527228|527237|527259|527260|527261|527262|527345|527347|527349|527446|527518|527523|527734) ]] ; then - export ARGS_EXTRA_PROCESS_o2_aod_producer_workflow="$ARGS_EXTRA_PROCESS_o2_aod_producer_workflow --ctpreadout-create 1" + export ARGS_EXTRA_PROCESS_o2_aod_producer_workflow+=" --ctpreadout-create 1" fi # Enabling QC From b737c2705cc55b52accddcafcd89cc27c5d6dff8 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Wed, 26 Jun 2024 21:21:28 +0200 Subject: [PATCH 18/20] ALICE 3: proc_id is actually a long (#1675) * ALICE 3: proc_id is actually a long ...does not yet guarantee PYTHIA will accept it! * Update generator_pythia8_ALICE3.C --- .../ALICE3/pythia8/generator_pythia8_ALICE3.C | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C b/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C index d0dbe37b3..bd562c082 100644 --- a/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C +++ b/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C @@ -18,18 +18,20 @@ public: GeneratorPythia8ALICE3() { char* alien_proc_id = getenv("ALIEN_PROC_ID"); - int seed; + uint64_t seedFull; + uint64_t seed = 0; if (alien_proc_id != NULL) { - seed = atoi(alien_proc_id); - LOG(info) << "Seed set to ALIEN_PROC_ID: " << seed; + seedFull = static_cast(atol(alien_proc_id)); + for(int ii=0; ii<29; ii++) // there might be a cleaner way but this will work + seed |= ((seedFull) & (static_cast(1) << static_cast(ii))); + LOG(info) << "Value of ALIEN_PROC_ID: " << seedFull <<" truncated to 0-28 bits: "< list.list - #export MODE="remote" - echo "${1}" > list.list - if [[ ! -z $ASYNC_BENCHMARK_ITERATIONS ]]; then - for i in `seq 1 $ASYNC_BENCHMARK_ITERATIONS`; do echo "${1}" >> list.list; done - fi - export MODE="LOCAL" - shift + #echo ${1##*.} + #echo "alien://${1}" > list.list + #export MODE="remote" + echo "${1}" > list.list + if [[ ! -z $ASYNC_BENCHMARK_ITERATIONS ]]; then + for i in `seq 1 $ASYNC_BENCHMARK_ITERATIONS`; do echo "${1}" >> list.list; done + fi + export MODE="LOCAL" + shift elif [[ "${1##*.}" == "xml" ]]; then + if [[ $ALIEN_JDL_DOWNLOADINPUTFILES == "1" ]]; then + echo "Downloading input files done by the job agent" + sed -rn 's/.*file\ name="(o2_ctf[^"]*)".*/\1/p' $1 > list.list + else sed -rn 's/.*turl="([^"]*)".*/\1/p' $1 > list.list - export MODE="remote" - shift + fi + export MODE="remote" + shift elif [[ $1 != "list.list" && "${1##*.}" == "list" ]]; then - cp $1 list.list - export MODE="remote" - shift + cp $1 list.list + export MODE="remote" + shift fi # Could need sometimes to iterate just a subset of the input files From 8279d4b6f43552b8e0849ec53aa29e0d84d84ccb Mon Sep 17 00:00:00 2001 From: shahoian Date: Fri, 28 Jun 2024 01:45:10 +0200 Subject: [PATCH 20/20] Skimming needs to know NHBPERTF, extract from ALIEN_JDL_LPMRUNNUMBER --- .../CTFSkimming/ctf-skim-workflow.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/DATA/production/configurations/CTFSkimming/ctf-skim-workflow.sh b/DATA/production/configurations/CTFSkimming/ctf-skim-workflow.sh index 69b156876..fbf38cbda 100755 --- a/DATA/production/configurations/CTFSkimming/ctf-skim-workflow.sh +++ b/DATA/production/configurations/CTFSkimming/ctf-skim-workflow.sh @@ -3,6 +3,22 @@ # Non-zero exit code already if one command in a pipe fails set -o pipefail +if [[ -z "$NHBPERTF" ]]; then # try to extract from JDL variables + NHBPERTF=32 + if [[ ! -z "$ALIEN_JDL_NHBPERTF" ]] && [[ "$ALIEN_JDL_NHBPERTF" != 0 ]]; then + NHBPERTF=$ALIEN_JDL_NHBPERTF + echo "Set NHBF per TF to $NHBPERTF from ALIEN_JDL_NHBPERTF" + elif [[ ! -z "$ALIEN_JDL_LPMRUNNUMBER" ]]; then + [[ "$ALIEN_JDL_LPMRUNNUMBER" -lt 534125 ]] && NHBPERTF=128 || NHBPERTF=32 + echo "Set NHBF per TF to $NHBPERTF from ALIEN_JDL_LPMRUNNUMBER=$ALIEN_JDL_LPMRUNNUMBER" + else + echo "Set NHBF per TF to $NHBPERTF as default" + fi +else + echo "Set NHBF per TF to $NHBPERTF as requested explicitly" +fi +export NHBPERTF + # --------------------------------------------------------------------------------------------------------------------- # Get this script's directory and load common settings (use zsh first (e.g. on Mac) and fallback on `readlink -f` if zsh is not there) : ${GEN_TOPO_MYDIR:="$O2DPG_ROOT/DATA/production"} @@ -26,6 +42,7 @@ if [[ ! -z "$ALIEN_JDL_SHMSIZE" ]]; then export SHMSIZE=$ALIEN_JDL_SHMSIZE; fi if [[ ! -z "$ALIEN_JDL_MULTIPLICITYPROCESSTPCENTROPYDECODER" ]]; then export MULTIPLICITY_PROCESS_tpc_entropy_decoder=$ALIEN_JDL_MULTIPLICITYPROCESSTPCENTROPYDECODER; fi if [[ ! -z "$ALIEN_JDL_MULTIPLICITYPROCESSTPCENTROPYENCODER" ]]; then export MULTIPLICITY_PROCESS_tpc_entropy_encoder=$ALIEN_JDL_MULTIPLICITYPROCESSTPCENTROPYENCODER; fi + # Set general arguments source $GEN_TOPO_MYDIR/getCommonArgs.sh || { echo "getCommonArgs.sh failed" 1>&2 && exit 1; } @@ -86,7 +103,7 @@ if [[ -z ${NO_ITSMFT_MASKING:-} ]] ; then has_detector_ctf MFT && export ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow="$ARGS_EXTRA_PROCESS_o2_ctf_reader_workflow --mft-digits" fi -add_W o2-ctf-reader-workflow "--ctf-data-subspec 1 --ir-frames-files $IRFRAMES $SKIP_SKIMMED_OUT_TF --ctf-input $CTFLIST ${INPUT_FILE_COPY_CMD+--copy-cmd} ${INPUT_FILE_COPY_CMD} --onlyDet $WORKFLOW_DETECTORS $ALLOW_MISSING_DET --pipeline $(get_N tpc-entropy-decoder TPC REST 1 TPCENTDEC)" +add_W o2-ctf-reader-workflow "--ctf-data-subspec 1 --ir-frames-files $IRFRAMES $SKIP_SKIMMED_OUT_TF --ctf-input $CTFLIST ${INPUT_FILE_COPY_CMD+--copy-cmd} ${INPUT_FILE_COPY_CMD} --onlyDet $WORKFLOW_DETECTORS $ALLOW_MISSING_DET --pipeline $(get_N tpc-entropy-decoder TPC REST 1 TPCENTDEC)" "HBFUtils.nHBFPerTF=$NHBPERTF" if [[ -z ${NO_ITSMFT_MASKING:-} ]] ; then has_detector_ctf ITS && add_W o2-its-reco-workflow "--digits-from-upstream --disable-mc --disable-tracking --disable-root-output --pipeline $(get_N its-tracker ITS REST 1 ITSTRK)" "ITSClustererParam.maxBCDiffToMaskBias=10;"