Goal: Train the cluster errors to approximate gaussian error around track tube for any given cluster
First idea: Cluster error = sqrt((cluster-to-track residual)**2 - track covariance) -> If track covariance gets larger than residual, we have a problem
Improved idea for loss function
Assume gaussianity of cluster-to-track residuals and cluster errors: Maximises probability of gaussian by tuning standard deviation
p(d, S) = 1/sqrt(2\pi S) exp(-d^2/(2S)) -> d = cluster-to-track residual ; S = (track cov. + cluster_error^2)
Maximize p(d, S) == Minimize -ln(p(d, S)) -- Minimze: Loss = 0.5*ln(S) + d^2/(2S) where S = (track cov. + NN output)
Change clusterState to individual inputs of 0 and 1's for the input by using (clusterState >> 0 & 1), (clusterState >> 1 & 1), ... as input to avoid large values and better distinction
NN implemented in reco chain:
Simulation with standard reco: 388k tracks
Simulation with new NN cluster errors (otherwise identical): 120k tracks
Also tried scaling the error but still far off
-> Something's fishy...
Problem are clusters for which the learned cluster error is 0
Potential problem is the training data selection: https://github.com/ChSonnabend/AliceO2/blob/7208318395ce370d4ba522d05e1d31b00ebe29a3/GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx#L305
New implementation
Removed ReLU in final output layer -> Removes entries at prediction = 0
Top default reco, bottom with new cluster error NN