00001 #ifndef RecoMuon_MuonSeedGenerator_MuonSeedFromRecHits_H 00002 #define RecoMuon_MuonSeedGenerator_MuonSeedFromRecHits_H 00003 00015 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h" 00016 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h" 00017 #include "MagneticField/Engine/interface/MagneticField.h" 00018 #include <vector> 00019 class MuonSeedPtExtractor; 00020 00021 00022 namespace edm {class EventSetup;} 00023 00024 class MuonSeedFromRecHits 00025 { 00026 public: 00027 MuonSeedFromRecHits(); 00028 virtual ~MuonSeedFromRecHits() {} 00029 00030 void setBField(const MagneticField * field) {theField = field;} 00031 void setPtExtractor(const MuonSeedPtExtractor * extractor) {thePtExtractor = extractor;} 00032 00033 void add(MuonTransientTrackingRecHit::MuonRecHitPointer hit) { theRhits.push_back(hit); } 00034 MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstRecHit() const { return theRhits.front(); } 00035 unsigned int nrhit() const { return theRhits.size(); } 00036 void clear() {theRhits.clear();} 00037 00038 TrajectorySeed createSeed(float ptmean, float sptmean, 00039 MuonTransientTrackingRecHit::ConstMuonRecHitPointer last) const; 00040 00041 protected: 00042 friend class MuonSeedFinder; 00043 typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer; 00044 typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer; 00045 typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer; 00046 00047 protected: 00048 MuonTransientTrackingRecHit::MuonRecHitContainer theRhits; 00049 const MagneticField * theField; 00050 const MuonSeedPtExtractor * thePtExtractor; 00051 00052 }; 00053 00054 #endif