-
Notifications
You must be signed in to change notification settings - Fork 436
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
Add Armenteros-podolanski vars to str tables #5892
Conversation
ddobrigk
commented
Apr 8, 2021
- adds armenteros-podolanski variables
- adds MGamma getter, some further useful things
- thanks to @dsekihat
@ddobrigk The clang has to be fixed. |
@@ -52,14 +53,34 @@ DECLARE_SOA_DYNAMIC_COLUMN(V0Radius, v0radius, [](float x, float y) { return Rec | |||
DECLARE_SOA_DYNAMIC_COLUMN(V0CosPA, v0cosPA, [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) { return RecoDecay::CPA(array{pvX, pvY, pvZ}, array{X, Y, Z}, array{Px, Py, Pz}); }); | |||
DECLARE_SOA_DYNAMIC_COLUMN(DCAV0ToPV, dcav0topv, [](float X, float Y, float Z, float Px, float Py, float Pz, float pvX, float pvY, float pvZ) { return std::sqrt((std::pow((pvY - Y) * Pz - (pvZ - Z) * Py, 2) + std::pow((pvX - X) * Pz - (pvZ - Z) * Px, 2) + std::pow((pvX - X) * Py - (pvY - Y) * Px, 2)) / (Px * Px + Py * Py + Pz * Pz)); }); | |||
|
|||
//Alpenteros-Podolanski variables | |||
DECLARE_SOA_DYNAMIC_COLUMN(Alpha, alpha, [](float pxpos, float pypos, float pzpos, float pxneg, float pyneg, float pzneg) { | |||
TVector3 momPos(pxpos, pypos, pzpos); |
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 avoid using TVector3
? While it is convenient, all those extra allocations will be considerably slow, if this dynamic column is called within a loop. It would be better to use plain calculation and add common parts as functions to RecoDecay
header.
The latest commit gets rid of the TVector dependency... should be good to go now! Thanks again to @dsekihat :-D |
* Add Armenteros-podolanski vars to str tables * Follow clang format rules * Update StrangenessTables.h
* Add Armenteros-podolanski vars to str tables * Follow clang format rules * Update StrangenessTables.h