Skip to content

Conversation

@ddobrigk
Copy link
Contributor

This is Lucia's work to parametrize V0 and cascade masses in a more accurate way. Some final testing is still ongoing. Note also that, as before, parameters are hardcoded; it may pay off to make them settable so a minor commit to do that might still come later today. More soon...

Copy link
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

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

@ddobrigk thanks! Please see the comments below.
Why do you say the params are hardcoded? SVertexerParam is derived from the ConfigurableParam.

float getMargin(float pt) const
{
if( mPIDV0 == PID::XiMinus || mPIDV0 == PID::OmegaMinus) {
if( mPars[NSigmaM] * getSigmaCascade(pt) + mPars[MarginM] > 0.006 ) return mPars[NSigmaM] * 0.006;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use {}, even for one-liners.
Can we calculate getSigmaCascade only once?
Also, the SigmaCascade is used both for V0s and Cascades, which is somewhat misleading. Perhaps the name should be changed?
On top of that: the mPIDV0 == PID::Lambda will use getSigmaCascade but PID::AntiLambda will use ggetSigma. Not sure this is intended.
Finally, what is the difference in the final mass interval defined using getSigmaCascade vs tuned getSigma?
If this is just a few MeV, I would go for a simpler and faster pT resolution param.

Copy link

Choose a reason for hiding this comment

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

Actually, under PID::Lambda, also AntiLambda is included. the last case is left for HyperTriton and Hyperhydrog4 as I didn't want to change anything not valid for cascades or V0s.
I adjusted the names and added some comments, so after the new commit, it should be clear how it was meant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For the Lambda vs AntiLambda, indeed, confused it with HypV0:.., where these are different enums, sorry.

if( mPIDV0 == PID::XiMinus || mPIDV0 == PID::OmegaMinus) {
if( mPars[NSigmaM] * getSigmaCascade(pt) + mPars[MarginM] > 0.006 ) return mPars[NSigmaM] * 0.006;
return mPars[NSigmaM] * getSigmaCascade(pt) + mPars[MarginM];
}else if( mPIDV0 == PID::K0 || mPIDV0 == PID::Lambda ) return mPars[NSigmaM] * getSigmaCascade(pt) + mPars[MarginM];
Copy link
Collaborator

Choose a reason for hiding this comment

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

idem

float pidCutsLambda[SVertexHypothesis::NPIDParams] = {0., 20, 0., 1.09004e-03, 2.62291e-04, 8.93179e-03, 2.83121}; // Lambda
float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // HyperTriton
float pidCutsHhydrog4[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // Hyperhydrog4 - Need to update
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
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 normal to have 600 MeV margin on the photon (old setting)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a very good question but I did not touch it. I think the problem is that we currently apply logical OR to 7 types of mass hypotheses, so if one of them has very open cuts, the whole concept of windows will not be particularly helpful. I guess this is a question more to the PWG-EM conveners... Do we know where the 600 MeV/c2 comes from in the first place?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No but @f3sch is now studying conversions, perhaps he can extract realistic reconstructed mass range for photons

float pidCutsHTriton[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // HyperTriton
float pidCutsHhydrog4[SVertexHypothesis::NPIDParams] = {0.0025, 14, 0.07, 0.5, 0.0, 0.0, 0.0}; // Hyperhydrog4 - Need to update
float pidCutsPhoton[SVertexHypothesis::NPIDParams] = {0.001, 20, 0.60, 20, 0.60, 0.0, 0.0, 0.0, 0.0}; // Photon
float pidCutsK0[SVertexHypothesis::NPIDParams] = {0., 20, 0., 4.0, 0.0, 2.84798e-03, 9.84206e-04, 3.31951e-03, 2.39438}; // K0
Copy link
Collaborator

Choose a reason for hiding this comment

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

and not to have any margin on K0s?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current function has a minimum now, but we could add a margin of a couple of MeV/c2 if we feel like it (and it would not have a significant impact)... I think the 600 MeV/c2 is more worrisome, though :-)

if (mV0Hyps[ipid].check(p2Pos, p2Neg, p2V0, ptV0)) {
goodHyp = hypCheckStatus[ipid] = true;
}
if (mV0Hyps[ipid].checkTight(p2Pos, p2Neg, p2V0, ptV0)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume the "tight" check is always tighter than non-tight one, in this case, this check can go inside the if of non-tight one.
Also, why do you need to perform the tight check for anything but the Lambda and AntiLambda?
BTW, the 3-body also need tight selection, right? Also, currently it selects in a custom way

    if (massForLambdaHyp - mV0Hyps[ipid].getMassV0Hyp() < mV0Hyps[ipid].getMargin(ptV0)) {

Should not one use abs of the difference at the

if (massForLambdaHyp - mV0Hyps[ipid].getMassV0Hyp() < mV0Hyps[ipid].getMargin(ptV0)) {
, or, better mV0Hyps[ipid].checkTight(p2Pos, p2Neg, p2V0, ptV0) ?
Pinging to @fmazzasc and @mpuccio
Also, it is possible to use proper IDs instead of 2-4 at https://github.com/AliceO2Group/AliceO2/blob/9e3673d6e4c3edeae9a718600ff6132d288d824e/Detectors/Vertexing/src/SVertexer.cxx#L576C2-L576C33

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @shahor02, we need an asymmetric cut to cover the phase space of the 3-body decays. Hypernuclei do not decay in a Lambda but to Nucleus+p+pi. We can change the ids.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mpuccio @fmazzasc ok, thanks for checking

@shahor02
Copy link
Collaborator

Hi @ddobrigk
@davidrohr has compared the performance of this PR with the current mass validation version on 25kHz pbpb data.
To me the reduction of cascades is too strong:

Current selection

shahoian@alicrs02:~/Downloads$ grep 'strange tracks' sv0.log 
[2656164:secondary-vertexing]: [13:44:55][INFO] Found 380168 V0s, 3268892 cascades, 121875 3-body decays, 0 strange tracks. Timing: CPU: 278.14 Real: 11.4833 s
[2656164:secondary-vertexing]: [13:47:17][INFO] Found 377716 V0s, 3266316 cascades, 120432 3-body decays, 0 strange tracks. Timing: CPU: 421.99 Real: 11.212 s
[2656164:secondary-vertexing]: [13:48:06][INFO] Found 1027350 V0s, 16893633 cascades, 191060 3-body decays, 0 strange tracks. Timing: CPU: 1825.47 Real: 48.0864 s
[2656164:secondary-vertexing]: [13:48:31][INFO] Found 593069 V0s, 10863745 cascades, 152370 3-body decays, 0 strange tracks. Timing: CPU: 939.13 Real: 25.1205 s
[2656164:secondary-vertexing]: [13:48:56][INFO] Found 925954 V0s, 13250610 cascades, 240363 3-body decays, 0 strange tracks. Timing: CPU: 994.75 Real: 25.8171 s
[2656164:secondary-vertexing]: [13:49:21][INFO] Found 746878 V0s, 9346087 cascades, 214883 3-body decays, 0 strange tracks. Timing: CPU: 957.48 Real: 24.5402 s
[2656164:secondary-vertexing]: [13:50:02][INFO] Found 958278 V0s, 17381581 cascades, 258242 3-body decays, 0 strange tracks. Timing: CPU: 1601.25 Real: 41.1889 s
[2656164:secondary-vertexing]: [13:51:21][INFO] Found 1719290 V0s, 29001772 cascades, 256805 3-body decays, 0 strange tracks. Timing: CPU: 3071.3 Real: 78.4071 s
[2656164:secondary-vertexing]: [13:52:01][INFO] Found 1073049 V0s, 12315667 cascades, 260478 3-body decays, 0 strange tracks. Timing: CPU: 1599.24 Real: 40.8381 s
[2656164:secondary-vertexing]: [13:52:34][INFO] Found 933896 V0s, 10725893 cascades, 103165 3-body decays, 0 strange tracks. Timing: CPU: 1261.61 Real: 32.2567 s
[2656164:secondary-vertexing]: [13:53:07][INFO] Found 953385 V0s, 16929699 cascades, 313731 3-body decays, 0 strange tracks. Timing: CPU: 1286.16 Real: 32.9474 s
[2656164:secondary-vertexing]: [13:53:28][INFO] Found 599581 V0s, 7944977 cascades, 219717 3-body decays, 0 strange tracks. Timing: CPU: 831.85 Real: 21.485 s
[2656164:secondary-vertexing]: [13:54:13][INFO] Found 1232085 V0s, 16714986 cascades, 190138 3-body decays, 0 strange tracks. Timing: CPU: 1766.55 Real: 45.2307 s
[2656164:secondary-vertexing]: [13:55:49][INFO] Found 2354854 V0s, 46218988 cascades, 350294 3-body decays, 0 strange tracks. Timing: CPU: 3704.31 Real: 95.2266 s
[2656164:secondary-vertexing]: [13:56:15][INFO] Found 842509 V0s, 14574387 cascades, 240984 3-body decays, 0 strange tracks. Timing: CPU: 1016.42 Real: 26.1359 s
[2656164:secondary-vertexing]: [13:56:27][INFO] Found 513109 V0s, 6078201 cascades, 185116 3-body decays, 0 strange tracks. Timing: CPU: 471.93 Real: 12.1472 s
[2656164:secondary-vertexing]: [13:56:53][INFO] Found 695464 V0s, 10456996 cascades, 199036 3-body decays, 0 strange tracks. Timing: CPU: 1011.46 Real: 25.9277 s
[2656164:secondary-vertexing]: [13:57:11][INFO] Found 560730 V0s, 6027929 cascades, 56531 3-body decays, 0 strange tracks. Timing: CPU: 715.46 Real: 18.2371 s
[2656164:secondary-vertexing]: [13:58:28][INFO] Found 1662181 V0s, 29843309 cascades, 215666 3-body decays, 0 strange tracks. Timing: CPU: 3032.32 Real: 77.3317 s
[2656164:secondary-vertexing]: [13:58:53][INFO] Found 752433 V0s, 10074706 cascades, 220399 3-body decays, 0 strange tracks. Timing: CPU: 962.48 Real: 24.6174 s
[2656164:secondary-vertexing]: [13:59:28][INFO] Found 1087919 V0s, 19958251 cascades, 207563 3-body decays, 0 strange tracks. Timing: CPU: 1366.82 Real: 35.1748 s
[2656164:secondary-vertexing]: [13:59:53][INFO] Found 845448 V0s, 14173403 cascades, 183649 3-body decays, 0 strange tracks. Timing: CPU: 944.24 Real: 24.4718 s
[2656164:secondary-vertexing]: [14:00:49][INFO] Found 1065565 V0s, 24210602 cascades, 207734 3-body decays, 0 strange tracks. Timing: CPU: 2193.51 Real: 55.954 s
[2656164:secondary-vertexing]: [14:00:59][INFO] Found 457320 V0s, 4976456 cascades, 134697 3-body decays, 0 strange tracks. Timing: CPU: 391.36 Real: 10.0857 s
[2656164:secondary-vertexing]: [14:02:02][INFO] Found 1482966 V0s, 27114167 cascades, 214857 3-body decays, 0 strange tracks. Timing: CPU: 2462.25 Real: 62.972 s
[2656164:secondary-vertexing]: [14:02:22][INFO] Found 640716 V0s, 6515766 cascades, 138581 3-body decays, 0 strange tracks. Timing: CPU: 768.97 Real: 19.882 s
[2656164:secondary-vertexing]: [14:02:46][INFO] Found 870124 V0s, 10669274 cascades, 194755 3-body decays, 0 strange tracks. Timing: CPU: 931.69 Real: 24.0609 s
[2656164:secondary-vertexing]: [14:02:54][INFO] Found 395179 V0s, 3863638 cascades, 130647 3-body decays, 0 strange tracks. Timing: CPU: 319.56 Real: 8.23112 s
[2656164:secondary-vertexing]: [14:03:16][INFO] Found 764119 V0s, 9109674 cascades, 196687 3-body decays, 0 strange tracks. Timing: CPU: 854.02 Real: 21.8797 s
[2656164:secondary-vertexing]: [14:03:55][INFO] Found 1072526 V0s, 14374030 cascades, 170800 3-body decays, 0 strange tracks. Timing: CPU: 1524.31 Real: 38.992 s
[2656164:secondary-vertexing]: [14:04:16][INFO] Found 775485 V0s, 9702760 cascades, 152037 3-body decays, 0 strange tracks. Timing: CPU: 840.7 Real: 21.6295 s
[2656164:secondary-vertexing]: [14:04:21][INFO] Found 261797 V0s, 2033536 cascades, 77800 3-body decays, 0 strange tracks. Timing: CPU: 185.01 Real: 4.79786 s
[2656164:secondary-vertexing]: [14:04:35][INFO] Found 519552 V0s, 5520688 cascades, 117460 3-body decays, 0 strange tracks. Timing: CPU: 535.22 Real: 13.7109 s
[2656164:secondary-vertexing]: [14:04:43][INFO] Found 302304 V0s, 3405950 cascades, 90911 3-body decays, 0 strange tracks. Timing: CPU: 329.36 Real: 8.59948 s
[2656164:secondary-vertexing]: [14:05:20][INFO] Found 1173911 V0s, 13883810 cascades, 217732 3-body decays, 0 strange tracks. Timing: CPU: 1402.97 Real: 36.0476 s
[2656164:secondary-vertexing]: [14:06:01][INFO] Found 1041008 V0s, 19456413 cascades, 103106 3-body decays, 0 strange tracks. Timing: CPU: 1622.63 Real: 41.8946 s
[2656164:secondary-vertexing]: [14:06:25][INFO] Found 850422 V0s, 13994052 cascades, 248028 3-body decays, 0 strange tracks. Timing: CPU: 903.14 Real: 23.4953 s
[2656164:secondary-vertexing]: [14:06:50][INFO] Found 621955 V0s, 13004107 cascades, 116928 3-body decays, 0 strange tracks. Timing: CPU: 982.07 Real: 25.2074 s

With this PR:

shahoian@alicrs02:~/Downloads$ grep 'strange tracks' sv1.log 
[2686391:secondary-vertexing]: [14:56:30][INFO] Found 98059 V0s, 1 cascades, 94294 3-body decays, 0 strange tracks. Timing: CPU: 173.21 Real: 7.68342 s
[2686391:secondary-vertexing]: [14:58:44][INFO] Found 107381 V0s, 0 cascades, 93875 3-body decays, 0 strange tracks. Timing: CPU: 282.77 Real: 7.4255 s
[2686391:secondary-vertexing]: [14:59:19][INFO] Found 283986 V0s, 7 cascades, 152382 3-body decays, 0 strange tracks. Timing: CPU: 1324.85 Real: 34.9998 s
[2686391:secondary-vertexing]: [14:59:38][INFO] Found 162785 V0s, 0 cascades, 120856 3-body decays, 0 strange tracks. Timing: CPU: 708.27 Real: 19.431 s
[2686391:secondary-vertexing]: [14:59:59][INFO] Found 225825 V0s, 2 cascades, 192982 3-body decays, 0 strange tracks. Timing: CPU: 746.25 Real: 20.3846 s
[2686391:secondary-vertexing]: [15:00:19][INFO] Found 195522 V0s, 1 cascades, 169358 3-body decays, 0 strange tracks. Timing: CPU: 764.4 Real: 20.2724 s
[2686391:secondary-vertexing]: [15:00:48][INFO] Found 218031 V0s, 3 cascades, 196191 3-body decays, 0 strange tracks. Timing: CPU: 1154.2 Real: 29.1272 s
[2686391:secondary-vertexing]: [15:01:45][INFO] Found 364919 V0s, 5 cascades, 203633 3-body decays, 0 strange tracks. Timing: CPU: 2270.85 Real: 57.2427 s
[2686391:secondary-vertexing]: [15:02:15][INFO] Found 279807 V0s, 3 cascades, 205031 3-body decays, 0 strange tracks. Timing: CPU: 1164.07 Real: 29.42 s
[2686391:secondary-vertexing]: [15:02:39][INFO] Found 225297 V0s, 6 cascades, 80848 3-body decays, 0 strange tracks. Timing: CPU: 950.98 Real: 24.0352 s
[2686391:secondary-vertexing]: [15:03:02][INFO] Found 272693 V0s, 2 cascades, 248908 3-body decays, 0 strange tracks. Timing: CPU: 931.59 Real: 23.5129 s
[2686391:secondary-vertexing]: [15:03:17][INFO] Found 147172 V0s, 2 cascades, 176832 3-body decays, 0 strange tracks. Timing: CPU: 565.62 Real: 14.3294 s
[2686391:secondary-vertexing]: [15:03:48][INFO] Found 289382 V0s, 3 cascades, 151648 3-body decays, 0 strange tracks. Timing: CPU: 1255.93 Real: 31.7059 s
[2686391:secondary-vertexing]: [15:04:57][INFO] Found 482502 V0s, 17 cascades, 277565 3-body decays, 0 strange tracks. Timing: CPU: 2716 Real: 69.001 s
[2686391:secondary-vertexing]: [15:05:15][INFO] Found 234493 V0s, 3 cascades, 189174 3-body decays, 0 strange tracks. Timing: CPU: 703.35 Real: 17.7995 s
[2686391:secondary-vertexing]: [15:05:23][INFO] Found 139424 V0s, 0 cascades, 145320 3-body decays, 0 strange tracks. Timing: CPU: 310.66 Real: 7.88107 s
[2686391:secondary-vertexing]: [15:05:40][INFO] Found 186626 V0s, 3 cascades, 153884 3-body decays, 0 strange tracks. Timing: CPU: 687.46 Real: 17.4734 s
[2686391:secondary-vertexing]: [15:06:36][INFO] Found 369325 V0s, 5 cascades, 169753 3-body decays, 0 strange tracks. Timing: CPU: 2194.57 Real: 55.2309 s
[2686391:secondary-vertexing]: [15:06:49][INFO] Found 134001 V0s, 3 cascades, 44905 3-body decays, 0 strange tracks. Timing: CPU: 513.17 Real: 12.9813 s
[2686391:secondary-vertexing]: [15:07:05][INFO] Found 215048 V0s, 1 cascades, 177077 3-body decays, 0 strange tracks. Timing: CPU: 637.42 Real: 16.1258 s
[2686391:secondary-vertexing]: [15:07:28][INFO] Found 240183 V0s, 4 cascades, 164903 3-body decays, 0 strange tracks. Timing: CPU: 935.87 Real: 23.6056 s
[2686391:secondary-vertexing]: [15:08:08][INFO] Found 293346 V0s, 4 cascades, 165839 3-body decays, 0 strange tracks. Timing: CPU: 1576.2 Real: 39.7528 s
[2686391:secondary-vertexing]: [15:08:25][INFO] Found 231596 V0s, 2 cascades, 146076 3-body decays, 0 strange tracks. Timing: CPU: 652.87 Real: 16.671 s
[2686391:secondary-vertexing]: [15:08:31][INFO] Found 123069 V0s, 0 cascades, 108783 3-body decays, 0 strange tracks. Timing: CPU: 259.4 Real: 6.5798 s
[2686391:secondary-vertexing]: [15:09:15][INFO] Found 299718 V0s, 5 cascades, 161371 3-body decays, 0 strange tracks. Timing: CPU: 1738.12 Real: 43.7764 s
[2686391:secondary-vertexing]: [15:09:29][INFO] Found 142286 V0s, 2 cascades, 110073 3-body decays, 0 strange tracks. Timing: CPU: 530.35 Real: 13.6587 s
[2686391:secondary-vertexing]: [15:09:46][INFO] Found 214011 V0s, 2 cascades, 153594 3-body decays, 0 strange tracks. Timing: CPU: 664.92 Real: 16.9983 s
[2686391:secondary-vertexing]: [15:09:51][INFO] Found 118563 V0s, 1 cascades, 102649 3-body decays, 0 strange tracks. Timing: CPU: 218.11 Real: 5.55767 s
[2686391:secondary-vertexing]: [15:10:07][INFO] Found 201325 V0s, 1 cascades, 156443 3-body decays, 0 strange tracks. Timing: CPU: 606.5 Real: 15.3142 s
[2686391:secondary-vertexing]: [15:10:35][INFO] Found 224307 V0s, 2 cascades, 135556 3-body decays, 0 strange tracks. Timing: CPU: 1099.6 Real: 27.8317 s
[2686391:secondary-vertexing]: [15:10:50][INFO] Found 181359 V0s, 1 cascades, 122538 3-body decays, 0 strange tracks. Timing: CPU: 609.02 Real: 15.4165 s
[2686391:secondary-vertexing]: [15:10:53][INFO] Found 72790 V0s, 1 cascades, 61561 3-body decays, 0 strange tracks. Timing: CPU: 122.44 Real: 3.14255 s
[2686391:secondary-vertexing]: [15:11:03][INFO] Found 130822 V0s, 1 cascades, 93604 3-body decays, 0 strange tracks. Timing: CPU: 377.17 Real: 9.55567 s
[2686391:secondary-vertexing]: [15:11:08][INFO] Found 91134 V0s, 1 cascades, 70711 3-body decays, 0 strange tracks. Timing: CPU: 229.59 Real: 5.85402 s
[2686391:secondary-vertexing]: [15:11:34][INFO] Found 265628 V0s, 3 cascades, 173324 3-body decays, 0 strange tracks. Timing: CPU: 1003.28 Real: 25.4538 s
[2686391:secondary-vertexing]: [15:12:06][INFO] Found 185130 V0s, 5 cascades, 80256 3-body decays, 0 strange tracks. Timing: CPU: 1260.29 Real: 31.9637 s
[2686391:secondary-vertexing]: [15:12:21][INFO] Found 205781 V0s, 2 cascades, 201529 3-body decays, 0 strange tracks. Timing: CPU: 607.87 Real: 15.4385 s
[2686391:secondary-vertexing]: [15:12:40][INFO] Found 176657 V0s, 3 cascades, 93401 3-body decays, 0 strange tracks. Timing: CPU: 736.16 Real: 18.6499 s

I see that the expected Lambda width with new parametrization is 1.8MeV above 1 GeV, isn't just 4 sigma cut too tight?

@fmazzasc
Copy link
Contributor

fmazzasc commented Oct 27, 2023

Hi @ddobrigk @davidrohr has compared the performance of this PR with the current mass validation version on 25kHz pbpb data. To me the reduction of cascades is too strong:

Current selection

shahoian@alicrs02:~/Downloads$ grep 'strange tracks' sv0.log 
[2656164:secondary-vertexing]: [13:44:55][INFO] Found 380168 V0s, 3268892 cascades, 121875 3-body decays, 0 strange tracks. Timing: CPU: 278.14 Real: 11.4833 s
[2656164:secondary-vertexing]: [13:47:17][INFO] Found 377716 V0s, 3266316 cascades, 120432 3-body decays, 0 strange tracks. Timing: CPU: 421.99 Real: 11.212 s
[2656164:secondary-vertexing]: [13:48:06][INFO] Found 1027350 V0s, 16893633 cascades, 191060 3-body decays, 0 strange tracks. Timing: CPU: 1825.47 Real: 48.0864 s
[2656164:secondary-vertexing]: [13:48:31][INFO] Found 593069 V0s, 10863745 cascades, 152370 3-body decays, 0 strange tracks. Timing: CPU: 939.13 Real: 25.1205 s
[2656164:secondary-vertexing]: [13:48:56][INFO] Found 925954 V0s, 13250610 cascades, 240363 3-body decays, 0 strange tracks. Timing: CPU: 994.75 Real: 25.8171 s
[2656164:secondary-vertexing]: [13:49:21][INFO] Found 746878 V0s, 9346087 cascades, 214883 3-body decays, 0 strange tracks. Timing: CPU: 957.48 Real: 24.5402 s
[2656164:secondary-vertexing]: [13:50:02][INFO] Found 958278 V0s, 17381581 cascades, 258242 3-body decays, 0 strange tracks. Timing: CPU: 1601.25 Real: 41.1889 s
[2656164:secondary-vertexing]: [13:51:21][INFO] Found 1719290 V0s, 29001772 cascades, 256805 3-body decays, 0 strange tracks. Timing: CPU: 3071.3 Real: 78.4071 s
[2656164:secondary-vertexing]: [13:52:01][INFO] Found 1073049 V0s, 12315667 cascades, 260478 3-body decays, 0 strange tracks. Timing: CPU: 1599.24 Real: 40.8381 s
[2656164:secondary-vertexing]: [13:52:34][INFO] Found 933896 V0s, 10725893 cascades, 103165 3-body decays, 0 strange tracks. Timing: CPU: 1261.61 Real: 32.2567 s
[2656164:secondary-vertexing]: [13:53:07][INFO] Found 953385 V0s, 16929699 cascades, 313731 3-body decays, 0 strange tracks. Timing: CPU: 1286.16 Real: 32.9474 s
[2656164:secondary-vertexing]: [13:53:28][INFO] Found 599581 V0s, 7944977 cascades, 219717 3-body decays, 0 strange tracks. Timing: CPU: 831.85 Real: 21.485 s
[2656164:secondary-vertexing]: [13:54:13][INFO] Found 1232085 V0s, 16714986 cascades, 190138 3-body decays, 0 strange tracks. Timing: CPU: 1766.55 Real: 45.2307 s
[2656164:secondary-vertexing]: [13:55:49][INFO] Found 2354854 V0s, 46218988 cascades, 350294 3-body decays, 0 strange tracks. Timing: CPU: 3704.31 Real: 95.2266 s
[2656164:secondary-vertexing]: [13:56:15][INFO] Found 842509 V0s, 14574387 cascades, 240984 3-body decays, 0 strange tracks. Timing: CPU: 1016.42 Real: 26.1359 s
[2656164:secondary-vertexing]: [13:56:27][INFO] Found 513109 V0s, 6078201 cascades, 185116 3-body decays, 0 strange tracks. Timing: CPU: 471.93 Real: 12.1472 s
[2656164:secondary-vertexing]: [13:56:53][INFO] Found 695464 V0s, 10456996 cascades, 199036 3-body decays, 0 strange tracks. Timing: CPU: 1011.46 Real: 25.9277 s
[2656164:secondary-vertexing]: [13:57:11][INFO] Found 560730 V0s, 6027929 cascades, 56531 3-body decays, 0 strange tracks. Timing: CPU: 715.46 Real: 18.2371 s
[2656164:secondary-vertexing]: [13:58:28][INFO] Found 1662181 V0s, 29843309 cascades, 215666 3-body decays, 0 strange tracks. Timing: CPU: 3032.32 Real: 77.3317 s
[2656164:secondary-vertexing]: [13:58:53][INFO] Found 752433 V0s, 10074706 cascades, 220399 3-body decays, 0 strange tracks. Timing: CPU: 962.48 Real: 24.6174 s
[2656164:secondary-vertexing]: [13:59:28][INFO] Found 1087919 V0s, 19958251 cascades, 207563 3-body decays, 0 strange tracks. Timing: CPU: 1366.82 Real: 35.1748 s
[2656164:secondary-vertexing]: [13:59:53][INFO] Found 845448 V0s, 14173403 cascades, 183649 3-body decays, 0 strange tracks. Timing: CPU: 944.24 Real: 24.4718 s
[2656164:secondary-vertexing]: [14:00:49][INFO] Found 1065565 V0s, 24210602 cascades, 207734 3-body decays, 0 strange tracks. Timing: CPU: 2193.51 Real: 55.954 s
[2656164:secondary-vertexing]: [14:00:59][INFO] Found 457320 V0s, 4976456 cascades, 134697 3-body decays, 0 strange tracks. Timing: CPU: 391.36 Real: 10.0857 s
[2656164:secondary-vertexing]: [14:02:02][INFO] Found 1482966 V0s, 27114167 cascades, 214857 3-body decays, 0 strange tracks. Timing: CPU: 2462.25 Real: 62.972 s
[2656164:secondary-vertexing]: [14:02:22][INFO] Found 640716 V0s, 6515766 cascades, 138581 3-body decays, 0 strange tracks. Timing: CPU: 768.97 Real: 19.882 s
[2656164:secondary-vertexing]: [14:02:46][INFO] Found 870124 V0s, 10669274 cascades, 194755 3-body decays, 0 strange tracks. Timing: CPU: 931.69 Real: 24.0609 s
[2656164:secondary-vertexing]: [14:02:54][INFO] Found 395179 V0s, 3863638 cascades, 130647 3-body decays, 0 strange tracks. Timing: CPU: 319.56 Real: 8.23112 s
[2656164:secondary-vertexing]: [14:03:16][INFO] Found 764119 V0s, 9109674 cascades, 196687 3-body decays, 0 strange tracks. Timing: CPU: 854.02 Real: 21.8797 s
[2656164:secondary-vertexing]: [14:03:55][INFO] Found 1072526 V0s, 14374030 cascades, 170800 3-body decays, 0 strange tracks. Timing: CPU: 1524.31 Real: 38.992 s
[2656164:secondary-vertexing]: [14:04:16][INFO] Found 775485 V0s, 9702760 cascades, 152037 3-body decays, 0 strange tracks. Timing: CPU: 840.7 Real: 21.6295 s
[2656164:secondary-vertexing]: [14:04:21][INFO] Found 261797 V0s, 2033536 cascades, 77800 3-body decays, 0 strange tracks. Timing: CPU: 185.01 Real: 4.79786 s
[2656164:secondary-vertexing]: [14:04:35][INFO] Found 519552 V0s, 5520688 cascades, 117460 3-body decays, 0 strange tracks. Timing: CPU: 535.22 Real: 13.7109 s
[2656164:secondary-vertexing]: [14:04:43][INFO] Found 302304 V0s, 3405950 cascades, 90911 3-body decays, 0 strange tracks. Timing: CPU: 329.36 Real: 8.59948 s
[2656164:secondary-vertexing]: [14:05:20][INFO] Found 1173911 V0s, 13883810 cascades, 217732 3-body decays, 0 strange tracks. Timing: CPU: 1402.97 Real: 36.0476 s
[2656164:secondary-vertexing]: [14:06:01][INFO] Found 1041008 V0s, 19456413 cascades, 103106 3-body decays, 0 strange tracks. Timing: CPU: 1622.63 Real: 41.8946 s
[2656164:secondary-vertexing]: [14:06:25][INFO] Found 850422 V0s, 13994052 cascades, 248028 3-body decays, 0 strange tracks. Timing: CPU: 903.14 Real: 23.4953 s
[2656164:secondary-vertexing]: [14:06:50][INFO] Found 621955 V0s, 13004107 cascades, 116928 3-body decays, 0 strange tracks. Timing: CPU: 982.07 Real: 25.2074 s

With this PR:

shahoian@alicrs02:~/Downloads$ grep 'strange tracks' sv1.log 
[2686391:secondary-vertexing]: [14:56:30][INFO] Found 98059 V0s, 1 cascades, 94294 3-body decays, 0 strange tracks. Timing: CPU: 173.21 Real: 7.68342 s
[2686391:secondary-vertexing]: [14:58:44][INFO] Found 107381 V0s, 0 cascades, 93875 3-body decays, 0 strange tracks. Timing: CPU: 282.77 Real: 7.4255 s
[2686391:secondary-vertexing]: [14:59:19][INFO] Found 283986 V0s, 7 cascades, 152382 3-body decays, 0 strange tracks. Timing: CPU: 1324.85 Real: 34.9998 s
[2686391:secondary-vertexing]: [14:59:38][INFO] Found 162785 V0s, 0 cascades, 120856 3-body decays, 0 strange tracks. Timing: CPU: 708.27 Real: 19.431 s
[2686391:secondary-vertexing]: [14:59:59][INFO] Found 225825 V0s, 2 cascades, 192982 3-body decays, 0 strange tracks. Timing: CPU: 746.25 Real: 20.3846 s
[2686391:secondary-vertexing]: [15:00:19][INFO] Found 195522 V0s, 1 cascades, 169358 3-body decays, 0 strange tracks. Timing: CPU: 764.4 Real: 20.2724 s
[2686391:secondary-vertexing]: [15:00:48][INFO] Found 218031 V0s, 3 cascades, 196191 3-body decays, 0 strange tracks. Timing: CPU: 1154.2 Real: 29.1272 s
[2686391:secondary-vertexing]: [15:01:45][INFO] Found 364919 V0s, 5 cascades, 203633 3-body decays, 0 strange tracks. Timing: CPU: 2270.85 Real: 57.2427 s
[2686391:secondary-vertexing]: [15:02:15][INFO] Found 279807 V0s, 3 cascades, 205031 3-body decays, 0 strange tracks. Timing: CPU: 1164.07 Real: 29.42 s
[2686391:secondary-vertexing]: [15:02:39][INFO] Found 225297 V0s, 6 cascades, 80848 3-body decays, 0 strange tracks. Timing: CPU: 950.98 Real: 24.0352 s
[2686391:secondary-vertexing]: [15:03:02][INFO] Found 272693 V0s, 2 cascades, 248908 3-body decays, 0 strange tracks. Timing: CPU: 931.59 Real: 23.5129 s
[2686391:secondary-vertexing]: [15:03:17][INFO] Found 147172 V0s, 2 cascades, 176832 3-body decays, 0 strange tracks. Timing: CPU: 565.62 Real: 14.3294 s
[2686391:secondary-vertexing]: [15:03:48][INFO] Found 289382 V0s, 3 cascades, 151648 3-body decays, 0 strange tracks. Timing: CPU: 1255.93 Real: 31.7059 s
[2686391:secondary-vertexing]: [15:04:57][INFO] Found 482502 V0s, 17 cascades, 277565 3-body decays, 0 strange tracks. Timing: CPU: 2716 Real: 69.001 s
[2686391:secondary-vertexing]: [15:05:15][INFO] Found 234493 V0s, 3 cascades, 189174 3-body decays, 0 strange tracks. Timing: CPU: 703.35 Real: 17.7995 s
[2686391:secondary-vertexing]: [15:05:23][INFO] Found 139424 V0s, 0 cascades, 145320 3-body decays, 0 strange tracks. Timing: CPU: 310.66 Real: 7.88107 s
[2686391:secondary-vertexing]: [15:05:40][INFO] Found 186626 V0s, 3 cascades, 153884 3-body decays, 0 strange tracks. Timing: CPU: 687.46 Real: 17.4734 s
[2686391:secondary-vertexing]: [15:06:36][INFO] Found 369325 V0s, 5 cascades, 169753 3-body decays, 0 strange tracks. Timing: CPU: 2194.57 Real: 55.2309 s
[2686391:secondary-vertexing]: [15:06:49][INFO] Found 134001 V0s, 3 cascades, 44905 3-body decays, 0 strange tracks. Timing: CPU: 513.17 Real: 12.9813 s
[2686391:secondary-vertexing]: [15:07:05][INFO] Found 215048 V0s, 1 cascades, 177077 3-body decays, 0 strange tracks. Timing: CPU: 637.42 Real: 16.1258 s
[2686391:secondary-vertexing]: [15:07:28][INFO] Found 240183 V0s, 4 cascades, 164903 3-body decays, 0 strange tracks. Timing: CPU: 935.87 Real: 23.6056 s
[2686391:secondary-vertexing]: [15:08:08][INFO] Found 293346 V0s, 4 cascades, 165839 3-body decays, 0 strange tracks. Timing: CPU: 1576.2 Real: 39.7528 s
[2686391:secondary-vertexing]: [15:08:25][INFO] Found 231596 V0s, 2 cascades, 146076 3-body decays, 0 strange tracks. Timing: CPU: 652.87 Real: 16.671 s
[2686391:secondary-vertexing]: [15:08:31][INFO] Found 123069 V0s, 0 cascades, 108783 3-body decays, 0 strange tracks. Timing: CPU: 259.4 Real: 6.5798 s
[2686391:secondary-vertexing]: [15:09:15][INFO] Found 299718 V0s, 5 cascades, 161371 3-body decays, 0 strange tracks. Timing: CPU: 1738.12 Real: 43.7764 s
[2686391:secondary-vertexing]: [15:09:29][INFO] Found 142286 V0s, 2 cascades, 110073 3-body decays, 0 strange tracks. Timing: CPU: 530.35 Real: 13.6587 s
[2686391:secondary-vertexing]: [15:09:46][INFO] Found 214011 V0s, 2 cascades, 153594 3-body decays, 0 strange tracks. Timing: CPU: 664.92 Real: 16.9983 s
[2686391:secondary-vertexing]: [15:09:51][INFO] Found 118563 V0s, 1 cascades, 102649 3-body decays, 0 strange tracks. Timing: CPU: 218.11 Real: 5.55767 s
[2686391:secondary-vertexing]: [15:10:07][INFO] Found 201325 V0s, 1 cascades, 156443 3-body decays, 0 strange tracks. Timing: CPU: 606.5 Real: 15.3142 s
[2686391:secondary-vertexing]: [15:10:35][INFO] Found 224307 V0s, 2 cascades, 135556 3-body decays, 0 strange tracks. Timing: CPU: 1099.6 Real: 27.8317 s
[2686391:secondary-vertexing]: [15:10:50][INFO] Found 181359 V0s, 1 cascades, 122538 3-body decays, 0 strange tracks. Timing: CPU: 609.02 Real: 15.4165 s
[2686391:secondary-vertexing]: [15:10:53][INFO] Found 72790 V0s, 1 cascades, 61561 3-body decays, 0 strange tracks. Timing: CPU: 122.44 Real: 3.14255 s
[2686391:secondary-vertexing]: [15:11:03][INFO] Found 130822 V0s, 1 cascades, 93604 3-body decays, 0 strange tracks. Timing: CPU: 377.17 Real: 9.55567 s
[2686391:secondary-vertexing]: [15:11:08][INFO] Found 91134 V0s, 1 cascades, 70711 3-body decays, 0 strange tracks. Timing: CPU: 229.59 Real: 5.85402 s
[2686391:secondary-vertexing]: [15:11:34][INFO] Found 265628 V0s, 3 cascades, 173324 3-body decays, 0 strange tracks. Timing: CPU: 1003.28 Real: 25.4538 s
[2686391:secondary-vertexing]: [15:12:06][INFO] Found 185130 V0s, 5 cascades, 80256 3-body decays, 0 strange tracks. Timing: CPU: 1260.29 Real: 31.9637 s
[2686391:secondary-vertexing]: [15:12:21][INFO] Found 205781 V0s, 2 cascades, 201529 3-body decays, 0 strange tracks. Timing: CPU: 607.87 Real: 15.4385 s
[2686391:secondary-vertexing]: [15:12:40][INFO] Found 176657 V0s, 3 cascades, 93401 3-body decays, 0 strange tracks. Timing: CPU: 736.16 Real: 18.6499 s

I see that the expected Lambda width with new parametrization is 1.8MeV above 1 GeV, isn't just 4 sigma cut too tight?

I think 1.8 MeV are in line with what Chiara presented last week: see sl 14 https://indico.cern.ch/event/1326916/contributions/5583405/attachments/2734727/4755042/ALICEWeek_StrangenessRun3.pdf compared with the Lucia's parametrisation
width

How many Collisions do we have here?

@ddobrigk
Copy link
Contributor Author

Hi @shahor02 , traditional analyses of cascades in Pb-Pb have typically used a fixed mass window for Lambdas that is around 5-6MeV/c2 (see e.g. https://alice-notes.web.cern.ch/system/files/notes/analysis/1384/2023-10-04-AnalysisNote_PbPb5.pdf). Therefore, having a 4-sigma window is actually OK and making it pT-dependent is even better than what was done before. If in doubt we could also increase that to 5-sigma.

In your numbers, in addition to knowing how many events this is for your printout (as Francesco asked), I would like to know: is the "current" selection the case in which we apply absolutely no mass window? In that case these numbers aren't really representative of anything and I would not worry; what is more important is actually that we have a negligible efficiency cost when switching. In that sense, the best is to generate a tiny batch of cascade enriched MC and redo the svertexer part with and without this new selection and check that the efficiency is minimally altered before we go on. I have some scripts for that and am playing around with that now. Thanks a lot!

@shahor02
Copy link
Collaborator

@ddobrigk missed your comment, sorry for the late reply. As I wrote, @davidrohr 's test was for 25kHz pbpb, so there were ~70 collisions per TF.
The "current" selection means mass selection enabled as it is in the current dev (i.e. w/o --configKeyValues "svertexer.checkV0Hypothesis=false;svertexer.checkCascadeHypothesis=false;"). Its effect is relatively small, here is the result for 1 TF I've produced locally

  1. w/o any mass selection (i.e. with --configKeyValues "svertexer.checkV0Hypothesis=false;svertexer.checkCascadeHypothesis=false;" in the reco)
Found 399802 V0s, 3577100 cascades, 103640 3-body decays, 415 strange tracks. Timing: CPU: 245.81 Real: 33.788 s
  1. same TF with current mass selection:
Found 341654 V0s, 2634212 cascades, 101605 3-body decays, 364 strange tracks. Timing: CPU: 185.04 Real: 26.2317 s

@ddobrigk
Copy link
Contributor Author

The latest version does the following:

  • a logical bug is fixed in which the V0 window was actually not applied correctly
  • some minor optimization to calculate sigma only once has been applied
  • the V0 windows for cascades are now set to 5sigma instead of 4sigma
    The resulting 5sigma V0 mass window for the cascades looks more or less like this:
    image
    ...meaning overall we are still rather loose, especially at high pT, so this seems to work fine while still being safe. @shahor02 @davidrohr this should also boost quite significantly the speed of the cascade finding, I suspect.

On a different note, I am not 100% sure the base V0 mass window for stored V0 candidates is actually being applied correctly now, but I did not touch this with this commit. I will proceed to cross-check this more to be sure - it might be that because of the logical OR with the 7 hypotheses not much gets cut out? I am not entirely sure.

@ddobrigk
Copy link
Contributor Author

@ddobrigk missed your comment, sorry for the late reply. As I wrote, @davidrohr 's test was for 25kHz pbpb, so there were ~70 collisions per TF. The "current" selection means mass selection enabled as it is in the current dev (i.e. w/o --configKeyValues "svertexer.checkV0Hypothesis=false;svertexer.checkCascadeHypothesis=false;"). Its effect is relatively small, here is the result for 1 TF I've produced locally

  1. w/o any mass selection (i.e. with --configKeyValues "svertexer.checkV0Hypothesis=false;svertexer.checkCascadeHypothesis=false;" in the reco)
Found 399802 V0s, 3577100 cascades, 103640 3-body decays, 415 strange tracks. Timing: CPU: 245.81 Real: 33.788 s
  1. same TF with current mass selection:
Found 341654 V0s, 2634212 cascades, 101605 3-body decays, 364 strange tracks. Timing: CPU: 185.04 Real: 26.2317 s

Ah - sorry, now it was me who did not 100% follow through with all the consequences of these numbers. In fact, you're right - the fact that the windows are not so effective at reducing the volume (especially of the V0s) is already there, as you say. I suggest we do the following:

  • run a test with the current effect of this PR on the cascade volume
  • if we see we still have too large AO2Ds, we can investigate tuning the windows of the other particles (though I am hoping this will not be needed).
    Thanks!!!

@shahor02
Copy link
Collaborator

  • if we see we still have too large AO2Ds, we can investigate tuning the windows of the other particles (though I am hoping this will not be needed).

@ddobrigk Will test it tomorrow, but my concern with the previous version of this PR (tested by @davidrohr) was that too few cascades survive.

@ddobrigk
Copy link
Contributor Author

  • if we see we still have too large AO2Ds, we can investigate tuning the windows of the other particles (though I am hoping this will not be needed).

@ddobrigk Will test it tomorrow, but my concern with the previous version of this PR (tested by @davidrohr) was that too few cascades survive.

Yes, this was a bug I now fixed :-) you should get a good number of cascades now!

@shahor02
Copy link
Collaborator

shahor02 commented Nov 1, 2023

@ddobrigk Now for the same TF I get

Found 278290 V0s, 1861225 cascades, 79860 3-body decays, 299 strange tracks. Timing: CPU: 126.65 Real: 18.7592 s

to be compared with: no mass selection at all

Found 399802 V0s, 3577100 cascades, 103640 3-body decays, 415 strange tracks. Timing: CPU: 245.81 Real: 33.788 s

and "current mass selection":

Found 341654 V0s, 2634212 cascades, 101605 3-body decays, 364 strange tracks. Timing: CPU: 185.04 Real: 26.2317 s

Concerning photons: @f3sch sent me the histos showing that [0:100] MeV fully contain reconstructed photons, but restricting the margin to 100 MeV (instead of the current 600) changes nothing, apparently the "photon masses" up to 600 MeV are largely overlapping with other hypotheses:

Found 276928 V0s, 1861225 cascades, 79860 3-body decays, 299 strange tracks. Timing: CPU: 127.88 Real: 18.9606 s

@shahor02
Copy link
Collaborator

shahor02 commented Nov 1, 2023

I think we can start merging this PR, could you please fix the clang-format and remove the draft tag?

Please consider the following formatting changes to AliceO2Group#12136
@ddobrigk ddobrigk marked this pull request as ready for review November 1, 2023 21:00
@ddobrigk ddobrigk requested a review from a team as a code owner November 1, 2023 21:00
@shahor02 shahor02 merged commit 63e2915 into AliceO2Group:dev Nov 2, 2023
noferini pushed a commit that referenced this pull request Nov 3, 2023
* svertexer: adaptive mass windows

* One more step: Lucia's changes

* Tighter windows when doing decay chains

* Please consider the following formatting changes

* Latest bugfixes

* Please consider the following formatting changes

---------

Co-authored-by: David Dobrigkeit Chinellato <david.dobrigkeit.chinellato.cern.ch>
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
christianreckziegel pushed a commit to LucasFerrandi/AliceO2 that referenced this pull request Nov 9, 2023
* svertexer: adaptive mass windows

* One more step: Lucia's changes

* Tighter windows when doing decay chains

* Please consider the following formatting changes

* Latest bugfixes

* Please consider the following formatting changes

---------

Co-authored-by: David Dobrigkeit Chinellato <david.dobrigkeit.chinellato.cern.ch>
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
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.

6 participants