Skip to content

Commit

Permalink
Minor bug fix: require the truth track to be pure (truthProb = 1 for …
Browse files Browse the repository at this point in the history
…the 4-hit track)
  • Loading branch information
fdelzanno committed Jan 25, 2025
1 parent 4f57475 commit f4f4159
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Tracking/include/Tracking/Reco/LinearTruthTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class LinearTruthTracking : public TrackingGeometryUser {
long nevents_{0};
unsigned int ntruth_{0};
long nmissing_{0};
long nempty_{0};

std::vector<double> recoil_truth_uncertainty_{0.006, 0.12};

Expand Down
2 changes: 1 addition & 1 deletion Tracking/src/Tracking/Reco/LinearSeedFinder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ ldmx::StraightTrack LinearSeedFinder::SeedTracker(const std::tuple<std::array<do
} //does not pass the threshold
}

void LinearSeedFinder::onProcessEnd() { //HAVE TO FIX THESE VALUES
void LinearSeedFinder::onProcessEnd() {
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(1)
<< processing_time_ / nevents_ << " ms";
ldmx_log(info) << "Total Seeds/Events: " << nseeds_ << "/" << nevents_;
Expand Down
5 changes: 3 additions & 2 deletions Tracking/src/Tracking/Reco/LinearTruthTracking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void LinearTruthTracking::produce(framework::Event& event) {
straight_truth_tracks.push_back(TruthTracker(truthPoints, firstLayerEcalRecHits));
}
else {
nmissing_++;
nempty_++;
ntruth_ += straight_truth_tracks.size();
return;
}
Expand Down Expand Up @@ -140,6 +140,7 @@ void LinearTruthTracking::onProcessEnd() {
ldmx_log(info) << "AVG Time / Event: " << std::fixed << std::setprecision(1)
<< processing_time_ / nevents_ << " ms";
ldmx_log(info) << "Number of Events without enough seed points: " << nmissing_;
ldmx_log(info) << "Number of Events without trackID == 1 combo: " << nempty_;
ldmx_log(info) << "Total Truth Tracks / Event: " << ntruth_ << "/" << nevents_;
} //onProcessEnd

Expand All @@ -160,7 +161,7 @@ std::vector<ldmx::Measurement> LinearTruthTracking::findTruthHits(const std::vec
for (const auto& hit4 : layer4) {
std::vector<ldmx::Measurement> combination = {hit1, hit2, hit3, hit4};
auto truthInfo = truthMatchingTool_->TruthMatch(combination);
if (truthInfo.trackID == 1.0) {
if (truthInfo.trackID == 1.0 and truthInfo.truthProb == 1.0) {
return combination;
} //if trackID
} //for layer4
Expand Down

0 comments on commit f4f4159

Please sign in to comment.