cms-nanoAOD / cmssw

CMS NanoAOD software integration repository
http://cms-sw.github.io/
Apache License 2.0
3 stars 10 forks source link

bug in L1TriggerResultsConverter #559

Closed mariadalfonso closed 1 year ago

mariadalfonso commented 3 years ago

See report here https://its.cern.ch/jira/browse/CMSCOMPPR-17789

mariadalfonso commented 3 years ago

Fatal Exception (Exit code: 8002) An exception of category 'StdException' occurred while [0] Processing Event run: 304198 lumi: 18 event: 16707722 stream: 1 [1] Running path 'nanoAOD_step' [2] Calling method for module L1TriggerResultsConverter/'l1bits' Exception Message: A std::exception was thrown. vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

@gpetruc you initially wrote the L1TriggerResultsConverter. Do you have an hint on where this error can come ?

peruzzim commented 3 years ago

I would suggest grabbing the event and checking that the trigger content is actually there; if you check in the source code you will see that we have lines like: https://github.com/cms-nanoAOD/cmssw/blob/4eccb8a758b605875003124dd55ea58552b86af1/PhysicsTools/NanoAOD/plugins/L1TriggerResultsConverter.cc#L136 https://github.com/cms-nanoAOD/cmssw/blob/4eccb8a758b605875003124dd55ea58552b86af1/PhysicsTools/NanoAOD/plugins/L1TriggerResultsConverter.cc#L154 (or the similar ones with handleExtResults).

In principle one could add a check that the handles are valid, the in-time BX is actually filled, and the content has the expected size in every event.

gouskos commented 3 years ago

Hi @peruzzim , for now we added a protection in this line: https://github.com/gouskos/cmssw/blob/nanoaodv8_l1issue1/PhysicsTools/NanoAOD/plugins/L1TriggerResultsConverter.cc#L148 We can investigate later [after the nanoAOD-v9 rush] a better solution.

vlimant commented 1 year ago

https://github.com/cms-sw/cmssw/pull/33920