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

GLO: Change to TH1Ratio plot #2393

Merged
merged 2 commits into from
Aug 22, 2024
Merged

GLO: Change to TH1Ratio plot #2393

merged 2 commits into from
Aug 22, 2024

Conversation

f3sch
Copy link
Contributor

@f3sch f3sch commented Aug 21, 2024

Changes from TH1 to TH1Ratio to get a correct efficiency after the mergers. One question I have if after each endOfCycle also reset is called?

Tested with:

#!/usr/bin/env sh

GLOSET=" -b --shm-segment-size 4000000000 --hbfutils-config o2_tfidinfo.root,upstream --timeframes-rate-limit 1 --timeframes-rate-limit-ipcid 0 "
CONFIG="$ALIBUILD_WORK_DIR/../QualityControl/Modules/GLO/glo-itstpc-mtch-qcmn-test.json"

export IGNORE_VALIDITYCHECK_OF_CCDB_LOCALCACHE=1
export ALICEO2_CCDB_LOCALCACHE=$PWD/ccdb

o2-reader-driver-workflow --max-tf 2 $GLOSET | \
    o2-global-track-cluster-reader $GLOSET --disable-mc --track-types "ITS,TPC,ITS-TPC,ITS-TPC-TOF,TPC-TOF,TPC-TRD,ITS-TPC-TRD,TPC-TRD-TOF,ITS-TPC-TOF,ITS-TPC-TRD-TOF" --cluster-types "TPC,ITS" --primary-vertices --secondary-vertices | \
    o2-qc --full-chain --config json:///"$CONFIG" --timeframes-rate-limit 1 --timeframes-rate-limit-ipcid 0 -b --run | tee qc.log

Output on qcg-test:
image

Hopefully everything works now :)

Nota Bene: I added a manual calculation of binomial errors for the efficiency errors (which we might not care about) since TH1Ratio does not support it.

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
@chiarazampolli
Copy link
Contributor

Hello @f3sch ,

I think that yes, after an endOfCycle, the reset is called, see

void TaskRunner::stop()
{
try {
if (mCycleOn) {
mTask->endOfCycle();
mCycleNumber++;
mCycleOn = false;
}
endOfActivity();
mTask->reset();
} catch (...) {
// we catch here because we don't know where it will go in DPL's CallbackService
ILOG(Error, Support) << "Error caught in stop() : "
<< current_diagnostic(true) << ENDM;
throw;
}
}
, but better that @knopers8 and/or @Barthelemy confirm.

Chiara

@f3sch
Copy link
Contributor Author

f3sch commented Aug 21, 2024

@chiarazampolli super, thanks!

@knopers8
Copy link
Collaborator

One question I have if after each endOfCycle also reset is called?

Short answer - yes.
Long answer - it is called when running with Mergers in "delta" mode, which is the only reasonable to use with EPN.

The code that Chiara cited shows TaskRunner::stop(), this happens only at run stop, so it's irrelevant. This is where you can see the reset() after each cycle:

const Double_t e1 = ratio->getNum()->GetBinError(iBin), e1sq = e1 * e1;
const Double_t e2 = ratio->getDen()->GetBinError(iBin), e2sq = e2 * e2;
if (b1 != b2) {
ratio->SetBinError(iBin, TMath::Sqrt(TMath::Abs(((1. - 2. * b1 / b2) * e1sq + b1sq * e2sq / b2sq) / b2sq)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know what happens to the errors when two objects are merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah your right, when merged this would be done incorrectly... This should probably be done in the TH1Ratio::update under some flag. Which I guess I can do but do not know if I should?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's fine, but please do it in a separate PR and I will also ask Andrea to have a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, dropped it for now.

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
@knopers8 knopers8 enabled auto-merge (squash) August 22, 2024 07:56
@knopers8 knopers8 merged commit 3ce4ee2 into AliceO2Group:master Aug 22, 2024
7 checks passed
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