File indexing completed on 2024-04-06 12:26:50
0001 #ifndef RecoMTD_MeasurementDet_MTDDetLayerMeasurements_H
0002 #define RecoMTD_MeasurementDet_MTDDetLayerMeasurements_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0014 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0015 #include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
0016 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0017 #include "TrackingTools/TransientTrackingRecHit/interface/GenericTransientTrackingRecHit.h"
0018 #include "TrackingTools/MeasurementDet/interface/TrajectoryMeasurementGroup.h"
0019 #include "DataFormats/TrackerRecHit2D/interface/MTDTrackingRecHit.h"
0020
0021 #include "FWCore/Utilities/interface/InputTag.h"
0022 #include "FWCore/Framework/interface/ConsumesCollector.h"
0023
0024 #include <vector>
0025
0026 class DetLayer;
0027 class GeomDet;
0028 class TrajectoryMeasurement;
0029
0030 class MTDDetLayerMeasurements {
0031 public:
0032 typedef std::vector<TrajectoryMeasurement> MeasurementContainer;
0033 typedef std::pair<const GeomDet*, TrajectoryStateOnSurface> DetWithState;
0034 typedef std::vector<GenericTransientTrackingRecHit::RecHitPointer> MTDRecHitContainer;
0035
0036 MTDDetLayerMeasurements(const edm::InputTag& mtdlabel, edm::ConsumesCollector& iC);
0037
0038 virtual ~MTDDetLayerMeasurements();
0039
0040
0041
0042 MeasurementContainer measurements(const DetLayer* layer,
0043 const GeomDet* det,
0044 const TrajectoryStateOnSurface& stateOnDet,
0045 const MeasurementEstimator& est,
0046 const edm::Event& iEvent);
0047
0048
0049 MeasurementContainer measurements(const DetLayer* layer,
0050 const TrajectoryStateOnSurface& startingState,
0051 const Propagator& prop,
0052 const MeasurementEstimator& est,
0053 const edm::Event& iEvent);
0054
0055
0056 MeasurementContainer fastMeasurements(const DetLayer* layer,
0057 const TrajectoryStateOnSurface& theStateOnDet,
0058 const TrajectoryStateOnSurface& startingState,
0059 const Propagator& prop,
0060 const MeasurementEstimator& est,
0061 const edm::Event& iEvent);
0062
0063
0064 MeasurementContainer measurements(const DetLayer* layer,
0065 const TrajectoryStateOnSurface& startingState,
0066 const Propagator& prop,
0067 const MeasurementEstimator& est);
0068
0069
0070 MeasurementContainer fastMeasurements(const DetLayer* layer,
0071 const TrajectoryStateOnSurface& theStateOnDet,
0072 const TrajectoryStateOnSurface& startingState,
0073 const Propagator& prop,
0074 const MeasurementEstimator& est);
0075
0076 std::vector<TrajectoryMeasurementGroup> groupedMeasurements(const DetLayer* layer,
0077 const TrajectoryStateOnSurface& startingState,
0078 const Propagator& prop,
0079 const MeasurementEstimator& est,
0080 const edm::Event& iEvent);
0081
0082 std::vector<TrajectoryMeasurementGroup> groupedMeasurements(const DetLayer* layer,
0083 const TrajectoryStateOnSurface& startingState,
0084 const Propagator& prop,
0085 const MeasurementEstimator& est);
0086
0087 void setEvent(const edm::Event&);
0088
0089
0090 MTDRecHitContainer recHits(const DetLayer* layer, const edm::Event& iEvent);
0091
0092
0093 MTDRecHitContainer recHits(const DetLayer* layer);
0094
0095 private:
0096
0097 MTDRecHitContainer recHits(const GeomDet*, const edm::Event& iEvent);
0098
0099
0100 void checkEvent() const;
0101
0102
0103 template <class T>
0104 T sortResult(T&);
0105
0106 edm::EDGetTokenT<MTDTrackingRecHit> theMTDToken;
0107
0108
0109 edm::Handle<edmNew::DetSetVector<MTDTrackingRecHit>> theMTDRecHits;
0110
0111 void checkMTDRecHits();
0112
0113
0114 edm::Event::CacheIdentifier_t theMTDEventCacheID;
0115
0116 const edm::Event* theEvent;
0117 };
0118 #endif