-
Notifications
You must be signed in to change notification settings - Fork 485
AO2D: extend writing of tracks and particles #6691
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
Conversation
|
@noferini we can start from here |
sawenzel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me (although I can't judge correctness)
|
Hi @njacazio. Looks fine for me too |
| } | ||
| const float mass = o2::constants::physics::MassPionCharged; // default pid = pion | ||
| if (tofInt.getTOF(o2::track::PID::Pion) > 0.f) { | ||
| const float expBeta = (intLen / tofInt.getTOF(o2::track::PID::Pion) / cSpeed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one division less with const float expBeta = (intLen / (tofInt.getTOF(o2::track::PID::Pion) * cSpeed))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ruben, indeed, I missed that thanks!
| const float limit = 1e-4; | ||
| const float mom = TMath::Sqrt(pX * pX + pY * pY + pZ * pZ); | ||
| const float eta = 0.5f * TMath::Log((mom + pZ) / (mom - pZ)); | ||
| if (TMath::Abs(eta) > 0.9) { | ||
| if (TMath::Abs((mom - pZ) / pZ) <= limit) { | ||
| pX = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ * 0.5, mMcParticleMom); | ||
| pY = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ * 0.5, mMcParticleMom); | ||
| } | ||
| if (TMath::Abs(energy - pZ) < limit) { | ||
| energy = truncateFloatFraction(pZ + limit, mMcParticleMom); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you elaborate what produces FPE? In any case, if you want to approximate the
pT^2 = ( (1+limit)^2 - 1) pZ^2
then one should have
pX = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ / sqrt(2), mMcParticleMom);
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the FPE is observed when computing rapidity/pseudorapidity for particles that are in the beampipe. This hack is needed to bypass a limitation that will be solved in the future when we will be able to handle conditions in Gandiva for the computation of the expression columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, but if you want to make (mom - pZ) / pZ) = limit, this means pT^2 = ( (1+limit)^2 - 1) pZ^2 and with pX=pY=pT/sqrt(2) this gives pX=pY=truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ / sqrt(2), mMcParticleMom); (note the factor 1/sqrt(2) instead of 0.5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's true, thanks for spotting this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nonetheless, the difference should be small i.e. *0.7 vs *0.5
|
@shahor02 thanks for the useful comments! Everything should be taken care of, could we go on? |
* Fix the way TOF is written * Add PDG codes of heavier particles * Add shift in momentum energy hack * Add more fixes * Add dummy TOF EventTime maker * Resolve extra division * Fix for sqrt(2) in FPE protection hack
* Fix the way TOF is written * Add PDG codes of heavier particles * Add shift in momentum energy hack * Add more fixes * Add dummy TOF EventTime maker * Resolve extra division * Fix for sqrt(2) in FPE protection hack
Uh oh!
There was an error while loading. Please reload this page.