Refactor analysis initialization code.

New methods of defining gates, basic and house events.
Test call for incorrect cut-off values.
Use find()->second instead of operator[] for maps.