CMS 3D CMS Logo

PurgeDuplicate.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackFindingTracklet_interface_PurgeDuplicate_h
2 #define L1Trigger_TrackFindingTracklet_interface_PurgeDuplicate_h
3 
7 
8 #include <vector>
9 
10 // Run algorithm to remove duplicate tracks.
11 // Returns Track object that represent output at end of L1 track chain,
12 // (and are later converted to TTTrack). Duplicate Track objects are flagged,
13 // but only deleted if using the Hybrid algo.
14 // Also writes to memory the same tracks in more detailed Tracklet format,
15 // where duplicates are all deleted.
16 
17 namespace trklet {
18 
19  class Settings;
20  class Globals;
21  class MemoryBase;
22  class Stub;
23  class L1TStub;
24  class Track;
25  class Tracklet;
26 
27  class PurgeDuplicate : public ProcessBase {
28  public:
29  PurgeDuplicate(std::string name, Settings const& settings, Globals* global);
30 
31  ~PurgeDuplicate() override = default;
32 
33  void addOutput(MemoryBase* memory, std::string output) override;
34  void addInput(MemoryBase* memory, std::string input) override;
35 
36  void execute(std::vector<Track>& outputtracks_, unsigned int iSector);
37 
38  private:
39  double getPhiRes(Tracklet* curTracklet, const Stub* curStub) const;
40  bool isSeedingStub(int, int, int) const;
41  std::string l1tinfo(const L1TStub*, std::string) const;
42  std::pair<int, int> findLayerDisk(const Stub*) const;
43  // calculate stub coordinates based on tracklet trajectory for prompt tracking
44  std::vector<double> getInventedCoords(unsigned int, const Stub*, const Tracklet*) const;
45  // calculate stub coordinates based on tracklet trajectory for extended tracking
46  std::vector<double> getInventedCoordsExtended(unsigned int, const Stub*, const Tracklet*) const;
47  // return stub with invented x,y,z coords, if it's a seeding one for this tracklet
48  std::vector<const Stub*> getInventedSeedingStub(unsigned int,
49  const Tracklet*,
50  const std::vector<const Stub*>&) const;
51  // return the regular rinvbins which contain the input tracklet
52  unsigned int findVarRInvBin(const Tracklet* trk) const;
53  // return the overlap rinvbins which contain the input tracklet
54  std::vector<unsigned int> findOverlapRInvBins(const Tracklet* trk) const;
55  // sort the tracklets into the correct bin by comparing the overlap rinv bin(s) the tracklets are in to the current bin
56  bool isTrackInBin(const std::vector<unsigned int>& vec, unsigned int num) const;
57 
58  std::vector<Track*> inputtracks_;
59  std::vector<std::vector<const Stub*>> inputstublists_;
60  std::vector<std::vector<std::pair<int, int>>> inputstubidslists_;
61  std::vector<std::vector<std::pair<int, int>>> mergedstubidslists_;
62  std::vector<TrackFitMemory*> inputtrackfits_;
63  std::vector<Tracklet*> inputtracklets_;
64  std::vector<CleanTrackMemory*> outputtracklets_;
65  };
66 
67 }; // namespace trklet
68 #endif
std::vector< std::vector< std::pair< int, int > > > inputstubidslists_
void execute(std::vector< Track > &outputtracks_, unsigned int iSector)
double getPhiRes(Tracklet *curTracklet, const Stub *curStub) const
std::vector< CleanTrackMemory * > outputtracklets_
~PurgeDuplicate() override=default
std::vector< unsigned int > findOverlapRInvBins(const Tracklet *trk) const
std::vector< Track * > inputtracks_
unsigned int findVarRInvBin(const Tracklet *trk) const
static std::string const input
Definition: EdmProvDump.cc:50
std::vector< double > getInventedCoords(unsigned int, const Stub *, const Tracklet *) const
std::vector< double > getInventedCoordsExtended(unsigned int, const Stub *, const Tracklet *) const
std::vector< TrackFitMemory * > inputtrackfits_
bool isTrackInBin(const std::vector< unsigned int > &vec, unsigned int num) const
std::pair< int, int > findLayerDisk(const Stub *) const
void addInput(MemoryBase *memory, std::string input) override
std::vector< Tracklet * > inputtracklets_
std::vector< std::vector< std::pair< int, int > > > mergedstubidslists_
void addOutput(MemoryBase *memory, std::string output) override
std::vector< const Stub * > getInventedSeedingStub(unsigned int, const Tracklet *, const std::vector< const Stub *> &) const
std::vector< std::vector< const Stub * > > inputstublists_
std::string l1tinfo(const L1TStub *, std::string) const
bool isSeedingStub(int, int, int) const
PurgeDuplicate(std::string name, Settings const &settings, Globals *global)