Skip to content

Commit

Permalink
Merge pull request cms-sw#10 from SegmentLinking/CMSSW_13_0_0_pre4_LS…
Browse files Browse the repository at this point in the history
…T_removeExtraTCInfo

Remove extra TC info
  • Loading branch information
YonsiG authored Jun 2, 2023
2 parents 2b2e194 + f4ed18b commit b0c96de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
12 changes: 0 additions & 12 deletions RecoTracker/LST/interface/LSTOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,22 @@ class LSTOutput {

void setLSTOutputTraits(std::vector<std::vector<unsigned int>> hitIdx,
std::vector<unsigned int> len,
std::vector<float> pt,
std::vector<float> eta,
std::vector<float> phi,
std::vector<int> seedIdx,
std::vector<short> trackCandidateType) {
hitIdx_ = hitIdx;
len_ = len;
pt_ = pt;
eta_ = eta;
phi_ = phi;
seedIdx_ = seedIdx;
trackCandidateType_ = trackCandidateType;
}

std::vector<std::vector<unsigned int>> const& hitIdx() const { return hitIdx_; }
std::vector<unsigned int> const& len() const { return len_; }
std::vector<float> const& pt() const { return pt_; }
std::vector<float> const& eta() const { return eta_; }
std::vector<float> const& phi() const { return phi_; }
std::vector<int> const& seedIdx() const { return seedIdx_; }
std::vector<short> const& trackCandidateType() const { return trackCandidateType_; }

private:
std::vector<std::vector<unsigned int>> hitIdx_;
std::vector<unsigned int> len_;
std::vector<float> pt_;
std::vector<float> eta_;
std::vector<float> phi_;
std::vector<int> seedIdx_;
std::vector<short> trackCandidateType_;
};
Expand Down
12 changes: 3 additions & 9 deletions RecoTracker/LST/plugins/LSTOutputConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ void LSTOutputConverter::produce(edm::StreamID, edm::Event& iEvent, const edm::E
// Vector definitions
std::vector<std::vector<unsigned int>> const& lstTC_hitIdx = lstOutput.hitIdx();
std::vector<unsigned int> const& lstTC_len = lstOutput.len();
std::vector<float> const& lstTC_pt = lstOutput.pt();
std::vector<float> const& lstTC_eta = lstOutput.eta();
std::vector<float> const& lstTC_phi = lstOutput.phi();
std::vector<int> const& lstTC_seedIdx = lstOutput.seedIdx();
std::vector<short> const& lstTC_trackCandidateType = lstOutput.trackCandidateType();

Expand All @@ -121,8 +118,7 @@ void LSTOutputConverter::produce(edm::StreamID, edm::Event& iEvent, const edm::E

LogDebug("LSTOutputConverter") << "lstTC size " << lstTC_len.size();
for (unsigned int i = 0; i < lstTC_len.size(); i++) {
LogDebug("LSTOutputConverter") << " cand " << i << " " << lstTC_len[i] << " " << lstTC_pt[i] << " " << lstTC_eta[i]
<< " " << lstTC_phi[i] << " " << lstTC_seedIdx[i];
LogDebug("LSTOutputConverter") << " cand " << i << " " << lstTC_len[i] << " " << lstTC_seedIdx[i];
TrajectorySeed seed;
if (lstTC_trackCandidateType[i] != LSTOutput::LSTTCType::T5)
seed = pixelSeeds[lstTC_seedIdx[i]];
Expand Down Expand Up @@ -177,8 +173,7 @@ void LSTOutputConverter::produce(edm::StreamID, edm::Event& iEvent, const edm::E
seedCreator_->makeSeed(seeds, hitsForSeed);
if (seeds.empty()) {
edm::LogInfo("LSTOutputConverter")
<< "failed to convert a LST object to a seed" << i << " " << lstTC_len[i] << " " << lstTC_pt[i] << " "
<< lstTC_eta[i] << " " << lstTC_phi[i] << " " << lstTC_seedIdx[i];
<< "failed to convert a LST object to a seed" << i << " " << lstTC_len[i] << " " << lstTC_seedIdx[i];
if (lstTC_trackCandidateType[i] == LSTOutput::LSTTCType::T5)
continue;
}
Expand Down Expand Up @@ -210,8 +205,7 @@ void LSTOutputConverter::produce(edm::StreamID, edm::Event& iEvent, const edm::E
}
} else {
edm::LogInfo("LSTOutputConverter") << "Failed to make a candidate initial state. Seed state is " << tsos
<< " TC cand " << i << " " << lstTC_len[i] << " " << lstTC_pt[i] << " "
<< lstTC_eta[i] << " " << lstTC_phi[i] << " " << lstTC_seedIdx[i]
<< " TC cand " << i << " " << lstTC_len[i] << " " << lstTC_seedIdx[i]
<< " first hit " << recHits.front().globalPosition() << " last hit "
<< recHits.back().globalPosition();
}
Expand Down
3 changes: 1 addition & 2 deletions RecoTracker/LST/plugins/alpaka/LSTProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
void produce(edm::Event& event, edm::EventSetup const&) override {
// Output
LSTOutput lstOutput;
lstOutput.setLSTOutputTraits(
lst_.hits(), lst_.len(), lst_.pt(), lst_.eta(), lst_.phi(), lst_.seedIdx(), lst_.trackCandidateType());
lstOutput.setLSTOutputTraits(lst_.hits(), lst_.len(), lst_.seedIdx(), lst_.trackCandidateType());

event.emplace(lstOutputToken_, std::move(lstOutput));
}
Expand Down

0 comments on commit b0c96de

Please sign in to comment.