Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:53

0001 #ifndef RecoTracker_TkSeedGenerator_SeedFromProtoTrack_H
0002 #define RecoTracker_TkSeedGenerator_SeedFromProtoTrack_H
0003 
0004 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0005 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0006 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0007 #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
0008 #include "FWCore/Utilities/interface/ESGetToken.h"
0009 
0010 namespace reco {
0011   class Track;
0012 }
0013 namespace edm {
0014   class EventSetup;
0015   class ConsumesCollector;
0016 }  // namespace edm
0017 
0018 class TrackerGeometry;
0019 class TrackerDigiGeometryRecord;
0020 class Propagator;
0021 class TrackingComponentsRecord;
0022 class MagneticField;
0023 class IdealMagneticFieldRecord;
0024 
0025 class SeedFromProtoTrack {
0026 public:
0027   struct Config {
0028     Config(edm::ConsumesCollector);
0029 
0030     const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerToken_;
0031     const edm::ESGetToken<Propagator, TrackingComponentsRecord> propagatorToken_;
0032     const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> fieldToken_;
0033   };
0034 
0035   SeedFromProtoTrack(const Config&, const reco::Track& proto, const edm::EventSetup&);
0036   SeedFromProtoTrack(const Config&, const reco::Track& proto, const SeedingHitSet& hits, const edm::EventSetup& es);
0037 
0038   ~SeedFromProtoTrack() {}
0039 
0040   TrajectorySeed trajectorySeed() const;
0041 
0042   bool isValid() const { return theValid; }
0043 
0044 private:
0045   void init(const Config&, const reco::Track& proto, const edm::EventSetup& es);
0046 
0047   PropagationDirection direction() const { return alongMomentum; }
0048 
0049   PTrajectoryStateOnDet const& trajectoryState() const { return thePTraj; }
0050 
0051   typedef edm::OwnVector<TrackingRecHit> RecHitContainer;
0052   const RecHitContainer& hits() const { return theHits; }
0053 
0054 private:
0055   bool theValid;
0056   RecHitContainer theHits;
0057   PTrajectoryStateOnDet thePTraj;
0058 };
0059 #endif