CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoMuon/CosmicMuonProducer/interface/GlobalCosmicMuonTrajectoryBuilder.h

Go to the documentation of this file.
00001 #ifndef RecoMuon_CosmicMuonProducer_GlobalCosmicMuonTrajectoryBuilder_H
00002 #define RecoMuon_CosmicMuonProducer_GlobalCosmicMuonTrajectoryBuilder_H
00003 
00012 #include "RecoMuon/TrackingTools/interface/MuonTrajectoryBuilder.h"
00013 #include "DataFormats/Common/interface/Handle.h"
00014 #include "FWCore/Framework/interface/ESHandle.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/Framework/interface/Event.h"
00017 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00018 #include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"
00019 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
00020 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
00021 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
00022 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
00023 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00024 #include "RecoMuon/CosmicMuonProducer/interface/CosmicMuonSmoother.h"
00025 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
00026 #include "RecoMuon/GlobalTrackingTools/interface/GlobalMuonTrackMatcher.h"
00027 
00028 namespace edm {class ParameterSet; class Event; class EventSetup;}
00029 
00030 class Trajectory;
00031 class TrajectoryMeasurement;
00032 class CosmicMuonUtilities;
00033 
00034 class GlobalCosmicMuonTrajectoryBuilder : public MuonTrajectoryBuilder{
00035 
00036 public:
00037   typedef TransientTrackingRecHit::RecHitContainer RecHitContainer;
00038   typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
00039   typedef TransientTrackingRecHit::RecHitPointer RecHitPointer;
00040   typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
00041 
00042   typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
00043   typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
00044   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
00045   typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer;
00046   typedef std::pair<const Trajectory*,reco::TrackRef> TrackCand;
00047 
00049   GlobalCosmicMuonTrajectoryBuilder(const edm::ParameterSet&,const MuonServiceProxy* service);
00050 
00052   virtual ~GlobalCosmicMuonTrajectoryBuilder();
00053 
00055   std::vector<Trajectory*> trajectories(const TrajectorySeed&) {return std::vector<Trajectory*>();}
00056 
00057   const Propagator* propagator() const {return &*theService->propagator(thePropagatorName);}
00058 
00060   virtual CandidateContainer trajectories(const TrackCand&);
00061 
00063   std::vector<TrackCand> match(const TrackCand&, const edm::Handle<reco::TrackCollection>& );
00064 
00065   virtual void setEvent(const edm::Event&);
00066 
00067 private:
00068 
00069   void sortHits(ConstRecHitContainer&, ConstRecHitContainer&, ConstRecHitContainer&);
00070 
00071   ConstRecHitContainer getTransientRecHits(const reco::Track&) const;
00072 
00073   CosmicMuonSmoother* smoother() const {return theSmoother;}
00074 
00075   CosmicMuonUtilities* utilities() const {return smoother()->utilities();}
00076 
00077   bool isTraversing(const reco::Track& tk) const;
00078 
00079   const MuonServiceProxy *theService;
00080 
00081   CosmicMuonSmoother* theSmoother;
00082 
00083   GlobalMuonTrackMatcher* theTrackMatcher;
00084 
00085   std::string thePropagatorName;
00086   edm::InputTag theTkTrackLabel;
00087 
00088   std::string theTrackerRecHitBuilderName;
00089   edm::ESHandle<TransientTrackingRecHitBuilder> theTrackerRecHitBuilder;
00090   
00091   std::string theMuonRecHitBuilderName;
00092   edm::ESHandle<TransientTrackingRecHitBuilder> theMuonRecHitBuilder;
00093 
00094   edm::Handle<reco::TrackCollection> theTrackerTracks;
00095 
00096   bool tkTrajsAvailable;
00097 
00098   const std::vector<Trajectory>* allTrackerTrajs;
00099 
00100   std::string category_;
00101   
00102 };
00103 #endif