SND@LHC Software
Loading...
Searching...
No Matches
AbsFitter.cc
Go to the documentation of this file.
1/* Copyright 2008-2010, Technische Universitaet Muenchen,
2 Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3
4 This file is part of GENFIT.
5
6 GENFIT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 GENFIT is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#include "AbsFitter.h"
21#include "Track.h"
22
23namespace genfit {
24
25void AbsFitter::processTrack(Track* tr, bool resortHits) {
26 AbsTrackRep* cardRep = tr->getCardinalRep();
27 // process cardinal rep first
28 processTrackWithRep(tr, cardRep, resortHits);
29
30 // now process rest of reps, but don't change sorting anymore!
31 for (unsigned int i=0; i<tr->getNumReps(); ++i) {
32 if (tr->getTrackRep(i) != cardRep)
33 processTrackWithRep(tr, tr->getTrackRep(i), false);
34 }
35
36 // self check
37 assert(tr->checkConsistency());
38}
39
40} /* End of namespace genfit */
virtual void processTrackWithRep(Track *, const AbsTrackRep *, bool resortHits=false)=0
void processTrack(Track *, bool resortHits=true)
Definition AbsFitter.cc:25
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition Track.h:71
AbsTrackRep * getTrackRep(int id) const
Definition Track.h:127
AbsTrackRep * getCardinalRep() const
Get cardinal track representation.
Definition Track.h:140
bool checkConsistency() const
Definition Track.cc:1192
unsigned int getNumReps() const
Definition Track.h:128
Matrix inversion tools.
Definition AbsBField.h:29