~maus-maintainers/maus/merge

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/MinuitTrackFitter.cc

  • Committer: Peter G Lane
  • Date: 2014-01-02 21:14:30 UTC
  • mto: (663.40.7 merge)
  • mto: This revision was merged to the branch mainline in revision 693.
  • Revision ID: lane@shibuya-20140102211430-9ijm1wztx55j1zs0
Fixed typo in configuration defaults. Fixed particle event and detector associations in raw and reconstructed track points.

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
  Double_t args[2] = {max_iterations, max_EDM};
197
197
  minimizer->mnexcm(method.c_str(), args, 2, err);
198
198
 
 
199
  // Get the particle event for this track
 
200
  GlobalDS::TrackPointCPArray raw_points = raw_track->GetTrackPoints();
 
201
  size_t particle_event = raw_points[0]->get_particle_event();
 
202
 
199
203
  DataStructureHelper helper = DataStructureHelper::GetInstance();
200
204
 
 
205
  // Add a TrackPoint to the recon track for the fit primary
201
206
  PhaseSpaceVector fit_primary;
202
207
  for (size_t index = 0; index < kPhaseSpaceDimension; ++index) {
203
208
    Double_t value, error;
212
217
        optics_model_->primary_plane(),
213
218
        particle_id_);
214
219
    track_point.set_mapper_name(mapper_name);
 
220
    track_point.set_detector(MAUS::DataStructure::Global::kUndefined);
 
221
    track_point.set_particle_event(particle_event);
215
222
    track->AddTrackPoint(new TrackPoint(track_point));
216
223
  } catch (Exception exception) {
217
224
      std::cerr << "DEBUG MinuitTrackFitter::ScoreTrack: "
221
228
  }
222
229
 
223
230
 
224
 
  // Reconstruct the fit track from the fit primary
225
 
  GlobalDS::TrackPointCPArray raw_points = raw_track->GetTrackPoints();
226
 
  size_t particle_event = raw_points[0]->get_particle_event();
 
231
  // Add the fit points to the recon track by transporting the fit primary
227
232
  GlobalDS::TrackPointCPArray::const_iterator raw_point = raw_points.begin();
228
233
  for (; raw_point != raw_points.end(); ++raw_point) {
229
234
    // transport the fit primary to the desired z-position
243
248
 
244
249
    track_point.set_particle_event(particle_event);
245
250
    track_point.set_mapper_name(mapper_name);
 
251
    track_point.set_detector((*raw_point)->get_detector());
246
252
    track->AddTrackPoint(new TrackPoint(track_point));
247
253
  }
248
254
  track->set_pid(raw_track->get_pid());