Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-11 16:23:18

0001 #ifndef RecoTracker_TkSeedGenerator_SeedFromConsecutiveHitsCreator_H
0002 #define RecoTracker_TkSeedGenerator_SeedFromConsecutiveHitsCreator_H
0003 #include "FWCore/Utilities/interface/Visibility.h"
0004 
0005 #include "RecoTracker/TkSeedGenerator/interface/SeedCreator.h"
0006 #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
0007 #include "RecoTracker/TkSeedingLayers/interface/SeedComparitor.h"
0008 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0009 #include "FWCore/Utilities/interface/ESGetToken.h"
0010 #include "MagneticField/Engine/interface/MagneticField.h"
0011 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0012 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0013 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0014 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0015 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0016 
0017 #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
0018 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
0019 
0020 #include "DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h"
0021 #include "DataFormats/TrackingRecHit/interface/mayown_ptr.h"
0022 
0023 class FreeTrajectoryState;
0024 
0025 class dso_hidden SeedFromConsecutiveHitsCreator : public SeedCreator {
0026 public:
0027   SeedFromConsecutiveHitsCreator(const edm::ParameterSet &, edm::ConsumesCollector &&);
0028 
0029   ~SeedFromConsecutiveHitsCreator() override;
0030 
0031   static void fillDescriptions(edm::ParameterSetDescription &desc);
0032   static const char *fillDescriptionsLabel() { return "ConsecutiveHits"; }
0033 
0034   // initialize the "event dependent state"
0035   void init(const TrackingRegion &region, const edm::EventSetup &es, const SeedComparitor *filter) final;
0036 
0037   // make job
0038   // fill seedCollection with the "TrajectorySeed"
0039   void makeSeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits) final;
0040 
0041 private:
0042   virtual bool initialKinematic(GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const;
0043 
0044   bool checkHit(const TrajectoryStateOnSurface &tsos, SeedingHitSet::ConstRecHitPointer hit) const dso_hidden;
0045 
0046   CurvilinearTrajectoryError initialError(float sin2Theta) const dso_hidden;
0047 
0048   void buildSeed(TrajectorySeedCollection &seedCollection,
0049                  const SeedingHitSet &hits,
0050                  const FreeTrajectoryState &fts) const dso_hidden;
0051 
0052   SeedingHitSet::RecHitPointer refitHit(SeedingHitSet::ConstRecHitPointer hit,
0053                                         const TrajectoryStateOnSurface &state) const dso_hidden;
0054 
0055 protected:
0056   std::string thePropagatorLabel;
0057   float theBOFFMomentum;
0058   float theOriginTransverseErrorMultiplier;
0059   float theMinOneOverPtError;
0060 
0061   const TrackingRegion *region = nullptr;
0062   const SeedComparitor *filter = nullptr;
0063   TrackerGeometry const *trackerGeometry_;
0064   Propagator const *propagator_;
0065   MagneticField const *magneticField_;
0066   float nomField;
0067   bool isBOFF = false;
0068   std::string TTRHBuilder;
0069   std::string mfName_;
0070   bool forceKinematicWithRegionDirection_;
0071 
0072   TkClonerImpl cloner;
0073 
0074   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeometryESToken_;
0075   const edm::ESGetToken<Propagator, TrackingComponentsRecord> propagatorESToken_;
0076   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> magneticFieldESToken_;
0077   const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> transientTrackingRecHitBuilderESToken_;
0078 };
0079 #endif