-
Notifications
You must be signed in to change notification settings - Fork 155
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
TPC: Add possibility to simulate distortions #1507
Conversation
REQUEST FOR PRODUCTION RELEASES:
This will add The following labels are available |
8daa79a
to
b145fc3
Compare
@chiarazampolli , @sawenzel , shall we go ahead with this? |
Hello @wiechula , |
@chiarazampolli , I didn't check the numbers in detail. But |
# in case of PbPb the conversion factor ZDC ->FT0 (pp) must be set | ||
tpc_corr_options_mc='' | ||
|
||
if tpcDistortionType == 0: # disable distortion corrections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In anchored simulations I think these configurations might clash with some we would derive from the anchoring and pass from the outside. I think to be discussed with @sawenzel as well.
rate = ctpscaler.getRateGivenT(finaltime, ctpclass, ctptype) | ||
#if ColSystem == "PbPb": | ||
# rate.first = rate.first / 28. | ||
# rate.second = rate.second / 28. | ||
|
||
print("Global rate " + str(rate.first) + " local rate " + str(rate.second)) | ||
scaler = None | ||
if rate.second >= 0: | ||
scaler = rate.second | ||
if rate.first >= 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chiarazampolli do you know why we would only return the final/corrected local rate if the global rate is rate.first >= 0
? I don't see it being used inside this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ciao @benedikt-voelkel ,
I don't know, I am not the author of this part of the code. But I guess that if rate.first
is 0, then also rate.second is 0. So it is ok to return none none
. Still I agree that it is not very clear.
Chiara
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it maybe added here: #1333?
Sorry for the delay. I'll take a look asap. |
tpcLocalCFreco['TPCCorrMap.lumiInstFactor'] = str(lumiInstFactor) | ||
tpc_corr_options_mc=' --corrmap-lumi-mode 2 ' | ||
tpcLocalCFreco['TPCCorrMap.lumiInst'] = str(CTPSCALER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not correspond to what was done for digitization.
Here, TPCCorrMap.lumiInst
and TPCCorrMap.lumiInstFactor
are set separately whereas for digitization TPCCorrMap.lumiInst
is set directly to the factor.
Is it because the configKey values are digested differently in reconstruction and digitization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the digizer does not use the lumiInstFactor https://github.com/AliceO2Group/AliceO2/blob/0129938292bf379849ec58652be5c1cfa88e60f1/Detectors/TPC/simulation/src/Digitizer.cxx#L227
While to correction map in reco does: https://github.com/AliceO2Group/AliceO2/blob/0129938292bf379849ec58652be5c1cfa88e60f1/Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx#L201
For reconstruction I wanted to mirror what is done in data. But I assume one could also directly multiply here, right @shahor02 ?
|
||
lumiInstFactor=1 | ||
if COLTYPE == 'PbPb': | ||
lumiInstFactor=2.414 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no other way to obtain this magic number from some central instance?
I have tested this PR and it works for run 544013 (in the range 544013 - 544126). There was slight glitch with From my point of view this can be merged. |
@chiarazampolli , the runs covered are 544013 - 544126, see O2-4531. |
Good, thanks! |
Co-authored-by: Sandro Wenzel <[email protected]>
Co-authored-by: Sandro Wenzel <[email protected]>
Co-authored-by: Sandro Wenzel <[email protected]> (cherry picked from commit 7188d08)
Requires adding
--tpc-distortion-type 2
in the anchorMC script toremainingargs
not done in this PR.