Copy and paste the code from TrackerHitAnalyzer into the SiPixelRecHitsValid