- if (fSubChannel)
- delete [] fSubChannel;
-}
-
-Int_t AliTRDtrackletGTU::Compare(const TObject *o) const {
- // sorting w. r. t. Z, Y if no z-channel assigned (as needed in input unit)
- // otherwise w. r. t. Z, Y_proj
- // must be changed to Z-channel, Y_proj
- // will be changed
-
- if (!o)
- return 0;
-
- if (!o->InheritsFrom("AliTRDtrackletGTU")) {
- AliError("Cannot compare to object not deriving from AliTRDtrackletGTU");
- return 0;
- }
-
- if (!fAssignedZ) {
- if ( GetZbin() < ((AliTRDtrackletGTU*) o)->GetZbin())
- return -1;
- else if (GetZbin() > ((AliTRDtrackletGTU*) o)->GetZbin())
- return 1;
- else
- if (GetYbin() < ((AliTRDtrackletGTU*) o)->GetYbin())
- return -1;
- else if (GetYbin() > ((AliTRDtrackletGTU*) o)->GetYbin())
- return 1;
- else
- return 0;
- }
- else {
- // sorting should be according to zsubindex, not to Z !!!
- // therefore this depends on the zch
- if (GetZbin() < ((AliTRDtrackletGTU*) o)->GetZbin())
- return -1;
- else if (GetZbin() > ((AliTRDtrackletGTU*) o)->GetZbin())
- return 1;
- else
- if (GetYProj() < ((AliTRDtrackletGTU*) o)->GetYProj())
- return -1;
- else if (GetYProj() > ((AliTRDtrackletGTU*) o)->GetYProj())
- return 1;
- else
- return 0;
- }