HEP-KBFI / tautau-Entanglement

Code for studies of quantum entanglement in Z->tautau and H->tautau events
0 stars 1 forks source link

Error handling if solving eigenvalue equation fails #7

Open ktht opened 10 months ago

ktht commented 10 months ago

A handful of jobs failed because of this line: https://github.com/HEP-KBFI/tautau-Entanglement/blob/d62fb80196346c1e75e9ff7762b14f2fd47c17d7/interface/comp_EigenVectors_and_EigenValues.h#L47 when calculating Rchsh. Although it's supposed to be caught whenever an exception is thrown, in practice it can trigger this line, which is delegated to signal handler. The only solution would be to ignore erros by setting gErrorAbortLevel to kBreak here: https://github.com/HEP-KBFI/tautau-Entanglement/blob/d62fb80196346c1e75e9ff7762b14f2fd47c17d7/bin/analyzeEntanglementNtuple.cc#L85 But then this line will cause issues: https://github.com/HEP-KBFI/tautau-Entanglement/blob/d62fb80196346c1e75e9ff7762b14f2fd47c17d7/interface/comp_EigenVectors_and_EigenValues.h#L52 which causes all results to be nans.

I've only noticed this error when running the jobs on a subset of events (1M). It's not clear yet if it'll persist when processing the full sample. Interestingly, the only jobs that failed with this particular error are pi_a1 in startPos mode when the cut on $\cos\theta^*$ is quite relaxed.

ktht commented 10 months ago

So the error still persisted even after processing the full sample (of 200M events). All jobs that failed are running in startPos mode and either in rho+a1 or pi+a1 decay mode (but the former happened four times as frequently). Half of the failed jobs ran ML fit while the other half ran the summation method. Fortunately, we don't necessarily need those results for the publication.