Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:39

0001 #ifndef TrajectoryCleaning_TrajectoryCleanerBySharedHits_h
0002 #define TrajectoryCleaning_TrajectoryCleanerBySharedHits_h
0003 
0004 #include "TrackingTools/TrajectoryCleaning/interface/TrajectoryCleaner.h"
0005 
0006 /** A concrete TrajectoryCleaner that considers two trajectories
0007  *  to be mutually exclusive if they share more than some fraction
0008  *  of their hits.
0009  *  The "best" trajectory of each set of mutually exclusive ones
0010  *  is kept, the others are eliminated.
0011  *  The goodness of a track is defined in terms of Chi^2, number of
0012  *  reconstructed hits, and number of lost hits.
0013  */
0014 
0015 class TrajectoryCleanerBySharedHits : public TrajectoryCleaner {
0016 public:
0017   typedef std::vector<Trajectory*> TrajectoryPointerContainer;
0018 
0019   TrajectoryCleanerBySharedHits()
0020       : theFraction(0.19), validHitBonus_(5.0), missingHitPenalty_(20.0), allowSharedFirstHit(true) {}
0021   TrajectoryCleanerBySharedHits(const edm::ParameterSet& iConfig)
0022       : theFraction(iConfig.getParameter<double>("fractionShared")),
0023         validHitBonus_(iConfig.getParameter<double>("ValidHitBonus")),
0024         missingHitPenalty_(iConfig.getParameter<double>("MissingHitPenalty")),
0025         allowSharedFirstHit(iConfig.getParameter<bool>("allowSharedFirstHit")) {}
0026 
0027   ~TrajectoryCleanerBySharedHits() override{};
0028 
0029   using TrajectoryCleaner::clean;
0030   void clean(TrajectoryPointerContainer&) const override;
0031 
0032 private:
0033   float theFraction;
0034   float validHitBonus_;
0035   float missingHitPenalty_;
0036   bool allowSharedFirstHit;
0037 };
0038 
0039 #endif