Doubt regarding definition of Missing hits

Can someone please clarify the definition of missing hits? From Line 201 in
ElectronAnalyzer.cc" of POET repository what I have understood is, it is the difference between the number of Expected hits and Hit Pattern (Observed hits) which would tell us whether there are any gaps in the trajectory. Following this definition, the distribution I made for missing hits in the ECAL Barrel is given below:

Now this distribution of missing hits has negative values in its range. This would imply the number of Observed hits is more than the Expected Hits. How can this be possible?
Furthermore, since missing hits is a positive integer what is the motivation behind putting the ‘less than’ sign while imposing the constraint missing_hits <= 0 throughout the CMSSW workbook?

Would also appreciate if someone could point me to the definition of trackerExpectedHitsInner().numberOfHits() .