CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoMuon/GlobalTrackingTools/interface/DynamicTruncation.h

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   // Just one thr for DT and one for CSC
00058   void setThr(int, int);
00059   
00060   // Return the vector with the tracker plus the selected muon hits
00061   TransientTrackingRecHit::ConstRecHitContainer filter(const Trajectory&);
00062  
00063  private:
00064 
00065   void                 compatibleDets(TrajectoryStateOnSurface&, std::map<int, std::vector<DetId> >&);
00066   void                 filteringAlgo(std::map<int, std::vector<DetId> >&);
00067   double               getBest(std::vector<CSCSegment>&, TrajectoryStateOnSurface&, CSCSegment&); 
00068   double               getBest(std::vector<DTRecSegment4D>&, TrajectoryStateOnSurface&, DTRecSegment4D&); 
00069   void                 update(TrajectoryStateOnSurface&, ConstRecHitPointer);
00070   void                 updateWithDThits(ConstRecHitContainer&);
00071   void                 updateWithCSChits(ConstRecHitContainer&);
00072   ConstRecHitContainer sort(ConstRecHitContainer&);
00073   
00074   ConstRecHitContainer result;
00075   
00076   int DTThr;
00077   int CSCThr;
00078 
00079   edm::ESHandle<Propagator> propagator;
00080   edm::ESHandle<Propagator> propagatorCompatibleDet;
00081   edm::ESHandle<GlobalTrackingGeometry> theG;
00082   edm::ESHandle<CSCGeometry> cscGeom;
00083   edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
00084   edm::ESHandle<TrajectoryStateUpdator> updatorHandle;
00085   edm::ESHandle<MuonDetLayerGeometry> navMuon;
00086   DirectMuonNavigation *navigation;
00087   edm::ESHandle<MagneticField> magfield;
00088   const edm::Event* theEvent;
00089   const edm::EventSetup* theSetup;
00090 
00091   TrajectoryStateOnSurface currentState;
00092 };
00093 
00094 #endif
00095 
00096