Implements a function to compute histograms

With the output from the firstPass method, we compute histograms
aligned to two (or more) reference events

In order to compute the histograms, the users should define the number
of bins they want to use. Default is 20

This commit comes with two reference events hardcoded in the controller
just as an example, but naturally these events will be bound to the UI.