VERITAS-Observatory / EventDisplay_v4

A reconstruction and analysis pipeline for VERITAS.
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Likelihood Fitting: Error getting effective areas from file #128

Closed steob92 closed 3 years ago

steob92 commented 3 years ago

I think this is gcc/ROOT versions specific.

Anasum stage throws a segfault at this line when running with * ENABLELIKELIHOOD 1: https://github.com/VERITAS-Observatory/EventDisplay_v4/blob/3d7a7a89ba17af158a1792621324dc49d2a58bba/src/VEffectiveAreaCalculator.cpp#L1353

After some digging, it appears to be related to how i_hEsysMCRelative2D is initialized. Need to explicitly initialize it as a null pointer.

https://github.com/VERITAS-Observatory/EventDisplay_v4/blob/3d7a7a89ba17af158a1792621324dc49d2a58bba/src/VEffectiveAreaCalculator.cpp#L1327-L1337

Solution: TH2F* i_hEsysMCRelative2D = 0; Testing the fix in a new branch, will put in a pull request shortly.

For reference (gcc/ROOT versions are supported):

CONFIGURATION TEST FOR EVNDISP version 485
======================================================

gcc 8 on x86_64-linux-gnu Linux

using root version 6.22/06
    compiled with MLP: yes, MINUIT2: no, MYSQL: yes, DCACHE: yes, MATHMORE: 

evndisp with GSL libraries (used in Hough muon calibration, likelihood fitter)
evndisp with VBF support
evndisp with database support
no HESSIO support enabled
FITS support enabled
GernotMaier commented 3 years ago

Thanks - yes in generally always better to initialize variables.