Skip to content

Commit 4a216aa

Browse files
authored
Merge branch 'master' into hybridci
2 parents 18bd5d7 + 3bef31f commit 4a216aa

File tree

83 files changed

+673
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+673
-63
lines changed

MC/bin/o2dpg_sim_workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ def load_external_config(configfile):
295295
# function to finalize detector source lists based on activeDetectors
296296
# detector source lists are comma separated lists of DET1, DET2, DET1-DET2, ...
297297
def cleanDetectorInputList(inputlist):
298+
if inputlist == "all":
299+
return inputlist
298300
sources_list = inputlist.split(",")
299301
# Filter the sources
300302
filtered_sources = [

MC/bin/o2dpg_sim_workflow_anchored.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,21 @@ def retrieve_CTPScalers(ccdbreader, run_number, timestamp=None):
266266
return ctpscaler
267267
return None
268268

269+
def retrieve_ITS_RampDuration(ccdbreader, timestamp):
270+
"""
271+
Retrieves the ITS ramp-up duration for a given timestamp and
272+
returns it in milliseconds.
273+
ITS does not deliver digits during a certain ramp-up period so
274+
the start of run is adjusted accordingly using this value.
275+
"""
276+
_, ramp_duration = ccdbreader.fetch("ITS/Calib/RampDuration", "vector<float>", timestamp=timestamp)
277+
if ramp_duration and len(ramp_duration) > 0:
278+
# The vector contains the duration in seconds, convert to milliseconds
279+
duration_ms = int(ramp_duration[0] * 1000)
280+
return duration_ms
281+
print("WARNING: ITS ramp duration vector is empty, using 0")
282+
return 0
283+
269284
def retrieve_MinBias_CTPScaler_Rate(ctpscaler, finaltime, trig_eff_arg, NBunches, ColSystem, eCM):
270285
"""
271286
retrieves the CTP scalers object for a given timestamp
@@ -520,7 +535,11 @@ def main():
520535
run_start = GLOparams["SOR"]
521536
run_end = GLOparams["EOR"]
522537

523-
mid_run_timestamp = (run_start + run_end) // 2
538+
# Adjust start of run using ITS ramp-up period
539+
ITS_rampup = retrieve_ITS_RampDuration(ccdbreader, run_start)
540+
print(f"ITS ramp-up time: {ITS_rampup} ms")
541+
effective_run_start = run_start + ITS_rampup
542+
mid_run_timestamp = (effective_run_start + run_end) // 2
524543

525544
# --------
526545
# fetch other important global properties needed further below
@@ -580,16 +599,16 @@ def main():
580599
timestamp = 0
581600
prod_offset = 0
582601
if args.timeframeID != -1:
583-
timestamp = determine_timestamp_from_timeframeID(run_start, run_end, args.timeframeID, GLOparams["OrbitsPerTF"])
602+
timestamp = determine_timestamp_from_timeframeID(effective_run_start, run_end, args.timeframeID, GLOparams["OrbitsPerTF"])
584603
prod_offset = args.timeframeID
585604
else:
586-
timestamp, prod_offset = determine_timestamp(run_start, run_end, [args.split_id - 1, args.prod_split], args.cycle, args.tf, GLOparams["OrbitsPerTF"])
605+
timestamp, prod_offset = determine_timestamp(effective_run_start, run_end, [args.split_id - 1, args.prod_split], args.cycle, args.tf, GLOparams["OrbitsPerTF"])
587606

588607
# determine orbit corresponding to timestamp (mainly used in exclude_timestamp function)
589608
orbit = GLOparams["FirstOrbit"] + int((timestamp - GLOparams["SOR"]) / ( LHCOrbitMUS / 1000))
590609

591610
# this is anchored to
592-
print ("Determined start-of-run to be: ", run_start)
611+
print ("Determined start-of-run to be: ", effective_run_start)
593612
print ("Determined end-of-run to be: ", run_end)
594613
print ("Determined timestamp to be : ", timestamp)
595614
print ("Determined offset to be : ", prod_offset)
@@ -630,7 +649,7 @@ def main():
630649
# However, the last passed argument wins, so they would be overwritten. If this should not happen, the option
631650
# needs to be handled as further below:
632651
energyarg = (" -eCM " + str(eCM)) if A1 == A2 else (" -eA " + str(eA) + " -eB " + str(eB))
633-
forwardargs += " -tf " + str(args.tf) + " --sor " + str(run_start) + " --timestamp " + str(timestamp) + " --production-offset " + str(prod_offset) + " -run " + str(args.run_number) + " --run-anchored --first-orbit " \
652+
forwardargs += " -tf " + str(args.tf) + " --sor " + str(effective_run_start) + " --timestamp " + str(timestamp) + " --production-offset " + str(prod_offset) + " -run " + str(args.run_number) + " --run-anchored --first-orbit " \
634653
+ str(GLOparams["FirstOrbit"]) + " --orbitsPerTF " + str(GLOparams["OrbitsPerTF"]) + " -col " + str(ColSystem) + str(energyarg)
635654
# the following options can be overwritten/influence from the outside
636655
if not '--readoutDets' in forwardargs:

MC/config/ALICE3/ini/tests/pythia8_ArAr.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_KrKr.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_OO.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_PbPb.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_XeXe.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_pp.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int External() {
22
return 0;
33
}
44

5-
int Pythia8()
5+
int pythia8()
66
{
77
return External();
88
}

0 commit comments

Comments
 (0)