File indexing completed on 2024-04-06 12:28:44
0001 #ifndef CtfSpecialSeedGenerator_H
0002 #define CtfSpecialSeedGenerator_H
0003
0004
0005
0006
0007
0008
0009 #include "FWCore/Framework/interface/stream/EDProducer.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Framework/interface/ESHandle.h"
0014
0015 #include "DataFormats/Common/interface/Handle.h"
0016 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0017 #include "DataFormats/GeometrySurface/interface/BoundPlane.h"
0018
0019 #include "RecoTracker/TransientTrackingRecHit/interface/TkTransientTrackingRecHitBuilder.h"
0020 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
0021 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayerSetsBuilder.h"
0022 #include "RecoTracker/TkSeedingLayers/interface/SeedingHitSet.h"
0023 #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h"
0024 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegionProducer.h"
0025 #include "RecoTracker/SpecialSeedGenerators/interface/SeedFromGenericPairOrTriplet.h"
0026
0027
0028
0029 #include "MagneticField/Engine/interface/MagneticField.h"
0030
0031 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0032 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0033 #include "TrackingTools/DetLayers/interface/NavigationDirection.h"
0034
0035 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0036 #include "RecoTracker/SpecialSeedGenerators/interface/ClusterChecker.h"
0037
0038 #include <map>
0039
0040 class CtfSpecialSeedGenerator : public edm::stream::EDProducer<> {
0041 public:
0042 typedef TrajectoryStateOnSurface TSOS;
0043
0044 CtfSpecialSeedGenerator(const edm::ParameterSet& conf);
0045
0046 ~CtfSpecialSeedGenerator() override;
0047
0048 void beginRun(edm::Run const&, edm::EventSetup const&) override;
0049 void endRun(edm::Run const&, edm::EventSetup const&) override;
0050
0051 void produce(edm::Event& e, const edm::EventSetup& c) override;
0052
0053 private:
0054 bool run(const edm::EventSetup& c, const edm::Event& e, TrajectorySeedCollection& output);
0055
0056 bool buildSeeds(const edm::EventSetup& iSetup,
0057 const edm::Event& e,
0058 const OrderedSeedingHits& osh,
0059 const NavigationDirection& navdir,
0060 const PropagationDirection& dir,
0061 TrajectorySeedCollection& output);
0062
0063 bool preliminaryCheck(const SeedingHitSet& shs, const edm::EventSetup& es);
0064
0065
0066 bool postCheck(const TrajectorySeed& seed);
0067
0068 private:
0069 edm::ParameterSet conf_;
0070
0071 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMFToken;
0072 const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> theBuilderToken;
0073 const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> theTrackerToken;
0074 const edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropAlongToken;
0075 const edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropOppositeToken;
0076 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> theTopoToken;
0077
0078 edm::ESHandle<MagneticField> theMagfield;
0079 edm::ESHandle<TrackerGeometry> theTracker;
0080 edm::ESHandle<TransientTrackingRecHitBuilder> theBuilder;
0081
0082
0083
0084
0085
0086
0087
0088 std::vector<std::unique_ptr<OrderedHitsGenerator> > theGenerators;
0089 std::vector<PropagationDirection> thePropDirs;
0090 std::vector<NavigationDirection> theNavDirs;
0091 std::unique_ptr<TrackingRegionProducer> theRegionProducer;
0092
0093 std::unique_ptr<SeedFromGenericPairOrTriplet> theSeedBuilder;
0094 bool useScintillatorsConstraint;
0095 BoundPlane::BoundPlanePointer upperScintillator;
0096 BoundPlane::BoundPlanePointer lowerScintillator;
0097 bool requireBOFF;
0098 int32_t theMaxSeeds;
0099 ClusterChecker check;
0100 };
0101 #endif