Silicon photomultiplier characterization with a scintillating bar detector