Changes to do with primary particle definition as implemented #271
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.
in
AliStack::IsPhysicalPrimaryAliStack::IsPhysicalPrimarywas changed to conform withthe definition adopted by ALICE in a recent public note:
See also ALICE-PUBLIC-2017-005 at
Please note, that the definition is approved by the Physics Board
The old implementation of
AliStack::IsPhysicalPrimaryis stillavailable as
AliStack::IsPhysicalPrimaryOldto allow testing etc.Various bugs in the old implementation (now
AliStack::IsPhysicalPrimaryOld)and in
AliStack::IsSecondaryFromWeakDecaywere corrected. Specificallythese bugs had to do with extracting the heaviest flavour or a
particle (to see if a particle was heavy flavour or strange)
To get the heaviest flavour of a particle with PID pdg the old code
tried to extract the heaviest flavour quark by doing
f = floor(|pdg| / 10^{floor(log10(|pdg|)})Value of f corresponds to the heaviest quark in the particle
(1: d, 2: u, 3: s, 4: c, 5: b, 6; t) For most particles
this is fine, e.g.,
while for others it will give the wrong result
and the leptons are really messed up
The definition of the PDG code conventions state that each
PDG code is formatted as
where nq1, nq2, and nq3 encode the quark content.
For mesons nq1=0. So a better way to extract the heaviest
flavour is to take the absolute value of the PDG code, modulo
10,000 and then, depending on whether the value is larger than
999 (baryons) extract the 4th or 3rd digit
Note, for nuclei the contvention is to encode as
where L is the number of Lambda's in the nucleus. So we
should check if this number is non-zero and in that case
get 3 (strange), otherwiese 2 (up). I.e., the full
pseudo-code is
This algorithm is implemented in the service function
HeaviestFlavourin the scope of AliStack.cxx