Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:16

0001 #ifndef RecoMuon_TrackingTools_MuonSeedFromRecHits_H
0002 #define RecoMuon_TrackingTools_MuonSeedFromRecHits_H
0003 
0004 /**  \class MuonSeedFromRecHits
0005  *
0006  *  \author A. Vitelli - INFN Torino
0007  *  
0008  *  \author porting R.Bellan - INFN Torino
0009  *
0010  *   Generate a seed starting from a list of RecHits 
0011  *
0012  */
0013 
0014 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0015 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
0016 #include "MagneticField/Engine/interface/MagneticField.h"
0017 class MuonSeedPtExtractor;
0018 
0019 class MuonSeedFromRecHits {
0020 public:
0021   MuonSeedFromRecHits();
0022   virtual ~MuonSeedFromRecHits() {}
0023 
0024   void setBField(const MagneticField* field) { theField = field; }
0025   void setPtExtractor(const MuonSeedPtExtractor* extractor) { thePtExtractor = extractor; }
0026 
0027   void add(MuonTransientTrackingRecHit::MuonRecHitPointer hit) { theRhits.push_back(hit); }
0028   MuonTransientTrackingRecHit::ConstMuonRecHitPointer firstRecHit() const { return theRhits.front(); }
0029   unsigned int nrhit() const { return theRhits.size(); }
0030   void clear() { theRhits.clear(); }
0031 
0032   TrajectorySeed createSeed(float ptmean,
0033                             float sptmean,
0034                             MuonTransientTrackingRecHit::ConstMuonRecHitPointer last) const;
0035 
0036 protected:
0037   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
0038   typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
0039   typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
0040 
0041   MuonTransientTrackingRecHit::MuonRecHitContainer theRhits;
0042   const MagneticField* theField;
0043   const MuonSeedPtExtractor* thePtExtractor;
0044 };
0045 
0046 #endif