Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-05 22:26:26

0001 // -*- C++ -*-
0002 //
0003 // Package:    SeedToTrackProducer
0004 // Class:      SeedToTrackProducer
0005 //
0006 /**\class SeedToTrackProducer SeedToTrackProducer.cc
0007  hugues/SeedToTrackProducer/plugins/SeedToTrackProducer.cc
0008 
0009  Description:
0010 
0011 */
0012 //
0013 // Original Author:  Hugues Brun
0014 //         Created:  Tue, 05 Nov 2013 13:42:04 GMT
0015 // $Id$
0016 //
0017 //
0018 // system include files
0019 #include <memory>
0020 
0021 // user include files
0022 #include "FWCore/Framework/interface/Event.h"
0023 #include "FWCore/Framework/interface/Frameworkfwd.h"
0024 #include "FWCore/Framework/interface/MakerMacros.h"
0025 #include "FWCore/Framework/interface/global/EDProducer.h"
0026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0027 
0028 #include "MagneticField/Engine/interface/MagneticField.h"
0029 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0030 
0031 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0032 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0033 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0034 
0035 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
0036 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0037 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
0038 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
0039 
0040 #include "DataFormats/TrackReco/interface/Track.h"
0041 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0042 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0043 
0044 //
0045 // class declaration
0046 //
0047 
0048 typedef math::Error<5>::type CovarianceMatrix;
0049 
0050 class SeedToTrackProducer : public edm::global::EDProducer<> {
0051 public:
0052   explicit SeedToTrackProducer(const edm::ParameterSet &);
0053 
0054 private:
0055   void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const final;
0056   TrajectoryStateOnSurface seedTransientState(const TrajectorySeed &,
0057                                               const MagneticField &,
0058                                               const GlobalTrackingGeometry &) const;
0059   // ----------member data ---------------------------
0060 
0061   edm::EDGetTokenT<TrajectorySeedCollection> L2seedsTagT_;
0062   edm::EDGetTokenT<edm::View<TrajectorySeed>> L2seedsTagS_;
0063 
0064   const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMGFieldToken;
0065   const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> theTrackingGeometryToken;
0066   const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> theTopoToken;
0067 };