21 int StOrder[6]={6,5,4,3,2,1};
22 int SeOrder[12]={4,5,3,6,2,7,1,8,12,9,11,10};
24 for(
int i=0;
i < 6; ++
i)
80 if(
m_debug)
std::cout <<
"TTUTrackingAlg>process() ends: no initialseeds" << std::endl;
92 std::vector<Seed*> neighbors;
97 filter( initTrk, neighbors );
104 initTrk =
new Track();
105 initTrk->
add((*_seed));
117 std::cout <<
"length: " << (*itr)->length() <<
'\t';
128 if ( itr !=
m_tracks.end() ) tracklen = (*itr)->length();
135 << tracklen <<
'\t' <<
"triggered: "
157 for(
int i=0;
i < 12; ++
i)
162 if ( ! station.any() )
continue;
164 for(
int k=0;
k < 6; ++
k ) {
167 bool _hit = station[idy];
170 Seed *_seed =
new Seed( idx, idy, 0 );
184 if (
m_debug )
std::cout <<
"executeTracker: " << neighbors.size() << std::endl;
190 while( _itr != neighbors.end() ) {
192 _trk->
add( (*_itr) );
194 std::vector<Seed*> _nextneighbors;
198 filter( _trk, _nextneighbors );
200 if ( _nextneighbors.size() == 1 )
231 int _difx =
std::abs( _xo - (*_itr)->m_sectorId );
232 int _dify =
std::abs( _yo - (*_itr)->m_stationId );
234 if (
m_debug)
std::cout <<
"difference (x,y): " << _difx <<
"," << _dify <<
"\t";
236 if ( _difx == 11 ) _difx = 1;
238 if ( ((_difx == 1) && (_dify == 1)) ||
239 ((_difx == 1) && (_dify == 0)) ||
240 ((_difx == 0) && (_dify == 1)) )
242 neighbors.push_back( (*_itr) );
252 std::vector<Seed*> & _nbrs )
260 for( _itr = _trk->
m_seeds.begin();_itr != _trk->
m_seeds.end(); ++_itr)
264 if( _isalready != _nbrs.end() ) {
265 _nbrs.erase( _isalready );
279 std::vector<Seed*>::iterator seedItr;
286 currentTrk->
m_seeds.resize(seedItr - currentTrk->
m_seeds.begin());
303 std::cout <<
"Align tracks> trk len: " << (*itr)->length() <<
" ";
virtual ~TTUTrackingAlg()
Destructor.
bool process(const TTUInput &)
void findNeighbors(Seed *, std::vector< Seed * > &)
std::vector< Seed * > m_initialseeds
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void ghostBuster(Track *)
TTUTrackingAlg()
Standard constructor.
std::vector< Seed * >::iterator SeedsItr
void filter(Track *, std::vector< Seed * > &)
std::vector< Seed * > m_seeds
int executeTracker(Track *, std::vector< Seed * > &)
void runSeedBuster(const TTUInput &)
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &)
std::vector< Track * >::iterator TracksItr
std::vector< Track * > m_tracks