Skip to content

Commit

Permalink
merge with Thomas commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalin committed May 13, 2022
1 parent cf2bf6e commit b396b39
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions L1Trigger/TrackFindingTracklet/interface/ChannelAssignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ 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 Down Expand Up @@ -82,8 +80,6 @@ namespace trklet {
std::vector<int> offsetsStubs_;
// max number of seeding layers
int numSeedingLayers_;
// max number of projection layers
int numProjectionLayers_;
};

} // namespace trklet
Expand Down
6 changes: 1 addition & 5 deletions L1Trigger/TrackFindingTracklet/src/ChannelAssignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ namespace trklet {
seedTypesSeedLayers_.emplace_back(pSetSeedTypesSeedLayers.getParameter<vector<int>>(s));
seedTypesProjectionLayers_.emplace_back(pSetSeedTypesProjectionLayers.getParameter<vector<int>>(s));
}
maxNumProjectionLayers_ = 0;
for (const auto& v : seedTypesProjectionLayers_) {
maxNumProjectionLayers_ = max(maxNumProjectionLayers_, (int) v.size());
}
auto acc = [](int& sum, vector<int> ints) { return sum += (int)ints.size(); };
numChannelsStub_ = accumulate(seedTypesProjectionLayers_.begin(), seedTypesProjectionLayers_.end(), 0, acc);
offsetsStubs_.reserve(numSeedTypes_);
Expand Down Expand Up @@ -114,7 +110,7 @@ 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_ =
maxNumProjectionLayers_ =
max_element(seedTypesProjectionLayers_.begin(), seedTypesProjectionLayers_.end(), bigger)->size();
}

Expand Down

0 comments on commit b396b39

Please sign in to comment.