File indexing completed on 2024-04-06 12:28:53
0001 #ifndef MultiHitGeneratorFromPairAndLayers_H
0002 #define MultiHitGeneratorFromPairAndLayers_H
0003
0004
0005
0006
0007
0008
0009
0010 #include <vector>
0011 #include "RecoTracker/TkSeedingLayers/interface/OrderedMultiHits.h"
0012 #include "TrackingTools/TransientTrackingRecHit/interface/SeedingLayerSetsHits.h"
0013 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
0014
0015 namespace edm {
0016 class ParameterSet;
0017 class Event;
0018 class EventSetup;
0019 class ParameterSetDescription;
0020 }
0021 class TrackingRegion;
0022 class HitPairGeneratorFromLayerPair;
0023
0024 class MultiHitGeneratorFromPairAndLayers {
0025 public:
0026 typedef LayerHitMapCache LayerCacheType;
0027
0028 explicit MultiHitGeneratorFromPairAndLayers(const edm::ParameterSet& pset);
0029 virtual ~MultiHitGeneratorFromPairAndLayers();
0030
0031 static void fillDescriptions(edm::ParameterSetDescription& desc);
0032
0033 virtual void initES(const edm::EventSetup& es) = 0;
0034
0035 void init(std::unique_ptr<HitPairGeneratorFromLayerPair>&& pairGenerator, LayerCacheType* layerCache);
0036
0037 virtual void hitSets(const TrackingRegion& region,
0038 OrderedMultiHits& trs,
0039 const edm::Event& ev,
0040 const edm::EventSetup& es,
0041 SeedingLayerSetsHits::SeedingLayerSet pairLayers,
0042 std::vector<SeedingLayerSetsHits::SeedingLayer> thirdLayers) = 0;
0043
0044 virtual void hitTriplets(const TrackingRegion& region,
0045 OrderedMultiHits& result,
0046 const HitDoublets& doublets,
0047 const RecHitsSortedInPhi** thirdHitMap,
0048 const std::vector<const DetLayer*>& thirdLayerDetLayer,
0049 const int nThirdLayers) = 0;
0050
0051 const HitPairGeneratorFromLayerPair& pairGenerator() const { return *thePairGenerator; }
0052
0053 void clear();
0054
0055 protected:
0056 using cacheHitPointer = std::unique_ptr<BaseTrackerRecHit>;
0057 using cacheHits = std::vector<cacheHitPointer>;
0058 cacheHits cache;
0059
0060 std::unique_ptr<HitPairGeneratorFromLayerPair> thePairGenerator;
0061 LayerCacheType* theLayerCache;
0062 const unsigned int theMaxElement;
0063 };
0064 #endif