File indexing completed on 2024-09-07 04:37:46
0001 #ifndef RecoMTD_DetLayers_MTDDetSector_H
0002 #define RecoMTD_DetLayers_MTDDetSector_H
0003
0004 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
0005 #include "DataFormats/GeometrySurface/interface/BoundDiskSector.h"
0006 #include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
0007
0008 #include <ostream>
0009
0010 class GeomDet;
0011
0012 class MTDDetSector : public GeometricSearchDet {
0013 public:
0014 using GeometricSearchDet::GeometricSearchDet;
0015
0016
0017 MTDDetSector(std::vector<const GeomDet*>::const_iterator first,
0018 std::vector<const GeomDet*>::const_iterator last,
0019 const MTDTopology& topo);
0020
0021
0022 MTDDetSector(const std::vector<const GeomDet*>& dets, const MTDTopology& topo);
0023
0024 ~MTDDetSector() override {}
0025
0026
0027
0028 const std::vector<const GeomDet*>& basicComponents() const override { return theDets; }
0029
0030 const BoundSurface& surface() const final { return *theDiskS; }
0031
0032 const std::vector<const GeometricSearchDet*>& components() const override;
0033
0034 std::pair<bool, TrajectoryStateOnSurface> compatible(const TrajectoryStateOnSurface& ts,
0035 const Propagator& prop,
0036 const MeasurementEstimator& est) const override;
0037
0038 std::vector<DetWithState> compatibleDets(const TrajectoryStateOnSurface& startingState,
0039 const Propagator& prop,
0040 const MeasurementEstimator& est) const override;
0041
0042 void compatibleDetsV(const TrajectoryStateOnSurface& startingState,
0043 const Propagator& prop,
0044 const MeasurementEstimator& est,
0045 std::vector<DetWithState>& result) const override;
0046
0047 std::vector<DetGroup> groupedCompatibleDets(const TrajectoryStateOnSurface& startingState,
0048 const Propagator& prop,
0049 const MeasurementEstimator& est) const override;
0050
0051
0052
0053 const BoundDiskSector& specificSurface() const { return *theDiskS; }
0054
0055 void compatibleDetsLine(const size_t idetMin,
0056 std::vector<DetWithState>& result,
0057 const TrajectoryStateOnSurface& tsos,
0058 const Propagator& prop,
0059 const MeasurementEstimator& est) const;
0060
0061 size_t hshift(const uint32_t detid, const int horizontalShift) const;
0062 size_t vshift(const uint32_t detid, const int verticalShift, size_t& closest) const;
0063
0064 protected:
0065 void setDisk(BoundDiskSector* diskS) { theDiskS = diskS; }
0066
0067 bool add(size_t idet,
0068 std::vector<DetWithState>& result,
0069 const TrajectoryStateOnSurface& tsos,
0070 const Propagator& prop,
0071 const MeasurementEstimator& est) const;
0072
0073 private:
0074 ReferenceCountingPointer<BoundDiskSector> theDiskS;
0075 std::vector<const GeomDet*> theDets;
0076
0077 const MTDTopology* topo_;
0078
0079 void init();
0080 };
0081
0082 std::ostream& operator<<(std::ostream&, const MTDDetSector&);
0083
0084 #endif