Skip to content

Commit

Permalink
DTC_merge2 branch updated to 1130 (#74)
Browse files Browse the repository at this point in the history
* Anders DTC merge with a gazillion manual fixes

* propagate buildfile fixes

* code formats

* fix cherrypick  mess up

* Remove LayerProjection class

* Further cleanup of tracklet projections interface

* Correct number of processing steps by changing < to <=

* Add missing include of algorithm

* Remove extra const

* Remove some commented out code

* Remove duplicate code

* Fix message logger and DTC Stub for consistency with hybrid configuration

* Fix problem with writing of input link memories

* Create Residual class that will replace LayerResidual and DiskResidual

* Remove the use of the class DiskResiduals

* Remove unused nMatch and nMatchDisk method of Tracklet

* (Re-)Implement the correction to writing the DTC data link file after moving functionality to Sector.

* Combine addMatch method for disk and layers into on method

* combine the disk and layer match into one method

* Remove some redundant poiters to l1tstubs

* Pass iSeed to Tracklet

* Introduce an InputRouter module. Does not change functionality, but simplifies/unifies the code and makes it similar to the HLS

* Cleanup of writing the DTC link files

* Change processing order such that all steps in one sector are done and then move to the next sector. This saves memory

* Interface updates for CMSSW following change to module processing order

* Change in VMRouter to processing PS links before 2S in disks

* Cleanup of unused iSector variable in processs and memory modules

* Fixes to make the HybridTracks_cfg.py run

* Cleanup of hardcoded numbers etc.

* Updates to MP to put all regions into one memory slot in the ProjectionTemp

* Fix to calculation of irinv for projections - no matches what is done in HLS

* Remove now unused file paths for the old cable mapping code

* Correct missplaced curly bracket

* Fixes for the displaced tracking

* Fix to avoid duplicate VMSTE name in D1 for standard configuration

* Address comments from Louise S.

* Ran scram b code-format

* Address comments from Louise S.

* Addressing more comments from Louise S.

* More fixes to comments

* Make running hybrid default (not displaced)

* restore buildfile

* Add DTC link config to Settings.h

* Changes to suppress warning in MatchCalculator when running displaced tracking

* Fix typo introduced in code cleanup for MatchProcessor

Co-authored-by: Anders Ryd <ar322@cornell.edu>
Co-authored-by: Anders <aryd@cern.ch>
  • Loading branch information
3 people committed Jun 22, 2021
1 parent 2e2faca commit cf9ac02
Show file tree
Hide file tree
Showing 127 changed files with 5,229 additions and 4,545 deletions.
37 changes: 37 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/AllInnerStubsMemory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef L1Trigger_TrackFindingTracklet_interface_AllInnerStubsMemory_h
#define L1Trigger_TrackFindingTracklet_interface_AllInnerStubsMemory_h

#include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"

#include <utility>
#include <string>
#include <vector>

namespace trklet {

class Settings;
class Stub;
class L1TStub;

class AllInnerStubsMemory : public MemoryBase {
public:
AllInnerStubsMemory(std::string name, Settings const& settings);

~AllInnerStubsMemory() override = default;

void addStub(const Stub* stub) { stubs_.push_back(stub); }

unsigned int nStubs() const { return stubs_.size(); }

const Stub* getStub(unsigned int i) const { return stubs_[i]; }

void clean() override { stubs_.clear(); }

void writeStubs(bool first, unsigned int iSector);

private:
std::vector<const Stub*> stubs_;
};

}; // namespace trklet
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace trklet {

class AllProjectionsMemory : public MemoryBase {
public:
AllProjectionsMemory(std::string name, Settings const& settings, unsigned int iSector);
AllProjectionsMemory(std::string name, Settings const& settings);

~AllProjectionsMemory() override = default;

Expand All @@ -25,7 +25,7 @@ namespace trklet {

void clean() override { tracklets_.clear(); }

void writeAP(bool first);
void writeAP(bool first, unsigned int iSector);

private:
std::vector<Tracklet*> tracklets_;
Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/TrackFindingTracklet/interface/AllStubsMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace trklet {

class AllStubsMemory : public MemoryBase {
public:
AllStubsMemory(std::string name, Settings const& settings, unsigned int iSector);
AllStubsMemory(std::string name, Settings const& settings);

~AllStubsMemory() override = default;

Expand All @@ -27,7 +27,7 @@ namespace trklet {

void clean() override { stubs_.clear(); }

void writeStubs(bool first);
void writeStubs(bool first, unsigned int iSector);

private:
std::vector<const Stub*> stubs_;
Expand Down
39 changes: 0 additions & 39 deletions L1Trigger/TrackFindingTracklet/interface/Cabling.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace trklet {

class CandidateMatchMemory : public MemoryBase {
public:
CandidateMatchMemory(std::string name, Settings const& settings, unsigned int iSector);
CandidateMatchMemory(std::string name, Settings const& settings);

~CandidateMatchMemory() override = default;

Expand All @@ -28,7 +28,7 @@ namespace trklet {

void clean() override { matches_.clear(); }

void writeCM(bool first);
void writeCM(bool first, unsigned int iSector);

private:
std::vector<std::pair<std::pair<Tracklet*, int>, const Stub*> > matches_;
Expand Down
10 changes: 10 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/CircularBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ namespace trklet {
//Almost full if writer ptr incremented by 1 or 2 is same as read ptr
bool almostfull() const { return (((wptr_ + 1) % size_) == rptr_) || (((wptr_ + 2) % size_) == rptr_); }

//near full if writer ptr incremented by 1, 2, or 3 is same as read ptr
bool nearfull() const {
return (((wptr_ + 1) % size_) == rptr_) || (((wptr_ + 2) % size_) == rptr_) || (((wptr_ + 3) % size_) == rptr_);
}

//Empty buffer is write ptr is same as read ptr
bool empty() const { return wptr_ == rptr_; }

Expand All @@ -47,8 +52,13 @@ namespace trklet {
assert(!full());
buffer_[wptr_++] = element;
wptr_ = wptr_ % size_;
assert(wptr_ != rptr_);
}

unsigned int rptr() const { return rptr_; }

unsigned int wptr() const { return wptr_; }

private:
std::vector<T> buffer_;

Expand Down
4 changes: 2 additions & 2 deletions L1Trigger/TrackFindingTracklet/interface/CleanTrackMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace trklet {

class CleanTrackMemory : public MemoryBase {
public:
CleanTrackMemory(std::string name, Settings const& settings, unsigned int iSector, double phimin, double phimax);
CleanTrackMemory(std::string name, Settings const& settings, double phimin, double phimax);

~CleanTrackMemory() override = default;

Expand All @@ -22,7 +22,7 @@ namespace trklet {

void clean() override { tracks_.clear(); }

void writeCT(bool first);
void writeCT(bool first, unsigned int iSector);

private:
double phimin_;
Expand Down
46 changes: 0 additions & 46 deletions L1Trigger/TrackFindingTracklet/interface/DTC.h

This file was deleted.

34 changes: 0 additions & 34 deletions L1Trigger/TrackFindingTracklet/interface/DTCLink.h

This file was deleted.

38 changes: 38 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/DTCLinkMemory.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// This class holds a list of stubs for an DTC link.
// This modules 'owns' the pointers to the stubs. All subsequent modules that handles stubs uses a pointer to the original stored here.
#ifndef L1Trigger_TrackFindingTracklet_interface_DTCLinkMemory_h
#define L1Trigger_TrackFindingTracklet_interface_DTCLinkMemory_h

#include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"

#include <vector>

namespace trklet {

class Settings;
class Globals;
class Stub;
class L1TStub;

class DTCLinkMemory : public MemoryBase {
public:
DTCLinkMemory(std::string name, Settings const& settings, double, double);

~DTCLinkMemory() override = default;

void addStub(const L1TStub& al1stub, const Stub& stub);

unsigned int nStubs() const { return stubs_.size(); }

Stub* getStub(unsigned int i) { return stubs_[i]; }

void writeStubs(bool first, unsigned int iSector);

void clean() override;

private:
std::vector<Stub*> stubs_;
};

}; // namespace trklet
#endif
Loading

0 comments on commit cf9ac02

Please sign in to comment.