cp3-llbb / TTAnalysis

TTbar analysis for CP3 llbb framework
0 stars 4 forks source link

Segmentation fault in gen matching on W+jets #37

Closed pieterdavid closed 8 years ago

pieterdavid commented 8 years ago

I tried to run (a slightly modified copy of) the TTAnalyzer on a W+jets sample, and got a segmentation fault. I did not go through all the details, but I guess that this is because there is no top quark in the event - comparing to -1 (the initial value of gen_t etc. somewhere above) instead of to 0 on https://github.com/cp3-llbb/TTAnalysis/blob/master/plugins/TTAnalyzer.cc#L1093 seems to fix the problem. Does that make sense? (if yes I can create pull request)

swertz commented 8 years ago

Good catch, indeed it is correct here https://github.com/cp3-llbb/TTAnalysis/blob/master/plugins/TTAnalyzer.cc#L958 but not at that other place, and https://github.com/cp3-llbb/TTAnalysis/blob/master/plugins/TTAnalyzer.cc#L1168 will almost certainly segfault in that case...

You're most welcomed to create a PR for that, it doesn't conflit the pending one we have (#36). :+1:

@blinkseb When we test the code locally before submitting PRs, we always use ttbar MC, so no wonder this issue got unnoticed...