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 #include "Alignment/MuonAlignment/interface/MuonAlignment.h"
00045
00046
00047 class DynamicTruncation {
00048
00049 public:
00050
00051 typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
00052 typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
00053
00054 DynamicTruncation(const edm::Event&, const MuonServiceProxy&);
00055
00056 ~DynamicTruncation();
00057
00058
00059 void setThr(int, int, int);
00060
00061
00062 TransientTrackingRecHit::ConstRecHitContainer filter(const Trajectory&);
00063
00064
00065 std::vector<double> getEstimators() {return estimators;};
00066
00067 private:
00068
00069 void compatibleDets(TrajectoryStateOnSurface&, std::map<int, std::vector<DetId> >&);
00070 void filteringAlgo(std::map<int, std::vector<DetId> >&);
00071 double getBest(std::vector<CSCSegment>&, TrajectoryStateOnSurface&, CSCSegment&);
00072 double getBest(std::vector<DTRecSegment4D>&, TrajectoryStateOnSurface&, DTRecSegment4D&);
00073 void update(TrajectoryStateOnSurface&, ConstRecHitPointer);
00074 void updateWithDThits(ConstRecHitContainer&);
00075 void updateWithCSChits(ConstRecHitContainer&);
00076 ConstRecHitContainer sort(ConstRecHitContainer&);
00077
00078 ConstRecHitContainer result;
00079
00080 int DTThr;
00081 int CSCThr;
00082 bool useAPE;
00083
00084 edm::ESHandle<Propagator> propagator;
00085 edm::ESHandle<Propagator> propagatorCompatibleDet;
00086 edm::ESHandle<GlobalTrackingGeometry> theG;
00087 edm::ESHandle<CSCGeometry> cscGeom;
00088 edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
00089 edm::ESHandle<TrajectoryStateUpdator> updatorHandle;
00090 edm::ESHandle<MuonDetLayerGeometry> navMuon;
00091 DirectMuonNavigation *navigation;
00092 edm::ESHandle<MagneticField> magfield;
00093 const edm::Event* theEvent;
00094 const edm::EventSetup* theSetup;
00095 std::vector<double> estimators;
00096 TrajectoryStateOnSurface currentState;
00097
00098 std::map<DTChamberId, GlobalError> dtApeMap;
00099 std::map<CSCDetId, GlobalError> cscApeMap;
00100 };
00101
00102 #endif
00103
00104