Go to the documentation of this file.00001 #ifndef SpecialSeedGenerators_SeedFromGenericPairOrTriplet_h
00002 #define SpecialSeedGenerators_SeedFromGenericPairOrTriplet_h
00003
00004
00005
00006
00007
00008
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011
00012 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00013 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00014 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00015
00016 #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
00017
00018 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00019 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00020 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
00021 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00022 #include "TrackingTools/DetLayers/interface/NavigationDirection.h"
00023
00024 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00025
00026 #include "MagneticField/Engine/interface/MagneticField.h"
00027
00028 #include <vector>
00029
00030 class SeedFromGenericPairOrTriplet{
00031 public:
00032 SeedFromGenericPairOrTriplet(const MagneticField* mf,
00033 const TrackerGeometry* geom,
00034 const TransientTrackingRecHitBuilder* builder,
00035 const Propagator* propagatorAlong,
00036 const Propagator* propagatorOpposite,
00037 const std::vector<int>& charges,
00038 bool momFromPSet,
00039 double errorRescaling );
00040 ~SeedFromGenericPairOrTriplet(){};
00041 void setMomentumTo(double mom){theP = mom;};
00042 bool momentumFromPSet(){return theSetMomentum;};
00043
00044 std::vector<TrajectorySeed*> seed(const SeedingHitSet& hits,
00045 const PropagationDirection& dir,
00046 const NavigationDirection& seedDir,
00047 const edm::EventSetup& iSetup);
00048 TrajectorySeed* seedFromTriplet(const SeedingHitSet& hits,
00049 const PropagationDirection& dir,
00050 const NavigationDirection& seedDir,
00051 const edm::EventSetup& iSetup, int charge = -1) const ;
00052 TrajectorySeed* seedFromPair(const SeedingHitSet& hits,
00053 const PropagationDirection& dir,
00054 const NavigationDirection& seedDir, int charge = -1) const ;
00055
00056
00057 private:
00058 TrajectorySeed* buildSeed(const GlobalVector& momentum,
00059 int charge,
00060
00061 std::vector<const TrackingRecHit*>& trHits,
00062 const PropagationDirection& dir) const;
00063
00064
00065
00066
00067 bool qualityFilter(const SeedingHitSet& hits) const ;
00068 bool qualityFilter(const GlobalVector& momentum) const;
00069 const MagneticField* theMagfield;
00070 const TrackerGeometry* theTracker;
00071 const TransientTrackingRecHitBuilder* theBuilder;
00072 const Propagator* thePropagatorAlong;
00073 const Propagator* thePropagatorOpposite;
00074
00075 float theP;
00076 bool theSetMomentum;
00077 std::vector<int> theCharges;
00078 double theErrorRescaling;
00079 };
00080
00081 #endif