Skip to content

Commit

Permalink
max num of proj layers added to channel assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschuh committed May 13, 2022
1 parent a465123 commit 422361c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions L1Trigger/TrackFindingTracklet/interface/ChannelAssignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ namespace trklet {
int channelId(int seedType, int layerId) const;
// max number of seeding layers
int numSeedingLayers() const { return numSeedingLayers_; }
// max number of projection layers
int numProjectionLayers() const { return numProjectionLayers_; }

private:
// helper class to store configurations
Expand All @@ -76,6 +78,8 @@ namespace trklet {
std::vector<int> offsetsStubs_;
// max number of seeding layers
int numSeedingLayers_;
// max number of projection layers
int numProjectionLayers_;
};

} // namespace trklet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,7 @@ void L1FPGATrackProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
// number of stub channels
const unsigned int numStreamsStub = N_SECTOR * channelAssignment_->numChannelsStub();
// number of stub channels if all seed types streams padded to have same number of stub channels (for coding simplicity)
unsigned int maxNumProjectionLayers = 0;
for (int iSeedType = 0; iSeedType < channelAssignment_->numSeedTypes(); iSeedType++) {
maxNumProjectionLayers =
max(maxNumProjectionLayers, (unsigned int)channelAssignment_->numProjectionLayers(iSeedType));
}
const unsigned int maxNumProjectionLayers = channelAssignment_->numProjectionLayers();
const unsigned int numStreamsStubRaw = numStreamsTrack * maxNumProjectionLayers;

// Streams formatted to allow this code to run outside CMSSW.
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/TrackFindingTracklet/src/ChannelAssignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ namespace trklet {
}
auto bigger = [](const vector<int>& lhs, const vector<int>& rhs) { return lhs.size() < rhs.size(); };
numSeedingLayers_ = max_element(seedTypesSeedLayers_.begin(), seedTypesSeedLayers_.end(), bigger)->size();
numProjectionLayers_ =
max_element(seedTypesProjectionLayers_.begin(), seedTypesProjectionLayers_.end(), bigger)->size();
}

// sets channelId of given TTTrackRef, return false if track outside pt range
Expand Down

0 comments on commit 422361c

Please sign in to comment.