17 int StOrder[6] = {6, 5, 4, 3, 2, 1};
18 int SeOrder[12] = {4, 5, 3, 6, 2, 7, 1, 8, 12, 9, 11, 10};
20 for (
int i = 0;
i < 6; ++
i) {
44 std::cout <<
"TTUTrackingAlg>process() starts + bx= " << inmap.
m_bx << std::endl;
48 auto initTrk = std::make_unique<Track>();
58 std::cout <<
"TTUTrackingAlg>process() ends: no initialseeds" << std::endl;
66 std::vector<Seed*> neighbors;
77 auto initTrk = std::make_unique<Track>();
78 initTrk->add((*_seed).get());
86 std::cout <<
"length: " << tr->length() <<
'\t';
98 tracklen = (*itr)->length();
114 std::cout <<
"TTUTrackingAlg>process ends" << std::endl;
123 for (
int i = 0;
i < 12; ++
i) {
130 for (
int k = 0;
k < 6; ++
k) {
147 std::cout <<
"executeTracker: " << neighbors.size() << std::endl;
151 auto _itr = neighbors.begin();
153 while (_itr != neighbors.end()) {
156 std::vector<Seed*> _nextneighbors;
160 filter(_trk, _nextneighbors);
162 if (_nextneighbors.size() == 1)
182 std::cout <<
"X: " << _xo + 1 <<
" Y: " << _yo + 1 << std::endl;
187 int _difx =
std::abs(_xo - (*_itr)->m_sectorId);
188 int _dify =
std::abs(_yo - (*_itr)->m_stationId);
191 std::cout <<
"difference (x,y): " << _difx <<
"," << _dify <<
"\t";
196 if (((_difx == 1) && (_dify == 1)) || ((_difx == 1) && (_dify == 0)) || ((_difx == 0) && (_dify == 1)))
198 neighbors.push_back((*_itr).get());
211 for (
auto _itr = _trk->
m_seeds.begin(); _itr != _trk->
m_seeds.end(); ++_itr) {
212 auto _isalready =
std::find(_nbrs.begin(), _nbrs.end(), (*_itr));
214 if (_isalready != _nbrs.end()) {
215 _nbrs.erase(_isalready);
217 std::cout <<
"removing ..." << std::endl;
225 std::vector<Seed*>::iterator seedItr;
228 if (
a->m_sectorId ==
b->m_sectorId) {
229 return a->m_stationId <
b->m_stationId;
231 return a->m_sectorId <
b->m_sectorId;
235 return a->m_sectorId ==
b->m_sectorId and
a->m_stationId ==
b->m_stationId;
238 currentTrk->
m_seeds.resize(seedItr - currentTrk->
m_seeds.begin());
251 std::cout <<
"Align tracks> trk len: " << tr->length() <<
" ";
bool compare(const P &i, const P &j)
int executeTracker(Track *, std::vector< Seed *> &)
void filter(Track *, std::vector< Seed *> &)
std::vector< std::unique_ptr< Seed > > m_initialseeds
void setBoardSpecs(const TTUBoardSpecs::TTUBoardConfig &) override
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< std::unique_ptr< Track > > m_tracks
void findNeighbors(Seed *, std::vector< Seed *> &)
def unique(seq, keepstr=True)
std::vector< Seed * > m_seeds
Abs< T >::type abs(const T &t)
~TTUTrackingAlg() override
Destructor.
bool process(const TTUInput &) override
void runSeedBuster(const TTUInput &)