Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTC_merge2 branch updated to 1130 #74

Merged
merged 48 commits into from
Apr 11, 2021
Merged

Conversation

skinnari
Copy link

@skinnari skinnari commented Mar 2, 2021

TEST: Anders' DTC_merge2 branch manual porting

~4 large changes (use of new DTC code; TrackletConfigBuilder; updates to combined modules; and cleanup of the Projection and Residuals classes (no longer separate for Disk and Layers). But also lots of small cleanup.

skinnari and others added 30 commits March 2, 2021 19:37
…implifies/unifies the code and makes it similar to the HLS
…d then move to the next sector. This saves memory
writeVMTable(settings_.tablePath(), "VMTableOuter" + fnamesuffix + ".tab", vmrtabletedisk_);
}
}
// write disk teouter tables (D1, D2, D4)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation problems here

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more than indentation - a { was misplaced. Has been corrected.

@skinnari skinnari assigned skinnari and unassigned skinnari Apr 2, 2021
@@ -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_); }

//Almost full if writer ptr incremented by 1 or 2 is same as read ptr
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment for "nearfull" is identical to that of "almostfull" - can they be made more meaningful to distinguish?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed comment.

@@ -0,0 +1,53 @@
// This holds two classes: L1SimTrack (truth level simulated track), and SLHCEvent (support for maintaining standalone running)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix comment, this now holds just one class "L1SimTrack"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - comment made relevant to the class.

@@ -43,10 +38,14 @@ namespace trklet {

unsigned int layer() const { return layer_; }
int disk() const {
if (layerdisk_ < 6) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 => N_LAYER ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

if (layerdisk_ < 6) {
return 0;
}
int disk = layerdisk_ - 5;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 => "(N_LAYER-1)" ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

unsigned int nrzbin,
unsigned int rzbin,
unsigned int iphi,
int shift,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this "formatting" makes me suspect that code formats have not been run? (in cmssw: scram b code-format )

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the reformat command (53 files updated)

}

int lutval = -1;
if (iSeed_ < 6) { //FIXME should only be one table...
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix fixme?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not now - need non-trivial coordination with HLS development.

assert(ireg * nbins + ibin < outervmstubs_->nBin());
int nstubs = outervmstubs_->nVMStubsBinned(ireg * nbins + ibin);

if (print)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cout

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

continue;

int absz = std::abs(stub->z().value());
if (layerdisk_ == 1 && absz < 50.0 / settings_.kz(layerdisk_))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the 50.0, 95.0, 55.0, 70.0 ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cut on z or r position - replaced with more meaningful constants.

if (bin < 0)
bin = 0;
if (bin >= NBINS / 2)
bin = NBINS / 2 - 1;
//bin = NBINS / 2 - 1;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's going on here? should this out-commented be deleted or is it a temporary fix?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be deleted - now done.

@@ -7,9 +7,15 @@
<use name="root"/>
<use name="heppdt"/>
<use name="CommonTools/UtilAlgos"/>
<use name="CondFormats/Alignment"/>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be a fail in merging. this build file has been cleaned up by central CMSSW so these changes should be reverted.

@skinnari
Copy link
Author

skinnari commented Apr 2, 2021

@aryd @tomalin @pwittich

i made a bunch of comments as i went through this code, to keep track on things that need to be fixed minimally prior to making a PR to central CMSSW. it's just cosmetics, so if this is needed for HLS developments i can merge it and we get the cleanups implemented separately?

this is assuming that tracking performance is still good, which I am in the process of checking too.

@skinnari
Copy link
Author

skinnari commented Apr 2, 2021

Update on performance @aryd

-- displaced tracking crashes on first event (maybe this was known already, lost track):

cmsRun: /afs/cern.ch/work/s/skinnari/workarea/L1TK/PR_new/CMSSW_11_3_0_pre3/src/L1Trigger/TrackFindingTracklet/src/Sector.cc:103: bool trklet::Sector::addStub(trklet::L1TStub, std::string): Assertion `nadd == 1' failed.

-- performance comparison is attached for hybrid tracking with ttbar + PU200: efficiency is slightly reduced in particular for negative eta, it seems.

L1TK-comparison_2april2021.pdf

@aryd
Copy link

aryd commented Apr 2, 2021 via email

@skinnari skinnari merged commit 15d2ee6 into L1TK-dev-11_3_0_pre3 Apr 11, 2021
skinnari added a commit that referenced this pull request May 20, 2021
* 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>
skinnari added a commit that referenced this pull request Jun 8, 2021
* 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>
skinnari added a commit that referenced this pull request Jun 22, 2021
* 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>
skinnari added a commit that referenced this pull request Jun 22, 2021
* 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>
skinnari added a commit that referenced this pull request Jul 9, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants