Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Anchor] Use STF and ETF #1597

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Conversation

benedikt-voelkel
Copy link
Contributor

Use BasicCCDBManager's getRunDuration to determine time range to be covered by simulation.

This will first try to get STF and ETF. If not available, the fallback chain is

  1. SOX and EOX
  2. SOR and EOR

Copy link

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2022-pp-apass4
async-2023-pbpb-apass
async-2023-pp-apass1
async-data
async-mc
async-2022-pp-apass6-2023-PbPb-apass2

Use BasicCCDBManager's getRunDuration to determine time range to be
covered by simulation.

This will first try to get STF and ETF. If not available, the fallback
chain is
1. SOX and EOX
1. SOR and EOR
print ("WARNING: Inconsistent EOR information on CCDB (divergence between GRPECS and RCT) ... will take RCT one")
EOR=rct["EOR"]
if run_start is not None:
print (f"INFO: GRPECS SOR ({SOR}) will be superseded by externally provided run start ({run_start})")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not anymore from GRPECS, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as seen by this function, the value from GRPECS will be overridden.
We can simply do that silently. Or make the output more clear that all the messages at this stage come from processing the GRPECS

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand, but isn't run_start and run_end from RCT? Why GRPECS is used at all to retrieve the SOR?

print (f"INFO: GRPECS SOR ({SOR}) will be superseded by externally provided run start ({run_start})")
SOR = run_start
if run_end is not None:
print (f"INFO: GRPECS EOR ({EOR}) will be superseded by externally provided run end ({run_end})")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

run_start = run_duration.first
run_end = run_duration.second

GLOparams = retrieve_params_fromGRPECS(ccdbreader, args.run_number, run_start=run_start, run_end=run_end)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed to pass run_start and run_end here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to override what would otherwise be deduced from GRPECS

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we simply not avoid to retrieve it from GRPECS now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get the orbit info from that. I asked @shahor02 specifically via email if we should stick to that method and as far as I understand, that should be the way. So we need to process GRPECS for that reason.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but you can avoid retrieving SOR and EOR, this is what I mean. They will not be consistent with RCT.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, that's fine with me. Let me update so that we will not use that info anymore. You are right, additional or somewhat redundant info should be omitted now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is what I meant.

@benedikt-voelkel
Copy link
Contributor Author

I see you comments @chiarazampolli and mostly, they seem to go in the direction of "what's printed might be confusing". Maybe there could be some START processing GRPECS and END processing GRPECS.
Or we simply make those steps silently and do not print anything about it to stdout.

@chiarazampolli
Copy link
Collaborator

Hello @benedikt-voelkel ,
What can be confusing is accessing GRPECS to retrieve start and stop, since now only RCT should be used, right? (apart from overriding, of course).
Chiara

Comment on lines -157 to -169
SOR=int(grp["mTimeStart"]) # in milliseconds
EOR=int(grp["mTimeEnd"])
# cross check with RCT if available
if rct != None:
# verify that the variaous sor_eor information are the same
if SOR != rct["SOR"]:
print ("WARNING: Inconsistent SOR information on CCDB (divergence between GRPECS and RCT) ... will take RCT one")
SOR=rct["SOR"]

if EOR != rct["EOR"]:
print ("WARNING: Inconsistent EOR information on CCDB (divergence between GRPECS and RCT) ... will take RCT one")
EOR=rct["EOR"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took all these things out. Now, simply the given run_start and run_end are used where needed.

@benedikt-voelkel
Copy link
Contributor Author

@chiarazampolli What do you think? Can we move on?
I left run_start and run_end for the now called def retrieve_params_fromGRPECS_and_OrbitReset function as they are needed for the orbit calculation in there.

@benedikt-voelkel benedikt-voelkel added async-2022-pp-apass4 async-2023-pbpb-apass4 Request porting to async-2023-pbpb-apass4 labels Apr 17, 2024
@sawenzel sawenzel merged commit 51b6c24 into AliceO2Group:master Apr 19, 2024
6 checks passed
@benedikt-voelkel benedikt-voelkel removed the async-2023-pbpb-apass4 Request porting to async-2023-pbpb-apass4 label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants