Skip to content

Commit 6406128

Browse files
authored
Merge b127702 into sapling-pr-archive-ehellbar
2 parents 80f85c4 + b127702 commit 6406128

26 files changed

Lines changed: 880 additions & 12 deletions

DATA/common/setenv_calib.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ if [[ $BEAMTYPE != "cosmic" ]] || [[ ${FORCECALIBRATIONS:-} == 1 ]] ; then # Cal
5151
if [[ $CAN_DO_CALIB_PRIMVTX_MEANVTX == 1 ]]; then
5252
if [[ -z ${CALIB_PRIMVTX_MEANVTX+x} ]]; then CALIB_PRIMVTX_MEANVTX=1; fi
5353
fi
54-
54+
5555
# calibrations for ITS
5656
if [[ $CAN_DO_CALIB_ITS_DEADMAP_TIME == 1 ]]; then
5757
if [[ -z ${CALIB_ITS_DEADMAP_TIME+x} ]]; then CALIB_ITS_DEADMAP_TIME=1; fi
5858
fi
59-
59+
6060
# calibrations for MFT
6161
if [[ $CAN_DO_CALIB_MFT_DEADMAP_TIME == 1 ]]; then
6262
if [[ -z ${CALIB_MFT_DEADMAP_TIME+x} ]]; then CALIB_MFT_DEADMAP_TIME=1; fi
6363
fi
64-
64+
6565
# calibrations for TOF
6666
if [[ $CAN_DO_CALIB_TOF_DIAGNOSTICS == 1 ]]; then
6767
if [[ -z ${CALIB_TOF_DIAGNOSTICS+x} ]]; then CALIB_TOF_DIAGNOSTICS=1; fi
@@ -260,14 +260,15 @@ if [[ -z ${CALIBDATASPEC_BARREL_TF:-} ]]; then
260260

261261
# MFT
262262
if [[ $CALIB_MFT_DEADMAP_TIME == 1 ]]; then add_semicolon_separated CALIBDATASPEC_BARREL_TF "mftChipStatus:MFT/CHIPSSTATUS/0"; fi
263-
263+
264264
# TOF
265265
if [[ $CALIB_TOF_LHCPHASE == 1 ]] || [[ $CALIB_TOF_CHANNELOFFSETS == 1 ]]; then add_semicolon_separated CALIBDATASPEC_BARREL_TF "calibTOF:TOF/CALIBDATA/0"; fi
266266
if [[ $CALIB_TOF_DIAGNOSTICS == 1 ]]; then add_semicolon_separated CALIBDATASPEC_BARREL_TF "diagWords:TOF/DIAFREQ/0"; fi
267267

268268
# TPC
269269
if [[ $CALIB_TPC_SCDCALIB == 1 ]]; then
270270
add_semicolon_separated CALIBDATASPEC_BARREL_TF "unbinnedTPCResiduals:GLO/UNBINNEDRES/0"
271+
add_semicolon_separated CALIBDATASPEC_BARREL_TF "detectorInfoResiduals:GLO/DETINFORES/0"
271272
add_semicolon_separated CALIBDATASPEC_BARREL_TF "trackReferences:GLO/TRKREFS/0"
272273
fi
273274
if [[ $CALIB_TPC_SCDCALIB == 1 ]] && [[ ${CALIB_TPC_SCDCALIB_SENDTRKDATA:-} == "1" ]]; then add_semicolon_separated CALIBDATASPEC_BARREL_TF "tpcInterpTrkData:GLO/TRKDATA/0"; fi

MC/bin/o2dpg_sim_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def add(cfg, flatconfig):
134134
# ----- add default settings -----
135135

136136
add(config, {"MFTBase.buildAlignment" : "true"})
137+
add(config, {"GenTPCLoopers.colsys" : args.col})
137138

138139
# ----- apply external overwrites from command line -------
139140
for keyval in externalConfigString.split(";"):

MC/bin/o2dpg_sim_workflow.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,22 @@ def getDigiTaskName(det):
12551255
tpcclustertasks.append(taskname)
12561256
tpcclussect = createTask(name=taskname, needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu='2', mem='8000')
12571257
digitmergerstr = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' --tpc-lanes ' + str(NWORKERS_TF) + ' | '
1258-
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + ' ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options(bigshm=True) + ' --input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking] + ' --output-type clusters,send-clusters-per-sector --tpc-native-cluster-writer \" --outfile tpc-native-clusters-part'+ str((int)(s/sectorpertask)) + '.root\" --tpc-sectors ' + str(s)+'-'+str(s+sectorpertask-1) + ' ' + putConfigValues(["GPU_global"], {"GPU_proc.ompThreads" : 4}) + ('',' --disable-mc')[args.no_mc_labels]
1258+
tpcclussect['cmd'] = (digitmergerstr,'')[args.no_tpc_digitchunking] + task_finalizer(
1259+
[
1260+
'${O2_ROOT}/bin/o2-tpc-reco-workflow',
1261+
getDPL_global_options(bigshm=True),
1262+
'--input-type ' + ('digitizer','digits')[args.no_tpc_digitchunking],
1263+
'--output-type clusters,send-clusters-per-sector',
1264+
f'--tpc-native-cluster-writer \" --outfile tpc-native-clusters-part{(int)(s/sectorpertask)}.root\"',
1265+
f'--tpc-sectors {s}-{s+sectorpertask-1}',
1266+
putConfigValues(["GPU_global",
1267+
"GPU_proc_nn",
1268+
"TPCCorrMap",
1269+
"TPCGasParam"], {"GPU_proc.ompThreads" : 4}),
1270+
'--disable-mc' if args.no_mc_labels else None
1271+
], configname="tpcclusterizertask"
1272+
)
1273+
12591274
tpcclussect['env'] = { "OMP_NUM_THREADS" : "4" , "TBB_NUM_THREADS" : "4" }
12601275
tpcclussect['semaphore'] = "tpctriggers.root"
12611276
tpcclussect['retry_count'] = 2 # the task has a race condition --> makes sense to retry
@@ -1266,6 +1281,7 @@ def getDigiTaskName(det):
12661281
workflow['stages'].append(TPCCLUSMERGEtask)
12671282
tpcreconeeds.append(TPCCLUSMERGEtask['name'])
12681283
else:
1284+
# TODO: adapt this to the case above and merge code / avoid code duplication
12691285
tpcclus = createTask(name='tpccluster_' + str(tf), needs=tpcclusterneed, tf=tf, cwd=timeframeworkdir, lab=["RECO"], cpu=NWORKERS_TF, mem='2000')
12701286
tpcclus['cmd'] = '${O2_ROOT}/bin/o2-tpc-chunkeddigit-merger --tpc-lanes ' + str(NWORKERS_TF)
12711287
tpcclus['cmd'] += ' | ${O2_ROOT}/bin/o2-tpc-reco-workflow ' + getDPL_global_options() + ' --input-type digitizer --output-type clusters,send-clusters-per-sector ' + putConfigValues(["GPU_global","TPCGasParam","TPCCorrMap"],{"GPU_proc.ompThreads" : 1}) + ('',' --disable-mc')[args.no_mc_labels]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#NEV_TEST> 5
2+
[Diamond]
3+
width[2]=6.0
4+
5+
[GeneratorExternal]
6+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C
7+
funcName=generator_pythia8_ALICE3()
8+
9+
[GeneratorPythia8]
10+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/pythia8_PbPb_5360_VM2ll.cfg
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#NEV_TEST> 5
2+
[Diamond]
3+
width[2]=6.0
4+
5+
[GeneratorExternal]
6+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C
7+
funcName=generator_pythia8_ALICE3()
8+
9+
[GeneratorPythia8]
10+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/pythia8_pp_13600_VM2ll.cfg
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#NEV_TEST> 5
2+
[Diamond]
3+
width[2]=6.0
4+
5+
[GeneratorExternal]
6+
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/ALICE3/pythia8/generator_pythia8_ALICE3.C
7+
funcName=generator_pythia8_ALICE3()
8+
9+
[GeneratorPythia8]
10+
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGEM/pythia8/generator/pythia8_pp_5360_VM2ll.cfg
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
int External() {
2+
std::string path{"o2sim_Kine.root"};
3+
// Check that file exists, can be opened and has the correct tree
4+
TFile file(path.c_str(), "READ");
5+
if (file.IsZombie())
6+
{
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree *)file.Get("o2sim");
11+
if (!tree)
12+
{
13+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
14+
return 1;
15+
}
16+
std::vector<o2::MCTrack> *tracks{};
17+
tree->SetBranchAddress("MCTrack", &tracks);
18+
19+
// Check if all events are filled
20+
auto nEvents = tree->GetEntries();
21+
for (Long64_t i = 0; i < nEvents; ++i)
22+
{
23+
tree->GetEntry(i);
24+
if (tracks->empty())
25+
{
26+
std::cerr << "Empty entry found at event " << i << "\n";
27+
return 1;
28+
}
29+
}
30+
// check if each event has at least two oxygen ions
31+
for (int i = 0; i < nEvents; i++)
32+
{
33+
auto check = tree->GetEntry(i);
34+
int count = 0;
35+
for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
36+
{
37+
auto track = tracks->at(idxMCTrack);
38+
if (track.GetPdgCode() == 1000822080)
39+
{
40+
count++;
41+
}
42+
}
43+
if (count < 2)
44+
{
45+
std::cerr << "Event " << i << " has less than 2 lead ions\n";
46+
return 1;
47+
}
48+
}
49+
50+
return 0;
51+
}
52+
53+
int pythia8()
54+
{
55+
return External();
56+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
int External() {
2+
std::string path{"o2sim_Kine.root"};
3+
// Check that file exists, can be opened and has the correct tree
4+
TFile file(path.c_str(), "READ");
5+
if (file.IsZombie())
6+
{
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree *)file.Get("o2sim");
11+
if (!tree)
12+
{
13+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
14+
return 1;
15+
}
16+
std::vector<o2::MCTrack> *tracks{};
17+
tree->SetBranchAddress("MCTrack", &tracks);
18+
19+
// Check if all events are filled
20+
auto nEvents = tree->GetEntries();
21+
for (Long64_t i = 0; i < nEvents; ++i)
22+
{
23+
tree->GetEntry(i);
24+
if (tracks->empty())
25+
{
26+
std::cerr << "Empty entry found at event " << i << "\n";
27+
return 1;
28+
}
29+
}
30+
// // check if each event has at least two oxygen ions
31+
// for (int i = 0; i < nEvents; i++)
32+
// {
33+
// auto check = tree->GetEntry(i);
34+
// int count = 0;
35+
// for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
36+
// {
37+
// auto track = tracks->at(idxMCTrack);
38+
// if (track.GetPdgCode() == 1000080160)
39+
// {
40+
// count++;
41+
// }
42+
// }
43+
// if (count < 2)
44+
// {
45+
// std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
46+
// return 1;
47+
// }
48+
// }
49+
50+
return 0;
51+
}
52+
53+
int pythia8()
54+
{
55+
return External();
56+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
int External() {
2+
std::string path{"o2sim_Kine.root"};
3+
// Check that file exists, can be opened and has the correct tree
4+
TFile file(path.c_str(), "READ");
5+
if (file.IsZombie())
6+
{
7+
std::cerr << "Cannot open ROOT file " << path << "\n";
8+
return 1;
9+
}
10+
auto tree = (TTree *)file.Get("o2sim");
11+
if (!tree)
12+
{
13+
std::cerr << "Cannot find tree o2sim in file " << path << "\n";
14+
return 1;
15+
}
16+
std::vector<o2::MCTrack> *tracks{};
17+
tree->SetBranchAddress("MCTrack", &tracks);
18+
19+
// Check if all events are filled
20+
auto nEvents = tree->GetEntries();
21+
for (Long64_t i = 0; i < nEvents; ++i)
22+
{
23+
tree->GetEntry(i);
24+
if (tracks->empty())
25+
{
26+
std::cerr << "Empty entry found at event " << i << "\n";
27+
return 1;
28+
}
29+
}
30+
// // check if each event has at least two oxygen ions
31+
// for (int i = 0; i < nEvents; i++)
32+
// {
33+
// auto check = tree->GetEntry(i);
34+
// int count = 0;
35+
// for (int idxMCTrack = 0; idxMCTrack < tracks->size(); ++idxMCTrack)
36+
// {
37+
// auto track = tracks->at(idxMCTrack);
38+
// if (track.GetPdgCode() == 1000080160)
39+
// {
40+
// count++;
41+
// }
42+
// }
43+
// if (count < 2)
44+
// {
45+
// std::cerr << "Event " << i << " has less than 2 oxygen ions\n";
46+
// return 1;
47+
// }
48+
// }
49+
50+
return 0;
51+
}
52+
53+
int pythia8()
54+
{
55+
return External();
56+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### Specify beams
2+
Beams:idA = 1000822080
3+
Beams:idB = 1000822080
4+
Beams:eCM = 5360.0 ### energy
5+
6+
Beams:frameType = 1
7+
ParticleDecays:limitTau0 = on
8+
ParticleDecays:tau0Max = 10. ### match alice: 1cm/c = 10.0mm/c
9+
10+
### Initialize the Angantyr model to fit the total and semi-includive
11+
### cross sections in Pythia within some tolerance.
12+
HeavyIon:SigFitErr = 0.02,0.02,0.1,0.05,0.05,0.0,0.1,0.0
13+
14+
### These parameters are typicall suitable for sqrt(S_NN)=5TeV
15+
HeavyIon:SigFitDefPar = 17.24,2.15,0.33,0.0,0.0,0.0,0.0,0.0
16+
17+
Random:setSeed = on
18+
19+
# change omega, phi meson's BR below
20+
223:oneChannel = 1 0.5 0 -11 11
21+
223:addChannel = 1 0.5 0 -13 13
22+
333:oneChannel = 1 0.5 0 -11 11
23+
333:addChannel = 1 0.5 0 -13 13

0 commit comments

Comments
 (0)