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

TRD: Check on Trigger and timeframe without tracklets #2011

Merged

Conversation

deependra170598
Copy link
Contributor

In this PR, BinContent of trackletsperevent and trackletspertimeframe at zeroth bin is observed and a warning as a text over the histogram is issue if there is any entry in the zeroth bin.

Also a check is applied on mean of trackletspertimeframe.

@deependra170598
Copy link
Contributor Author

Hi @martenole , May you review this PR?

@martenole
Copy link
Contributor

Hi @deependra170598 thanks. The code is pretty much the same in TrackletPerTriggerCheck as in TrackletsPerTimeFrame . Could you merge this into a single class to make it better maintainable? Whenever we have one plot, we also have the other. The thresholds should configured differently. Maybe we can have a single TrackletCountCheck class or so?

@deependra170598
Copy link
Contributor Author

Hi @martenole , May you review new check: Modules/TRD/src/TrackletCountCheck.cxx ? If it looks fine I will remove older checks on Tracklet per trigger and timeframe.

Copy link
Contributor

@martenole martenole left a comment

Choose a reason for hiding this comment

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

Ok, looks in general good I would say. Could you please remove the two obsolete classes in this PR?

Modules/TRD/include/TRD/TrackletCountCheck.h Outdated Show resolved Hide resolved
Modules/TRD/include/TRD/TrackletCountCheck.h Outdated Show resolved Hide resolved
Modules/TRD/src/TrackletCountCheck.cxx Outdated Show resolved Hide resolved
Modules/TRD/src/TrackletCountCheck.cxx Show resolved Hide resolved
Modules/TRD/src/TrackletCountCheck.cxx Outdated Show resolved Hide resolved
Modules/TRD/src/TrackletCountCheck.cxx Outdated Show resolved Hide resolved
@deependra170598 deependra170598 force-pushed the Trigger-Without-Tracklets branch from 2cf0b90 to 5ecd5dd Compare October 30, 2023 08:37
Modules/TRD/include/TRD/TrackletCountCheck.h Outdated Show resolved Hide resolved
continue;
}
// warning about statistics available
msg1 = std::make_shared<TPaveText>(0.3, 0.7, 0.7, 0.9, "NDC");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msg1 = std::make_shared<TPaveText>(0.3, 0.7, 0.7, 0.9, "NDC");
if (!msg1) {
msg1 = std::make_shared<TPaveText>(0.3, 0.7, 0.7, 0.9, "NDC");
msg1->SetTextSize(10);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this way, it is inserting each time a new line into the Message pad. To use your suggestion I have to use msg1.reset() before allocating memory so that the text box does not overflow. Am I correct 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.

Hi @martenole , May you review it again?

@martenole
Copy link
Contributor

Hi @deependra170598 I don't understand why you need to recreate a new TPaveText everytime. Couldn't you just call clear() on the text box and then add new text in case needed? Anyways, if you have tested it with your current implementation and it worked this is also fine with me. The CI failures don't seem to be related to your changes.

@martenole
Copy link
Contributor

After discussing with @deependra170598 it would be fine for me to merge it as is, if @Barthelemy and @knopers8 agree. Further improvements can be added later. In local tests done by Dependra the checks work as expected.

@Barthelemy Barthelemy merged commit eafbbd5 into AliceO2Group:master Nov 15, 2023
2 checks passed
@Barthelemy
Copy link
Collaborator

I agree, merged !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants