CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoTracker/TkSeedingLayers/plugins/SimpleClusterProbabilitySeedComparitor.cc

Go to the documentation of this file.
00001 #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h"
00002 #include "RecoTracker/TkSeedingLayers/interface/SeedComparitorFactory.h"
00003 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00004 
00005 #include <cmath>
00006 
00007 class SimpleClusterProbabilitySeedComparitor : public SeedComparitor {
00008     public:
00009         SimpleClusterProbabilitySeedComparitor(const edm::ParameterSet &cfg) ;
00010         virtual ~SimpleClusterProbabilitySeedComparitor() ; 
00011         virtual void init(const edm::EventSetup& es) {}
00012         virtual bool compatible(const SeedingHitSet  &hits, const TrackingRegion & region) const { return true; }
00013         virtual bool compatible(const TrajectorySeed &seed) const { return true; }
00014         virtual bool compatible(const TrajectoryStateOnSurface &,
00015                 const TransientTrackingRecHit::ConstRecHitPointer &hit) const ;
00016         virtual bool compatible(const SeedingHitSet  &hits, 
00017                 const GlobalTrajectoryParameters &helixStateAtVertex,
00018                 const FastHelix                  &helix,
00019                 const TrackingRegion & region) const { return true; }
00020         virtual bool compatible(const SeedingHitSet  &hits, 
00021                 const GlobalTrajectoryParameters &straightLineStateAtVertex,
00022                 const TrackingRegion & region) const { return true; }
00023 
00024 
00025     private:
00026         float probCut_;
00027 };
00028 
00029 
00030 SimpleClusterProbabilitySeedComparitor::SimpleClusterProbabilitySeedComparitor(const edm::ParameterSet &cfg) :
00031     probCut_(cfg.getParameter<double>("LogPixelProbabilityCut"))
00032 {
00033 }
00034 
00035 SimpleClusterProbabilitySeedComparitor::~SimpleClusterProbabilitySeedComparitor() 
00036 {
00037 }
00038 
00039 bool
00040 SimpleClusterProbabilitySeedComparitor::compatible(const TrajectoryStateOnSurface &tsos,
00041                 const TransientTrackingRecHit::ConstRecHitPointer &hit) const
00042 {
00043     return (probCut_ < -15.) || (log10(hit->clusterProbability()) > probCut_);
00044 }
00045 
00046 DEFINE_EDM_PLUGIN(SeedComparitorFactory, SimpleClusterProbabilitySeedComparitor, "SimpleClusterProbabilitySeedComparitor");