5 #include "KiTrack/Segment.h"
6 #include "Criteria/ICriterion.h"
109 void addCriteria ( std::vector< ICriterion* > criteria ){ _criteria.insert( _criteria.end() , criteria.begin() , criteria.end() ); }
110 void clearCriteria() { _criteria.clear(); };
165 std::vector < std::vector< IHit* > >
getTracks(
unsigned minHits = 2 );
171 std::vector < std::vector< IHit* > >
getTracksOfSegment ( Segment* segment, std::vector< IHit* > hits ,
unsigned minHits = 2 );
178 unsigned getNumberOfConnections(){
return _nConnections; }
190 std::vector < std::list < Segment* > > _segments;
194 std::vector < ICriterion* > _criteria;
196 unsigned _nConnections;
~Automaton()
delete all the segments
Definition: Automaton.cc:722
A Segment is something like a track or a part of a track: it consists of hits linked together...
Definition: Segment.h:40
void addSegment(Segment *segment)
Adds a segment to the automaton.
Definition: Automaton.cc:10
void cleanBadStates()
Erases all segments that don't have a state corresponding to their layer.
Definition: Automaton.cc:422
void cleanBadConnections()
Erase alls connections between segments, that don't satisfy the criteria.
Definition: Automaton.cc:514
void resetStates()
Resets all the states of the segmens to 0 by calling the resetState() method of the segment Also sets...
Definition: Automaton.cc:492
An Interface for Criteria.
Definition: ICriterion.h:20
std::vector< std::vector< IHit * > > getTracksOfSegment(Segment *segment, std::vector< IHit * > hits, unsigned minHits=2)
Returns all the tracks starting from this segment.
Definition: Automaton.cc:592
A class for the cellular automaton.
Definition: Automaton.h:79
void addCriterion(ICriterion *criterion)
Adds a criteria to the automaton.
Definition: Automaton.h:108
void doAutomaton()
Does iteration until the states of the segments don't change anymore.
Definition: Automaton.cc:326
std::vector< std::vector< IHit * > > getTracks(unsigned minHits=2)
Get all the possible tracks in the automaton.
Definition: Automaton.cc:655
void lengthenSegments()
Lengthens the segments by one via adding the first hit of the next segment it is connected to to it...
Definition: Automaton.cc:29
std::vector< const Segment * > getSegments() const
Definition: Automaton.cc:698