CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoMuon/MeasurementDet/interface/MuonDetLayerMeasurements.h

Go to the documentation of this file.
00001 #ifndef MeasurementDet_MuonDetLayerMeasurements_H
00002 #define MeasurementDet_MuonDetLayerMeasurements_H
00003 
00013 #include "FWCore/Framework/interface/Event.h"
00014 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00015 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
00016 #include "TrackingTools/PatternTools/interface/MeasurementEstimator.h"
00017 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
00018 //#include "TrackingTools/ementDet/interface/TrajectoryMeasurement.h"
00019 #include "TrackingTools/MeasurementDet/interface/TrajectoryMeasurementGroup.h"
00020 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00021 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
00022 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
00023 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
00024 #include "FWCore/Utilities/interface/InputTag.h"
00025 
00026 #include <vector>
00027 
00028 class DetLayer;
00029 class GeomDet;
00030 class TrajectoryMeasurement;
00031 
00032 
00033 //FIXME: these typedefs MUST GO inside the scope of MuonDetLayerMeasurements
00034 typedef std::vector<TrajectoryMeasurement>          MeasurementContainer;
00035 typedef std::pair<const GeomDet*,TrajectoryStateOnSurface> DetWithState;
00036 
00037 
00038 class MuonDetLayerMeasurements {
00039  public:
00040   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
00041 
00042   MuonDetLayerMeasurements(edm::InputTag dtlabel,
00043                            edm::InputTag csclabel,
00044                            edm::InputTag rpclabel,
00045                            bool enableDT = true,
00046                            bool enableCSC = true,
00047                            bool enableRPC = true);
00048   
00049   virtual ~MuonDetLayerMeasurements();
00050   
00051   // for a given det and state.  Not clear when the fastMeasurements below
00052   //  should be used, since it isn't passed a GeomDet
00053   MeasurementContainer
00054     measurements( const DetLayer* layer,
00055                   const GeomDet * det,
00056                   const TrajectoryStateOnSurface& stateOnDet,
00057                   const MeasurementEstimator& est,
00058                   const edm::Event& iEvent);
00059 
00061   MeasurementContainer
00062     measurements( const DetLayer* layer,
00063                   const TrajectoryStateOnSurface& startingState,
00064                   const Propagator& prop,
00065                   const MeasurementEstimator& est,
00066                   const edm::Event& iEvent);
00067 
00069   MeasurementContainer
00070     fastMeasurements( const DetLayer* layer,
00071                       const TrajectoryStateOnSurface& theStateOnDet,
00072                       const TrajectoryStateOnSurface& startingState,
00073                       const Propagator& prop,
00074                       const MeasurementEstimator& est,
00075                       const edm::Event& iEvent);
00076 
00078   MeasurementContainer
00079     measurements( const DetLayer* layer,
00080                   const TrajectoryStateOnSurface& startingState,
00081                   const Propagator& prop,
00082                   const MeasurementEstimator& est);
00083 
00085   MeasurementContainer
00086     fastMeasurements( const DetLayer* layer,
00087                       const TrajectoryStateOnSurface& theStateOnDet,
00088                       const TrajectoryStateOnSurface& startingState,
00089                       const Propagator& prop,
00090                       const MeasurementEstimator& est);
00091 
00092   std::vector<TrajectoryMeasurementGroup>
00093     groupedMeasurements( const DetLayer* layer,
00094                   const TrajectoryStateOnSurface& startingState,
00095                   const Propagator& prop,
00096                   const MeasurementEstimator& est,
00097                   const edm::Event& iEvent);
00098 
00099   std::vector<TrajectoryMeasurementGroup>
00100     groupedMeasurements( const DetLayer* layer,
00101                   const TrajectoryStateOnSurface& startingState,
00102                   const Propagator& prop,
00103                   const MeasurementEstimator& est);
00104  
00105   void setEvent(const edm::Event &);  
00106 
00108   MuonRecHitContainer recHits(const DetLayer* layer, const edm::Event& iEvent);
00109 
00111   MuonRecHitContainer recHits(const DetLayer* layer);
00112 
00113 
00114  private:
00115 
00117   MuonRecHitContainer recHits(const GeomDet*, const edm::Event& iEvent);
00118 
00120   void checkEvent() const;
00121 
00122   edm::InputTag theDTRecHitLabel;
00123   edm::InputTag theCSCRecHitLabel;
00124   edm::InputTag theRPCRecHitLabel;
00125 
00126   bool enableDTMeasurement;
00127   bool enableCSCMeasurement;
00128   bool enableRPCMeasurement;
00129   
00130   // caches that should get filled once per event
00131   edm::Handle<DTRecSegment4DCollection> theDTRecHits;
00132   edm::Handle<CSCSegmentCollection>     theCSCRecHits;
00133   edm::Handle<RPCRecHitCollection>      theRPCRecHits;
00134 
00135   void checkDTRecHits();
00136   void checkCSCRecHits();
00137   void checkRPCRecHits();
00138 
00139   // keeps track of which event the cache holds
00140   edm::EventID theDTEventID;
00141   edm::EventID theCSCEventID;
00142   edm::EventID theRPCEventID;
00143 
00144   const edm::Event* theEvent;   
00145 
00146   // strings to uniquely identify current process
00147   std::string theDTCheckName;
00148   std::string theRPCCheckName;
00149   std::string theCSCCheckName;
00150 };
00151 #endif
00152