diff --git a/examples/pythia8/pythia_nuclei.cfg b/examples/pythia8/pythia_nuclei.cfg index b5583b4..db4a140 100644 --- a/examples/pythia8/pythia_nuclei.cfg +++ b/examples/pythia8/pythia_nuclei.cfg @@ -1,7 +1,7 @@ #Config file to define the nuclei species that are not in vanilla pythia -1000020030:all 3He 3Hebar 1 6 0 2.8094 -1000010030:all 3Tr 3Trbar 1 3 0 2.8089218 -2010010020:all 2CDeuteron 2CDeuteronbar 1 3 0 3.226 +1000020030:all = 3He 3Hebar 1 6 0 2.8094 +1000010030:all = 3Tr 3Trbar 1 3 0 2.8089218 +12345:all = 2CDeuteron 2CDeuteronbar 1 3 0 3.226 # c-deuteron -> deuteron K- pi+ -2010010020:tau0=0.06000000000 -2010010020:addChannel = 1 .1 0 1000010020 -321 211 +12345:tau0 = 0.06000000000 +12345:addChannel = 1 .1 0 1000010020 -321 211 diff --git a/examples/scripts/create_luts.sh b/examples/scripts/create_luts.sh index ab21e05..b57a1ae 100755 --- a/examples/scripts/create_luts.sh +++ b/examples/scripts/create_luts.sh @@ -5,6 +5,9 @@ WHAT=default FIELD=0.5 RMIN=100. WRITER_PATH=${DELPHESO2_ROOT}/lut/ +if [[ -z ${DELPHESO2_ROOT} ]]; then + WRITER_PATH="../../src/" +fi OUT_PATH=. OUT_TAG= PARALLEL_JOBS=1 @@ -66,7 +69,7 @@ while getopts ${optstring} option; do PARALLEL_JOBS=$OPTARG echo " > Setting parallel jobs to ${PARALLEL_JOBS}" ;; - T) + F) AUTOTAG= echo " > Disabling autotagging mode" ;; diff --git a/examples/scripts/default_configfile.ini b/examples/scripts/default_configfile.ini index c552fed..de78eb8 100644 --- a/examples/scripts/default_configfile.ini +++ b/examples/scripts/default_configfile.ini @@ -104,10 +104,10 @@ custom_gen = rpythia8-box --pdg 1000020030 --etamin -2. --etamax 2. --phimin 0. custom_gen = rpythia8-box --pdg 1000020030 --etamin -2. --etamax 2. --phimin 0. --phimax 6.28 --pmin 0 --pmax 10 --xProd 0. --yProd 0. --zProd 0. --decay --npart 100 --config $DELPHESO2_ROOT/examples/pythia8/pythia_nuclei.cfg [BOX_c_deuteron_nobkg] -custom_gen = rpythia8-box --pdg 2010010020 --etamin -2. --etamax 2. --phimin 0. --phimax 6.28 --pmin 0 --pmax 10 --xProd 0. --yProd 0. --zProd 0. --decay --npart 100 --config /home/njacazio/alice/DelphesO2/examples/pythia8/pythia_nuclei.cfg +custom_gen = rpythia8-box --pdg 12345 --etamin -2. --etamax 2. --phimin 0. --phimax 6.28 --pmin 0 --pmax 10 --xProd 0. --yProd 0. --zProd 0. --decay --npart 100 --config $DELPHESO2_ROOT/examples/pythia8/pythia_nuclei.cfg [BOX_c_deuteron] -custom_gen = rpythia8-box --pdg 2010010020 --etamin -2. --etamax 2. --phimin 0. --phimax 6.28 --pmin 0 --pmax 10 --xProd 0. --yProd 0. --zProd 0. --decay --npart 100 --config /home/njacazio/alice/DelphesO2/examples/pythia8/pythia_nuclei.cfg --background-config $O2_ROOT/share/Generators/egconfig/pythia8_hi.cfg +custom_gen = rpythia8-box --pdg 12345 --etamin -2. --etamax 2. --phimin 0. --phimax 6.28 --pmin 0 --pmax 10 --xProd 0. --yProd 0. --zProd 0. --decay --npart 100 --config $DELPHESO2_ROOT/examples/pythia8/pythia_nuclei.cfg --background-config $O2_ROOT/share/Generators/egconfig/pythia8_hi.cfg [GUN_Lc_pKpi] custom_gen = rpythia8-gun --pdg 4122 --px 1. --py 0. --pz 0. --xProd 1. --yProd 0. --zProd 0. --config $O2DPG_ROOT/MC/config/PWGHF/pythia8/decayer/force_hadronic_D_forceLcChannel1.cfg --decay diff --git a/examples/scripts/diagnostic_tools/doanalysis.py b/examples/scripts/diagnostic_tools/doanalysis.py index b2c8c26..62326ee 100755 --- a/examples/scripts/diagnostic_tools/doanalysis.py +++ b/examples/scripts/diagnostic_tools/doanalysis.py @@ -127,6 +127,7 @@ def main(mode, rate_lim=1000000000, readers=1, avoid_overwriting_merge=False, + clean_localhost_after_running=True, extra_arguments=""): if len(input_file) == 1: input_file = input_file[0] @@ -214,6 +215,8 @@ def build_list_of_files(file_list): if not merge_only: run_in_parallel(processes=njobs, job_runner=run_o2_analysis, job_arguments=run_list, job_message="Running analysis") + if clean_localhost_after_running: + run_cmd("find /tmp/ -maxdepth 1 -name localhost* -user $(whoami) | xargs rm -v") if merge_output or merge_only: files_to_merge = [] diff --git a/examples/smearing/print_lut.py b/examples/smearing/print_lut.py new file mode 100755 index 0000000..befa161 --- /dev/null +++ b/examples/smearing/print_lut.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +""" +Inspector of the LUT file. +""" + +from ROOT import gInterpreter +import argparse + +def main(file_name): + headers = """ + #include "lutCovm.hh" + #include + #include + """ + + gInterpreter.ProcessLine(headers) + + gInterpreter.ProcessLine(f"const char* filename = \"{file_name}\";") + printer = """ + ifstream lutFile(filename, std::ofstream::binary); + lutHeader_t lutHeader; + lutFile.read(reinterpret_cast(&lutHeader), sizeof(lutHeader)); + lutHeader.print(); + """ + gInterpreter.ProcessLine(printer) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("input_file", type=str, + help="Name of the input file.") + args = parser.parse_args() + main(args.input_file)