File indexing completed on 2024-04-06 12:31:39
0001 #ifndef TrackingTools_TrackRefitter_TrackTransformerForGlobalCosmicMuons_H
0002 #define TrackingTools_TrackRefitter_TrackTransformerForGlobalCosmicMuons_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0017 #include "FWCore/Framework/interface/ConsumesCollector.h"
0018 #include "FWCore/Framework/interface/ESHandle.h"
0019 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0020 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0021 #include "MagneticField/Engine/interface/MagneticField.h"
0022 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0023 #include "TrackingTools/TrackRefitter/interface/RefitDirection.h"
0024 #include "TrackingTools/TrackRefitter/interface/TrackTransformerBase.h"
0025 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0026 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0027 #include "TrackingTools/Records/interface/TransientRecHitRecord.h"
0028 #include "TrackingTools/TrackFitters/interface/TrajectoryFitter.h"
0029
0030 namespace edm {
0031 class ParameterSet;
0032 class EventSetup;
0033 }
0034 namespace reco {
0035 class TransientTrack;
0036 }
0037
0038 class TrajectoryFitter;
0039 class TrajectorySmoother;
0040 class Propagator;
0041 class TransientTrackingRecHitBuilder;
0042 class Trajectory;
0043 class TrackerTopology;
0044
0045 class TrackTransformerForGlobalCosmicMuons : public TrackTransformerBase {
0046 public:
0047
0048 TrackTransformerForGlobalCosmicMuons(const edm::ParameterSet&, edm::ConsumesCollector);
0049
0050
0051 ~TrackTransformerForGlobalCosmicMuons() override;
0052
0053
0054
0055
0056 std::vector<Trajectory> transform(const reco::Track&) const override;
0057
0058
0059 const MagneticField* magneticField() const { return &*theMGField; }
0060
0061
0062 edm::ESHandle<GlobalTrackingGeometry> trackingGeometry() const { return theTrackingGeometry; }
0063
0064
0065 void setServices(const edm::EventSetup&) override;
0066
0067
0068 edm::ESHandle<TrajectoryFitter> fitter(bool) const;
0069
0070
0071 edm::ESHandle<TrajectorySmoother> smoother(bool) const;
0072
0073 TransientTrackingRecHit::ConstRecHitContainer getTransientRecHits(const reco::TransientTrack& track) const;
0074
0075
0076 bool TrackerKeep(DetId id) const;
0077
0078 bool MuonKeep(DetId id) const;
0079
0080 protected:
0081 private:
0082 const edm::ESGetToken<Propagator, TrackingComponentsRecord> theIOpropToken;
0083 const edm::ESGetToken<Propagator, TrackingComponentsRecord> theOIpropToken;
0084 const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> thGlobTrackGeoToken;
0085 const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMFToken;
0086 const edm::ESGetToken<TrajectoryFitter, TrajectoryFitter::Record> theIOFitterToken;
0087 const edm::ESGetToken<TrajectoryFitter, TrajectoryFitter::Record> theOIFitterToken;
0088 const edm::ESGetToken<TrajectorySmoother, TrajectoryFitter::Record> theIOSmootherToken;
0089 const edm::ESGetToken<TrajectorySmoother, TrajectoryFitter::Record> theOISmootherToken;
0090 const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> theTkRecHitBuildToken;
0091 const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> theMuonRecHitBuildToken;
0092 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> theTopologyToken;
0093
0094 edm::ESHandle<Propagator> thePropagatorIO;
0095 edm::ESHandle<Propagator> thePropagatorOI;
0096
0097 edm::ESHandle<Propagator> propagator(bool) const;
0098
0099 unsigned long long theCacheId_TC;
0100 unsigned long long theCacheId_GTG;
0101 unsigned long long theCacheId_MG;
0102 unsigned long long theCacheId_TRH;
0103
0104 bool theRPCInTheFit;
0105 int theSkipStationDT;
0106 int theSkipStationCSC;
0107 int theSkipWheelDT;
0108 int theTrackerSkipSystem;
0109 int theTrackerSkipSection;
0110
0111 edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
0112 edm::ESHandle<MagneticField> theMGField;
0113
0114 edm::ESHandle<TrajectoryFitter> theFitterIO;
0115 edm::ESHandle<TrajectoryFitter> theFitterOI;
0116
0117 edm::ESHandle<TrajectorySmoother> theSmootherIO;
0118 edm::ESHandle<TrajectorySmoother> theSmootherOI;
0119
0120 std::string theTrackerRecHitBuilderName;
0121 edm::ESHandle<TransientTrackingRecHitBuilder> theTrackerRecHitBuilder;
0122
0123 std::string theMuonRecHitBuilderName;
0124 edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
0125
0126 const TrackerTopology* tTopo_;
0127 };
0128 #endif