Go to the documentation of this file.00001 #ifndef RecoMuon_GlobalTrackingTools_DynamicTruncation_h
00002 #define RecoMuon_GlobalTrackingTools_DynamicTruncation_h
00003
00020 #include <memory>
00021 #include "RecoMuon/GlobalTrackingTools/interface/DirectTrackerNavigation.h"
00022 #include "FWCore/Framework/interface/Frameworkfwd.h"
00023 #include "FWCore/Framework/interface/EDAnalyzer.h"
00024 #include "FWCore/Framework/interface/Event.h"
00025 #include "FWCore/Framework/interface/MakerMacros.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 #include "DataFormats/TrackReco/interface/Track.h"
00028 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00029 #include "SimTracker/Records/interface/TrackAssociatorRecord.h"
00030 #include "SimTracker/TrackAssociation/interface/TrackAssociatorByChi2.h"
00031 #include "SimTracker/TrackAssociation/interface/TrackAssociatorByHits.h"
00032 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00033 #include "RecoMuon/GlobalTrackingTools/interface/StateSegmentMatcher.h"
00034 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
00035 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00036 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00037 #include "RecoMuon/Navigation/interface/MuonNavigableLayer.h"
00038 #include "TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h"
00039 #include "RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h"
00040 #include "RecoTracker/Record/interface/NavigationSchoolRecord.h"
00041 #include "TrackingTools/DetLayers/interface/NavigationSetter.h"
00042 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
00043 #include "RecoMuon/Navigation/interface/DirectMuonNavigation.h"
00044
00045
00046 class DynamicTruncation {
00047
00048 public:
00049
00050 typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
00051 typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
00052
00053 DynamicTruncation(const edm::Event&, const MuonServiceProxy&);
00054
00055 ~DynamicTruncation();
00056
00057
00058 void setThr(int, int);
00059
00060
00061 TransientTrackingRecHit::ConstRecHitContainer filter(const Trajectory&);
00062
00063
00064 std::vector<double> getEstimators() {return estimators;};
00065
00066 private:
00067
00068 void compatibleDets(TrajectoryStateOnSurface&, std::map<int, std::vector<DetId> >&);
00069 void filteringAlgo(std::map<int, std::vector<DetId> >&);
00070 double getBest(std::vector<CSCSegment>&, TrajectoryStateOnSurface&, CSCSegment&);
00071 double getBest(std::vector<DTRecSegment4D>&, TrajectoryStateOnSurface&, DTRecSegment4D&);
00072 void update(TrajectoryStateOnSurface&, ConstRecHitPointer);
00073 void updateWithDThits(ConstRecHitContainer&);
00074 void updateWithCSChits(ConstRecHitContainer&);
00075 ConstRecHitContainer sort(ConstRecHitContainer&);
00076
00077 ConstRecHitContainer result;
00078
00079 int DTThr;
00080 int CSCThr;
00081
00082 edm::ESHandle<Propagator> propagator;
00083 edm::ESHandle<Propagator> propagatorCompatibleDet;
00084 edm::ESHandle<GlobalTrackingGeometry> theG;
00085 edm::ESHandle<CSCGeometry> cscGeom;
00086 edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
00087 edm::ESHandle<TrajectoryStateUpdator> updatorHandle;
00088 edm::ESHandle<MuonDetLayerGeometry> navMuon;
00089 DirectMuonNavigation *navigation;
00090 edm::ESHandle<MagneticField> magfield;
00091 const edm::Event* theEvent;
00092 const edm::EventSetup* theSetup;
00093 std::vector<double> estimators;
00094 TrajectoryStateOnSurface currentState;
00095 };
00096
00097 #endif
00098
00099