Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:48

0001 #ifndef HitTripletGenerator_H
0002 #define HitTripletGenerator_H
0003 
0004 /** abstract interface for generators of hit triplets pairs
0005  *  compatible with a TrackingRegion.
0006  */
0007 
0008 #include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h"
0009 #include "RecoPixelVertexing/PixelTriplets/interface/OrderedHitTriplets.h"
0010 
0011 #include "FWCore/Utilities/interface/RunningAverage.h"
0012 
0013 class TrackingRegion;
0014 namespace edm {
0015   class Event;
0016   class EventSetup;
0017 }  // namespace edm
0018 #include <vector>
0019 
0020 class HitTripletGenerator : public OrderedHitsGenerator {
0021 public:
0022   HitTripletGenerator(unsigned int size = 500);
0023   HitTripletGenerator(HitTripletGenerator const& other) : localRA(other.localRA.mean()) {}
0024 
0025   ~HitTripletGenerator() override {}
0026 
0027   const OrderedHitTriplets& run(const TrackingRegion& region, const edm::Event& ev, const edm::EventSetup& es) final;
0028 
0029   // temporary interface, for bckwd compatibility
0030   virtual void hitTriplets(const TrackingRegion& reg, OrderedHitTriplets& prs, const edm::EventSetup& es) {}
0031 
0032   virtual void hitTriplets(const TrackingRegion& reg,
0033                            OrderedHitTriplets& prs,
0034                            const edm::Event& ev,
0035                            const edm::EventSetup& es) = 0;
0036 
0037   void clear() final;
0038 
0039 private:
0040   OrderedHitTriplets theTriplets;
0041   edm::RunningAverage localRA;
0042 };
0043 
0044 #endif