Toomey and Trump ran in Pennsylvania as if they were on different tickets -- and it worked. Trump won PA by getting a lot of votes from Democrats would probably would never have voted for Toomey.
The GOP should study this PA election cycle closely and take a lot of lessons from it. The results of these two races were a successful balancing act that I honestly didn't think was possible. Unbelievable as it may seem, I started to get more confident about Toomey's chances of holding his seat once he quietly distanced himself from Trump (he didn't oppose him, but instead ran his campaign as if Trump didn't exist). That told me he had a very good sense of what his constituents were thinking, even though I would have preferred to see both of these candidates on the stage together at all of Trump's rallies.
I think you are both right in your own way. McGinty was a horrible candidate for the Dems - if they had a better candidate, Toomey might have lost. Toomey played to the country-club pubbies in the Philly burbs who otherwise disliked Trump, and Trump played to the Reagan Dems in the rest of the state who dislike country-club pubbies. There are enough of both to run an inside straight and win.