File indexing completed on 2024-04-06 12:21:55
0001 #ifndef L1Trigger_TrackFindingTracklet_interface_PurgeDuplicate_h
0002 #define L1Trigger_TrackFindingTracklet_interface_PurgeDuplicate_h
0003
0004 #include "L1Trigger/TrackFindingTracklet/interface/TrackFitMemory.h"
0005 #include "L1Trigger/TrackFindingTracklet/interface/CleanTrackMemory.h"
0006 #include "L1Trigger/TrackFindingTracklet/interface/ProcessBase.h"
0007
0008 #include <vector>
0009
0010
0011
0012
0013
0014
0015
0016
0017 namespace trklet {
0018
0019 class Settings;
0020 class Globals;
0021 class MemoryBase;
0022 class Stub;
0023 class L1TStub;
0024 class Track;
0025 class Tracklet;
0026
0027 class PurgeDuplicate : public ProcessBase {
0028 public:
0029 PurgeDuplicate(std::string name, Settings const& settings, Globals* global);
0030
0031 ~PurgeDuplicate() override = default;
0032
0033 void addOutput(MemoryBase* memory, std::string output) override;
0034 void addInput(MemoryBase* memory, std::string input) override;
0035
0036 void execute(std::vector<Track>& outputtracks, unsigned int iSector);
0037
0038 private:
0039 double getPhiRes(Tracklet* curTracklet, const Stub* curStub) const;
0040 bool isSeedingStub(int, int, int) const;
0041 std::string l1tinfo(const L1TStub*, std::string) const;
0042 std::pair<int, int> findLayerDisk(const Stub*) const;
0043
0044 std::vector<double> getInventedCoords(unsigned int, const Stub*, const Tracklet*) const;
0045
0046 std::vector<double> getInventedCoordsExtended(unsigned int, const Stub*, const Tracklet*) const;
0047
0048 std::vector<const Stub*> getInventedSeedingStub(unsigned int,
0049 const Tracklet*,
0050 const std::vector<const Stub*>&) const;
0051
0052 unsigned int findRinvBin(const Tracklet* trk) const;
0053
0054 unsigned int findPhiBin(const Tracklet* trk) const;
0055
0056 std::vector<unsigned int> findOverlapRinvBins(const Tracklet* trk) const;
0057
0058 std::vector<unsigned int> findOverlapPhiBins(const Tracklet* trk) const;
0059
0060 bool isTrackInBin(const std::vector<unsigned int>& vec, unsigned int num) const;
0061
0062 std::vector<Track*> inputtracks_;
0063 std::vector<std::vector<const Stub*>> inputstublists_;
0064 std::vector<std::vector<std::pair<int, int>>> inputstubidslists_;
0065 std::vector<std::vector<std::pair<int, int>>> mergedstubidslists_;
0066 std::vector<TrackFitMemory*> inputtrackfits_;
0067 std::vector<Tracklet*> inputtracklets_;
0068 std::vector<CleanTrackMemory*> outputtracklets_;
0069 };
0070
0071 };
0072 #endif