File indexing completed on 2024-09-07 04:38:01
0001 #ifndef SpecialSeedGenerators_SeedFromGenericPairOrTriplet_h
0002 #define SpecialSeedGenerators_SeedFromGenericPairOrTriplet_h
0003
0004
0005
0006
0007
0008
0009 #include "FWCore/Framework/interface/EventSetup.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011
0012 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0013 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0014 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0015
0016 #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
0017
0018 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0019 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0020 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0021 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
0022 #include "TrackingTools/DetLayers/interface/NavigationDirection.h"
0023
0024 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0025
0026 #include "MagneticField/Engine/interface/MagneticField.h"
0027
0028 #include <vector>
0029
0030 class SeedFromGenericPairOrTriplet {
0031 public:
0032 SeedFromGenericPairOrTriplet(const MagneticField* mf,
0033 const TrackerGeometry* geom,
0034 const TransientTrackingRecHitBuilder* builder,
0035 const Propagator* propagatorAlong,
0036 const Propagator* propagatorOpposite,
0037 const std::vector<int>& charges,
0038 bool momFromPSet,
0039 double errorRescaling);
0040 ~SeedFromGenericPairOrTriplet() {}
0041 void setMomentumTo(double mom) { theP = mom; };
0042 bool momentumFromPSet() { return theSetMomentum; };
0043
0044 std::vector<TrajectorySeed*> seed(const SeedingHitSet& hits,
0045 const PropagationDirection& dir,
0046 const NavigationDirection& seedDir,
0047 const edm::EventSetup& iSetup);
0048 TrajectorySeed* seedFromTriplet(const SeedingHitSet& hits,
0049 const PropagationDirection& dir,
0050 const NavigationDirection& seedDir,
0051 const edm::EventSetup& iSetup,
0052 int charge = -1) const;
0053 TrajectorySeed* seedFromPair(const SeedingHitSet& hits,
0054 const PropagationDirection& dir,
0055 const NavigationDirection& seedDir,
0056 int charge = -1) const;
0057
0058 private:
0059 TrajectorySeed* buildSeed(const GlobalVector& momentum,
0060 int charge,
0061
0062 std::vector<const BaseTrackerRecHit*>& trHits,
0063 const PropagationDirection& dir) const;
0064
0065
0066
0067
0068 bool qualityFilter(const SeedingHitSet& hits) const;
0069 bool qualityFilter(const GlobalVector& momentum) const;
0070 const MagneticField* theMagfield;
0071 const TrackerGeometry* theTracker;
0072 const TransientTrackingRecHitBuilder* theBuilder;
0073 const Propagator* thePropagatorAlong;
0074 const Propagator* thePropagatorOpposite;
0075
0076 float theP;
0077 bool theSetMomentum;
0078 std::vector<int> theCharges;
0079 double theErrorRescaling;
0080 };
0081
0082 #endif