Update RobustFluctuationObservables.cxx: optimized + new QA#5319
Merged
victor-gonzalez merged 6 commits intoAliceO2Group:masterfrom Mar 23, 2024
Merged
Update RobustFluctuationObservables.cxx: optimized + new QA#5319victor-gonzalez merged 6 commits intoAliceO2Group:masterfrom
victor-gonzalez merged 6 commits intoAliceO2Group:masterfrom
Conversation
Please consider the following formatting changes to AliceO2Group#5319
Please consider the following formatting changes to AliceO2Group#5319
Comment on lines
+706
to
+710
| cout << "QA: collBC = " << collBC << ", nITSROF_BC_offset = " << nITSROF_BC_offset | ||
| << ", ROF_BC_center = " << ROF_BC_center << ", nITSROF_BC_cutWidth = " << nITSROF_BC_cutWidth | ||
| << ", fabs(collBC - ROF_BC_center) = " << fabs(static_cast<int>(collBC) - ROF_BC_center) | ||
| << ", (int)collBC - ROF_BC_center = " << static_cast<int>(collBC) - ROF_BC_center | ||
| << endl; |
Collaborator
There was a problem hiding this comment.
For the next iteration, please, no cout nor endl
Use instead the O2 logging mechanism LOGF
Comment on lines
+793
to
+797
| // cout << "QA: nBinsMultFwd = " << nBinsMultFwd << ", nMaxMultFwd = " << nMaxMultFwd | ||
| // << ", nITSROF_BC_cutWidth = " << nITSROF_BC_cutWidth | ||
| // << ", nMaxCollIndex = " << nMaxCollIndex | ||
| // << endl; | ||
|
|
Collaborator
There was a problem hiding this comment.
Please, for the next iteration remember removing commented code
Comment on lines
+1143
to
+1181
| // ##### check how often we analyze collision in the same BC (and also the vZ difference) | ||
| if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { | ||
| // auto prevColl = collision - 1; | ||
|
|
||
| if (prevBC != 9999) //&& orbitInTF >= prevOrbit ) | ||
| { | ||
| int32_t diff = (int32_t)collBC - (int32_t)prevBC; | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous"), diff); | ||
| if (diff == 0) | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_vZvZ_2D"), vZ, prev_vZ); | ||
| } | ||
|
|
||
| // global found BC: | ||
| if (prevGlobalFoundBC != 9999) // 0) //&& orbitInTF >= prevOrbit ) | ||
| { | ||
| int32_t diff = (int32_t)globalFoundBC - (int32_t)prevGlobalFoundBC; | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC"), diff); | ||
|
|
||
| if (counterPVcontributorsAfterTPCcuts > 0) { | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_1goodVertContribTPC"), diff); | ||
| if (isFT0 && cutVzTrackT0diffLower < diff_PV_ft0_tracks && diff_PV_ft0_tracks < cutVzTrackT0diffUpper) // cm | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_1goodCont_FTvertexCut"), diff); | ||
| } | ||
|
|
||
| if (diff == 0) // QA vZ with prev_vZ correlations | ||
| { | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_vZvZ_2D_diff0"), vZ, prev_vZ); | ||
| if (counterPVcontributorsAfterTPCcuts > 0) { | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_1goodVertContribTPC_vZvZ_2D_diff0"), vZ, prev_vZ); | ||
| if (isFT0 && cutVzTrackT0diffLower < diff_PV_ft0_tracks && diff_PV_ft0_tracks < cutVzTrackT0diffUpper) // cm | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_1goodCont_FTvertexCut_vZvZ_2D_diff0"), vZ, prev_vZ); | ||
|
|
||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_mult_mult_2D_diff0"), nTracksAll, prev_mult); | ||
| histosEvent.fill(HIST("hBC_DIFF_to_previous_FOUND_BC_globTrkContrib_globTrkContrib_2D_diff0"), nTracksGlobalPVAccepted, prev_globTrkContrib); | ||
| } | ||
|
|
||
| fillHistForThisCut("NoTFborder_FoundBCwithDiff0", multNTracksPV, multTrk, nTracksGlobalAccepted, multT0A, multT0C, multV0A, t0cCentr); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
For readability I would suggest a consistent use of the curled brackets
My choice is
- shape
if (condition) {
...
} else {
...
}
- always use them, even for a single conditional line
But the important thing is being consistent in their use
Comment on lines
+1989
to
+1993
| // void processRobustFluctuationBunchCrossingQA(BCsWithRun3Matchings const& bcs, | ||
| // aod::Zdcs const& zdcs, | ||
| // aod::FV0As const&, | ||
| // aod::FT0s const&, | ||
| // aod::FDDs const&) |
Collaborator
There was a problem hiding this comment.
Remember not leaving commented code
victor-gonzalez
approved these changes
Mar 23, 2024
Collaborator
victor-gonzalez
left a comment
There was a problem hiding this comment.
I approve it but please have a look at my comments for the next iteration
christianreckziegel
pushed a commit
to christianreckziegel/O2Physics
that referenced
this pull request
May 2, 2024
…roup#5319) * Update RobustFluctuationObservables.cxx: optimized + new QA * Please consider the following formatting changes * Update RobustFluctuationObservables.cxx - implementing Mega L suggestions * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
hahassan7
pushed a commit
to hahassan7/O2Physics
that referenced
this pull request
May 17, 2024
…roup#5319) * Update RobustFluctuationObservables.cxx: optimized + new QA * Please consider the following formatting changes * Update RobustFluctuationObservables.cxx - implementing Mega L suggestions * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
new QA checks for FT0 vs track vertex, ITS ROF, etc.