20 int StOrder[6]={6,5,4,3,2,1};
21 int SeOrder[12]={4,5,3,6,2,7,1,8,12,9,11,10};
23 for(
int i=0;
i < 6; ++
i)
79 if(
m_debug)
std::cout <<
"TTUTrackingAlg>process() ends: no initialseeds" << std::endl;
91 std::vector<Seed*> neighbors;
96 filter( initTrk, neighbors );
103 initTrk =
new Track();
104 initTrk->
add((*_seed));
116 std::cout <<
"length: " << (*itr)->length() <<
'\t';
127 if ( itr !=
m_tracks.end() ) tracklen = (*itr)->length();
134 << tracklen <<
'\t' <<
"triggered: "
156 for(
int i=0;
i < 12; ++
i)
161 if ( ! station.any() )
continue;
163 for(
int k=0;
k < 6; ++
k ) {
166 bool _hit = station[idy];
169 Seed *_seed =
new Seed( idx, idy, 0 );
183 if (
m_debug )
std::cout <<
"executeTracker: " << neighbors.size() << std::endl;
189 while( _itr != neighbors.end() ) {
191 _trk->
add( (*_itr) );
193 std::vector<Seed*> _nextneighbors;
197 filter( _trk, _nextneighbors );
199 if ( _nextneighbors.size() == 1 )
230 int _difx =
std::abs( _xo - (*_itr)->m_sectorId );
231 int _dify =
std::abs( _yo - (*_itr)->m_stationId );
233 if (
m_debug)
std::cout <<
"difference (x,y): " << _difx <<
"," << _dify <<
"\t";
235 if ( _difx == 11 ) _difx = 1;
237 if ( ((_difx == 1) && (_dify == 1)) ||
238 ((_difx == 1) && (_dify == 0)) ||
239 ((_difx == 0) && (_dify == 1)) )
241 neighbors.push_back( (*_itr) );
251 std::vector<Seed*> & _nbrs )
259 for( _itr = _trk->
m_seeds.begin();_itr != _trk->
m_seeds.end(); ++_itr)
263 if( _isalready != _nbrs.end() ) {
264 _nbrs.erase( _isalready );
278 std::vector<Seed*>::iterator seedItr;
285 currentTrk->
m_seeds.resize(seedItr - currentTrk->
m_seeds.begin());
302 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
Abs< T >::type abs(const T &t)
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