00001 #ifndef RecoMuon_MuonSeedGenerator_RPCSeedOverlapper_H 00002 #define RecoMuon_MuonSeedGenerator_RPCSeedOverlapper_H 00003 00012 #include <DataFormats/TrajectorySeed/interface/TrajectorySeed.h> 00013 #include <FWCore/Framework/interface/EventSetup.h> 00014 #include <FWCore/ParameterSet/interface/ParameterSet.h> 00015 #include <Geometry/RPCGeometry/interface/RPCGeometry.h> 00016 #include <FWCore/Framework/interface/ESHandle.h> 00017 #include <DataFormats/Common/interface/OwnVector.h> 00018 #include <DataFormats/TrackingRecHit/interface/TrackingRecHit.h> 00019 #include "RecoMuon/MuonSeedGenerator/src/RPCSeedPattern.h" 00020 00021 class RPCSeedOverlapper { 00022 00023 typedef RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed; 00024 00025 public: 00026 RPCSeedOverlapper(); 00027 ~RPCSeedOverlapper(); 00028 void setIO(std::vector<weightedTrajectorySeed> *goodweightedRef, std::vector<weightedTrajectorySeed> *candidateweightedRef); 00029 void unsetIO(); 00030 void run(); 00031 void configure(const edm::ParameterSet& iConfig); 00032 void setEventSetup(const edm::EventSetup& iSetup); 00033 private: 00034 void CheckOverlap(const edm::EventSetup& iSetup, std::vector<weightedTrajectorySeed> *SeedsRef); 00035 bool isShareHit(const edm::OwnVector<TrackingRecHit> &RecHits, const TrackingRecHit& hit, edm::ESHandle<RPCGeometry> rpcGeometry); 00036 // Signal for call run() 00037 bool isConfigured; 00038 bool isIOset; 00039 bool isEventSetupset; 00040 // Parameters for configuration 00041 bool isCheckgoodOverlap; 00042 bool isCheckcandidateOverlap; 00043 unsigned int ShareRecHitsNumberThreshold; 00044 // IO ref 00045 std::vector<weightedTrajectorySeed> *goodweightedSeedsRef; 00046 std::vector<weightedTrajectorySeed> *candidateweightedSeedsRef; 00047 const edm::EventSetup *eSetup; 00048 }; 00049 00050 #endif