PWGCF: Update lambdaR2Correlation.cxx - #6829
Conversation
| case kPion: | ||
| if (track.hasTOF()) { | ||
| if (fabs(track.tofNSigmaPi()) < cfg_tof_nsigma) { | ||
| selTOFv0type = true; | ||
| } | ||
| if (fabs(track.tpcNSigmaPi()) < cfg_tpc_nsigma) { | ||
| selTPCv0type = true; | ||
| } | ||
| } else { | ||
| selTOFv0type = true; | ||
| if (fabs(track.tpcNSigmaPi()) < cfg_tpc_nsigma) { | ||
| selTPCv0type = true; | ||
| } | ||
| } | ||
| break; | ||
|
|
||
| case kProton: | ||
| if (track.hasTOF()) { | ||
| if (fabs(track.tofNSigmaPr()) < cfg_tof_nsigma) { | ||
| selTOFv0type = true; | ||
| } | ||
| if (fabs(track.tpcNSigmaPr()) < cfg_tpc_nsigma) { | ||
| selTPCv0type = true; | ||
| } | ||
| } else { | ||
| selTOFv0type = true; | ||
| if (fabs(track.tpcNSigmaPr()) < cfg_tpc_nsigma) { | ||
| selTPCv0type = true; | ||
| } | ||
| } | ||
| break; |
There was a problem hiding this comment.
Please don't move back to replicate code
I suggested to store the TOF and TPC nsigma at the beginning of the routine because that is the only differentiated treatment you have to do for the different species. After that everything is the same
Have it in mind for the next iteration
There was a problem hiding this comment.
Yes I agree, I repeated the replication. I have changed this now.
|
Error while checking build/O2Physics/o2 for dd7972d at 2024-07-11 18:53: Full log here. |
| selV0Particle<kLambda, kProton, kPion, kCentralWindow>(collision, v0, postrack, negtrack, tracks); | ||
| selV0Particle<kLambda, kProton, kPion, kLeftWindow>(collision, v0, postrack, negtrack, tracks); | ||
| selV0Particle<kLambda, kProton, kPion, kRightWindow>(collision, v0, postrack, negtrack, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kCentralWindow>(collision, v0, postrack, negtrack, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kLeftWindow>(collision, v0, postrack, negtrack, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kRightWindow>(collision, v0, postrack, negtrack, tracks); |
There was a problem hiding this comment.
In here for the same v0 each of the possibilities is tried although only one will succeed (I guess they are mutually exclusive)
For the next iteration I would suggest simplify this a bit. Most probably the extraction of the invariant mass window should be immediate
Also, as the tracks table is passed it is not needed to additionally pass postrack and `negtrack
There was a problem hiding this comment.
Dear @victor-gonzalez, I am sorry but I didn't get the first part of this comment. Could you please elaborate ?
|
Error while checking build/O2Physics/o2 for 6c30f4f at 2024-07-11 18:58: Full log here. |
victor-gonzalez
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments
I've put a few more for your consideration in the next iteration
|
And, yes, you have to fix your code warnings that now are treated as errors |
| if (!selPIDTrack<pos_prong>(postrack) || !selPIDTrack<neg_prong>(negtrack)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
This will allow to say if it is a Lambda, antiLambda, or something else, right? So it should be first
| if (mass > mass_map_min[masswin] && mass < mass_map_max[masswin]) { | ||
| if (masswin == kCentralWindow) { | ||
| fillQALambda<v0part>(collision, v0track, tracks); | ||
| } | ||
| lambdaTrackTable(lambdaCollisionTable.lastIndex(), v0track.pt(), rap, v0track.phi(), mass, postrack.index(), negtrack.index(), v0part, masswin); | ||
| } |
There was a problem hiding this comment.
A loop on the three mass windows with a break when found will allow to get the proper mass window
| selV0Particle<kLambda, kProton, kPion, kCentralWindow>(collision, v0, tracks); | ||
| selV0Particle<kLambda, kProton, kPion, kLeftWindow>(collision, v0, tracks); | ||
| selV0Particle<kLambda, kProton, kPion, kRightWindow>(collision, v0, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kCentralWindow>(collision, v0, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kLeftWindow>(collision, v0, tracks); | ||
| selV0Particle<kAntiLambda, kPion, kProton, kRightWindow>(collision, v0, tracks); |
There was a problem hiding this comment.
Why it is needed to do the six combinations if only one will be valid?
Check my comments on the routine
victor-gonzalez
left a comment
There was a problem hiding this comment.
Thanks for considering my comment
Have a look at the new ones if you want to consider them for the next iteration
Some major changes made in this PR are as follows,
Rest of the changes can be inferred from the code itself.