CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoMuon/TrackingTools/interface/MuonSeedFromRecHits.h

Go to the documentation of this file.
00001 #ifndef RecoMuon_TrackingTools_MuonSeedFromRecHits_H
00002 #define RecoMuon_TrackingTools_MuonSeedFromRecHits_H
00003 
00014 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00015 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
00016 #include "MagneticField/Engine/interface/MagneticField.h"
00017 class MuonSeedPtExtractor;
00018 
00019 class MuonSeedFromRecHits 
00020 {
00021 public:
00022   MuonSeedFromRecHits();
00023   virtual ~MuonSeedFromRecHits() {}
00024 
00025   void setBField(const MagneticField * field) {theField = field;}
00026   void setPtExtractor(const MuonSeedPtExtractor * extractor) {thePtExtractor = extractor;}
00027 
00028   void add(MuonTransientTrackingRecHit::MuonRecHitPointer hit) { theRhits.push_back(hit); }
00029   MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstRecHit() const { return theRhits.front(); }
00030   unsigned int nrhit() const { return  theRhits.size(); }
00031   void clear() {theRhits.clear();}
00032 
00033   TrajectorySeed createSeed(float ptmean, float sptmean,
00034                             MuonTransientTrackingRecHit::ConstMuonRecHitPointer last) const;
00035   
00036   protected:
00037   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
00038   typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
00039   typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
00040 
00041   MuonTransientTrackingRecHit::MuonRecHitContainer theRhits;
00042   const MagneticField * theField;
00043   const MuonSeedPtExtractor * thePtExtractor;
00044 
00045 };
00046 
00047 #endif