Trench Hammer works out the same as a Heavy Pistol within 8" in ARO as it has a +0 range modifier, same damage but with DA rather than Shock. Generally pistols are going to be better in melee, but against something like an immobilised TAG or AC2 the hammer comes in more useful IMO.