File indexing completed on 2024-12-07 02:27:56
0001 #ifndef SimMuon_MCTruth_SeedToTrackProducerBase_h
0002 #define SimMuon_MCTruth_SeedToTrackProducerBase_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <memory>
0018
0019
0020 #include "FWCore/Framework/interface/Event.h"
0021 #include "FWCore/Framework/interface/Frameworkfwd.h"
0022 #include "FWCore/Framework/interface/MakerMacros.h"
0023 #include "FWCore/Framework/interface/global/EDProducer.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025
0026 #include "MagneticField/Engine/interface/MagneticField.h"
0027 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0028
0029 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0030 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0031 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0032
0033 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
0034 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0035 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0036 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
0037
0038 #include "DataFormats/TrackReco/interface/Track.h"
0039 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0040 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0041
0042
0043
0044
0045
0046 typedef math::Error<5>::type CovarianceMatrix;
0047
0048 template <typename SeedCollection>
0049 class SeedToTrackProducerBase : public edm::global::EDProducer<> {
0050 public:
0051 explicit SeedToTrackProducerBase(const edm::ParameterSet &);
0052
0053 private:
0054 void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const final;
0055
0056 using SeedType = typename SeedCollection::value_type;
0057 TrajectoryStateOnSurface seedTransientState(const SeedType &,
0058 const MagneticField &,
0059 const GlobalTrackingGeometry &) const;
0060
0061
0062 edm::EDGetTokenT<SeedCollection> L2seedsTagT_;
0063 edm::EDGetTokenT<edm::View<TrajectorySeed>> L2seedsTagS_;
0064
0065 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMGFieldToken;
0066 const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> theTrackingGeometryToken;
0067 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> theTopoToken;
0068 };
0069
0070 #endif