File indexing completed on 2024-04-06 12:28:50
0001 #ifndef LayerWithHits_H
0002 #define LayerWithHits_H
0003
0004 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0005 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0006 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
0007 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2DCollection.h"
0008 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0009 #include "DataFormats/Common/interface/DetSetAlgorithm.h"
0010 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0011
0012 class LayerWithHits {
0013 public:
0014 LayerWithHits(const DetLayer* dl, const std::vector<const TrackingRecHit*>& theInputHits)
0015 : theDetLayer(dl), theHits(theInputHits) {}
0016
0017
0018
0019
0020
0021
0022 template <typename DSTV, typename SEL>
0023 LayerWithHits(const DetLayer* dl, DSTV const& allhits, SEL const& sel) {
0024 theDetLayer = dl;
0025 edmNew::copyDetSetRange(allhits, theHits, sel);
0026 }
0027
0028
0029 ~LayerWithHits() {}
0030
0031
0032 const std::vector<const TrackingRecHit*>& recHits() const { return theHits; }
0033
0034
0035 const DetLayer* layer() const { return theDetLayer; }
0036
0037 private:
0038 const DetLayer* theDetLayer;
0039 std::vector<const TrackingRecHit*> theHits;
0040 };
0041 #endif