Skip to content

Commit b412542

Browse files
committed
Added check on dimension of single step along z
1 parent f4b3edb commit b412542

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

src/SANDKalmanFilter.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,12 @@ void Manager::run()
835835
break;
836836
}
837837
auto nextZ = std::prev(z_to_tracklets_->lower_bound(current_z_), stepLength)->first;
838+
double dZ = (nextZ - current_z_) / 1000;
839+
840+
if (fabs(dZ) > 0.16) {
841+
std::cerr << "Single step along z larger than 16 cm. Stopping this track." << std::endl;
842+
break;
843+
}
838844

839845
auto currentStep = this_track_.getStep(current_step_);
840846
auto filteredStateVector =
@@ -870,7 +876,6 @@ void Manager::run()
870876
// current_stage_ = sand_reco::kf::TrackStep::TrackStateStage::kFiltering;
871877
// continue;
872878
// }
873-
double dZ = (nextZ - current_z_) / 1000;
874879

875880
propagate(dE, dZ, beta);
876881

src/reconstruction.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,9 +1648,6 @@ void ProcessEventWithKF(std::vector<track>& tracks, SANDGeoManager* sand_geo, TG
16481648
sand_reco::tracker::ClusterCollection clusters(sand_geo, sand_reco::tracker::DigitCollection::getDigits(), sand_reco::tracker::ClusterCollection::ClusteringMethod::kCellAdjacency);
16491649

16501650
sand_reco::kf::utils::TrackletMap z_to_tracklets;
1651-
for (const auto& plane : sand_geo->getPlanes()) {
1652-
z_to_tracklets[plane.getPosition().Z()] = {};
1653-
}
16541651

16551652
SANDTrackerUtils::init(sand_geo->getTGeoManager());
16561653

tests/TestKF.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ void processEventWithKF(SANDGeoManager* sand_geo, TG4Event* mc_event, std::vecto
174174
sand_reco::tracker::ClusterCollection clusters(sand_geo, sand_reco::tracker::DigitCollection::getDigits(), sand_reco::tracker::ClusterCollection::ClusteringMethod::kCellAdjacency);
175175

176176
std::map<double, std::vector<Tracklet>> z_to_tracklets;
177-
for (const auto& plane : sand_geo->getPlanes()) {
178-
z_to_tracklets[plane.getPosition().Z()] = {};
179-
}
180177

181178
SANDTrackerUtils::init(sand_geo->getTGeoManager());
182179

@@ -288,15 +285,6 @@ void processEventWithKF(SANDGeoManager* sand_geo, TG4Event* mc_event, std::vecto
288285
}
289286
}
290287

291-
// for (auto& hit : trj.GetHitMap().at(string_to_component[tracker_name])) {
292-
// if (hit.GetStop().Z() > max_z && hit.GetStopMomentum().Z() > 100) {
293-
// max_z = hit.GetStop().Z();
294-
// pi.pos = hit.GetStop().Vect();
295-
// pi.mom = hit.GetStopMomentum();
296-
// to_be_reconstructed = true;
297-
// }
298-
// }
299-
300288
if (!to_be_reconstructed) continue;
301289

302290
double sigma_pos = rand.Gaus(0, SANDTrackerUtils::getSigmaPositionMeasurement() * 1E3);

0 commit comments

Comments
 (0)