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