- if (!m) continue;
- if (m->GetDeadValue()) continue; // only take alive modules with a signal
-
- if (nord == 0) // store the first module with a signal at the first ordered position
- {
- nord++;
- ordered[nord-1]=m;
- continue;
- }
-
- for (Int_t j=0; j<=nord; j++) // put module in the right ordered position
- {
- if (j == nord) // module has smallest signal seen so far
- {
- nord++;
- ordered[j]=m; // add module at the end
- break; // go for next matrix module
- }
-
- if (m->GetSignal(1,1) < ordered[j]->GetSignal(1,1)) continue;
-
- nord++;
- for (Int_t k=nord-1; k>j; k--) // create empty position
- {
- ordered[k]=ordered[k-1];
- }
- ordered[j]=m; // put module at empty position
- break; // go for next matrix module
- }
- }