Skip to content

Commit 64b8e48

Browse files
committed
Small fixes
1 parent a461be0 commit 64b8e48

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/SANDKalmanFilter.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,9 @@ TMatrixD Manager::getAMatrix(
221221
TMatrixD covarianceMatrixNextPredictedInverted(TMatrixD::kInverted,
222222
covarianceMatrixNextPredicted);
223223

224-
TDecompChol chol(covarianceMatrixNextPredicted);
225-
chol.Invert();
226-
TMatrixD covarianceMatrixNextPredictedInverted2(covarianceMatrixNextPredicted);
227-
228224
TMatrixD propagatorMatrixTransposed(TMatrixD::kTransposed, propagatorMatrix);
229225
return covarianceMatrixFiltered * propagatorMatrixTransposed *
230-
covarianceMatrixNextPredictedInverted2;
226+
covarianceMatrixNextPredictedInverted;
231227
}
232228

233229
double Manager::deltaRadius(

tests/TestKF.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ void processEventWithKF(SANDGeoManager* sand_geo, TG4Event* mc_event, std::vecto
201201
std::vector<SParticleInfo> particleInfos;
202202
std::map<double, std::vector<TVectorD>> z_to_best_tracklet;
203203

204-
double sigma_pos = rand.Gaus(0, SANDTrackerUtils::getSigmaPositionMeasurement() * 1E3);
205-
double sigma_mom = rand.Gaus(0, SANDTrackerUtils::getSigmaAngleMeasurement());
206204
std::vector<int> indeces;
207205
int ii = -1;
208206
for (auto trj:primaryTrj) {
@@ -244,6 +242,10 @@ void processEventWithKF(SANDGeoManager* sand_geo, TG4Event* mc_event, std::vecto
244242
}
245243

246244
if (!to_be_reconstructed) continue;
245+
246+
double sigma_pos = rand.Gaus(0, SANDTrackerUtils::getSigmaPositionMeasurement() * 1E3);
247+
double sigma_mom = 0.05;
248+
247249
double x_smeared = rand.Gaus(pi.pos.X(), sigma_pos);
248250
double y_smeared = rand.Gaus(pi.pos.Y(), sigma_pos);
249251
double px_smeared = pi.mom.X() * rand.Gaus(1, sigma_mom);
@@ -332,7 +334,7 @@ int main(int argc, char* argv[])
332334
TH1D* theta_y_res = new TH1D("theta_y_res", "theta_y_res", 1000, -1, 1);
333335
TH1D* theta_x_res = new TH1D("theta_x_res", "theta_x_res", 1000, -1, 1);
334336
TH1D* mom_res = new TH1D("mom_res", "mom_res", 1000, -1000, 1000);
335-
TH1D* chi2 = new TH1D("chi2", "chi2", 1000, 0, 50);
337+
TH1D* chi2 = new TH1D("chi2", "chi2", 1000, 0, 100000);
336338
SANDGeoManager sand_geo;
337339
sand_geo.init(geo);
338340

0 commit comments

Comments
 (0)