You can do this with the actors and aggressors strings in PT4.
If the SB is the first to enter the pot the actors string will start with '9'.
If the SB did not raise then the aggressors string will either be 1 char long (if the BB checked) or the 2nd char will not be '9' (it will be 8 if the BB 2Bet).
I'm sure you've used these strings before, but they are described here
. Remember to test the lengths before you test specific characters.