[NN CF] Momentum vector usage by neural network cluster finder#15582
[NN CF] Momentum vector usage by neural network cluster finder#15582ChSonnabend wants to merge 3 commits into
Conversation
|
@davidrohr
|
Please consider the following formatting changes to AliceO2Group#15582
|
I think for the development and testing, this has to go into a separate class. We cannot allow to increase the size of ClusterNative, if we do not decide that we want to use this in production, which would anyhow only be for Run 4. |
Ok, thats an easy(ish) fix. Does the rest work? |
davidrohr
left a comment
There was a problem hiding this comment.
Generally that should work, without testing anything or checking in detail
| #include <algorithm> | ||
| #endif | ||
|
|
||
| namespace o2::tpc |
There was a problem hiding this comment.
Why does this have to go here? This is one of the base classes, included almost everywhere, so I would try to keep it as slim as possible.
| const float y = y0 + hitData.x * stepY; | ||
| const float z = z0 + hitData.y * stepZ; | ||
| float nnDydx = 0.f, nnDzdx = 0.f; | ||
| const bool useNNDir = tracker.HitNNDirection(row, ih, nnDydx, nnDzdx) && CAMath::Abs(nnDydx) < 10.f && CAMath::Abs(nnDzdx) < 10.f; |
There was a problem hiding this comment.
there should be an option in param.rec.tpc, that enables / disables it, and this should be ANDed as first check here.
| if (iRow == (int32_t)r.mStartRow + 2) { | ||
| tParam.SetSinPhi(dy * ri); | ||
| float nnDydx = 0.f, nnDzdx = 0.f; | ||
| if (tracker.HitNNDirection(row, seedIH, nnDydx, nnDzdx) && CAMath::Abs(nnDydx) < 10.f && CAMath::Abs(nnDzdx) < 10.f) { |
There was a problem hiding this comment.
I don't fully understand the math without checking in detail. You are weighting the NN direction and the slope between the clusters? That makes sense. But in any case, as first check, it should be ANDed with a setting in param.rec.tpc
There was a problem hiding this comment.
I normalize the NN direction by the transverse element (ds = sqrt(dx2 + dy2), which becomes dx*invsqrt(1 + (dy/dx)**2)). Since sin(phi) = dy/ds you get nnDydx * nnNormI. The track parameters use the transverse path length with sin(phi) = Py / Pt and DzDs = Pz / Pt. Therefore the normalization is reused for the z direction too.
No description provided.