@@ -150,7 +150,7 @@ void Clusterizer::preClusterizeNBP(PatternStruct& de)
150150 pc->area [icolumn].setXmax (limit);
151151 LOG (DEBUG) << " adding col " << icolumn << " strip " << istrip << " (" << pc->area [icolumn].getXmin () << " , "
152152 << pc->area [icolumn].getXmax () << " ) (" << pc->area [icolumn].getYmin () << " , "
153- << pc->area [icolumn].getYmax ();
153+ << pc->area [icolumn].getYmax () << " ) " ;
154154 } else {
155155 pc = nullptr ;
156156 }
@@ -163,12 +163,12 @@ void Clusterizer::preClusterizeNBP(PatternStruct& de)
163163void Clusterizer::preClusterizeBP (PatternStruct& de)
164164{
165165 // / PreClusterizes bending plane
166- PreCluster* pc = nullptr ;
167166 double limit = 0 ;
168167 for (int icolumn = mMapping .getFirstColumn (de.deId ); icolumn < 7 ; ++icolumn) {
169168 if ((de.firedColumns & (1 << icolumn)) == 0 ) {
170169 continue ;
171170 }
171+ PreCluster* pc = nullptr ;
172172 int firstLine = mMapping .getFirstBoardBP (icolumn, de.deId );
173173 int lastLine = mMapping .getLastBoardBP (icolumn, de.deId );
174174 for (int iline = firstLine; iline <= lastLine; ++iline) {
@@ -213,7 +213,7 @@ void Clusterizer::makeClusters(const int& deIndex)
213213 int icolumn = pcNB.firstColumn ;
214214 if (icolumn == pcNB.lastColumn ) {
215215 // This is the most simple and common case: the NBP pre-cluster is on
216- // on single column. So it can be easily matched with the BP
216+ // one single column. So it can be easily matched with the BP
217217 // since the corresponding contours are both rectangles
218218 for (int ib = 0 ; ib < mNPreClusters [icolumn]; ++ib) {
219219 PreCluster& pcB = mPreClusters [icolumn][ib];
@@ -225,7 +225,7 @@ void Clusterizer::makeClusters(const int& deIndex)
225225 std::vector<std::vector<PreCluster*>> pcBneighbours;
226226 LOG (DEBUG) << " Spanning non-bend: " << icolumn << " -> " << pcNB.lastColumn ;
227227 buildListOfNeighbours (icolumn, pcNB.lastColumn , pcBneighbours);
228- for (const auto pcBlist : pcBneighbours) {
228+ for (auto & pcBlist : pcBneighbours) {
229229 makeCluster (pcBlist, deIndex, &pcNB);
230230 }
231231 }
@@ -241,7 +241,7 @@ void Clusterizer::makeClusters(const int& deIndex)
241241 // / Search for monocathodic clusters in the BP
242242 std::vector<std::vector<PreCluster*>> pcBneighbours;
243243 buildListOfNeighbours (0 , 6 , pcBneighbours, true );
244- for (const auto pcBlist : pcBneighbours) {
244+ for (auto & pcBlist : pcBneighbours) {
245245 makeCluster (pcBlist, deIndex);
246246 }
247247}
@@ -263,7 +263,7 @@ void Clusterizer::makeCluster(PreCluster& clBend, PreCluster& clNonBend, const i
263263{
264264 // / Makes the cluster from pre-clusters
265265 Cluster2D& cl = nextCluster ();
266- int icolumn = clNonBend .firstColumn ;
266+ int icolumn = clBend .firstColumn ;
267267 cl.deId = (uint8_t )deIndex;
268268 cl.xCoor = 0.5 * (clNonBend.area [icolumn].getXmax () + clNonBend.area [icolumn].getXmin ());
269269 cl.yCoor = 0.5 * (clBend.area [icolumn].getYmax () + clBend.area [icolumn].getYmin ());
@@ -278,7 +278,7 @@ void Clusterizer::makeCluster(PreCluster& clBend, PreCluster& clNonBend, const i
278278}
279279
280280// ______________________________________________________________________________
281- void Clusterizer::makeCluster (std::vector<PreCluster*> pcBlist, const int & deIndex, PreCluster* clNonBend)
281+ void Clusterizer::makeCluster (std::vector<PreCluster*>& pcBlist, const int & deIndex, PreCluster* clNonBend)
282282{
283283 // / Makes the cluster from pre-clusters
284284 // This is the general case:
0 commit comments