Due to the possibility to produce B0, Bs0 and λb hadrons in the proton-proton collisions at the LHC, the mass peaks of many two-body B decays overlap. For this reason, the particle identification capabilities of the LHCb detector will play a crucial role in the measurements related to these decay modes. In this document we propose a method for combining different observables provided by the LHCb particle identification system into a single generalized discriminating variable, useful when performing the statistical separation of the various channels in event-by-event fits