Skip to content

Commit

Permalink
Making the cooked tracks sortable
Browse files Browse the repository at this point in the history
  • Loading branch information
iouribelikov committed May 7, 2014
1 parent 5a12b7e commit ab21eb9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions ITS/UPGRADE/AliITSUTrackCooked.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ AliITSUTrackCooked::~AliITSUTrackCooked()
//--------------------------------------------------------------------
}

Int_t AliITSUTrackCooked::Compare(const TObject *o) const {
//-----------------------------------------------------------------
// This function compares tracks according to the their curvature
//-----------------------------------------------------------------
const AliITSUTrackCooked *t=(const AliITSUTrackCooked*)o;
Double_t co=TMath::Abs(t->OneOverPt());
Double_t c =TMath::Abs(OneOverPt());
//Double_t co=t->GetSigmaY2()*t->GetSigmaZ2();
//Double_t c =GetSigmaY2()*GetSigmaZ2();
if (c>co) return 1;
else if (c<co) return -1;
return 0;
}

void AliITSUTrackCooked::SetClusterIndex(Int_t l, Int_t i)
{
//--------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions ITS/UPGRADE/AliITSUTrackCooked.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class AliITSUTrackCooked : public AliKalmanTrack {
//Other functions
Int_t GetClusterIndex(Int_t i) const { return fIndex[i]; }
Double_t GetPIDsignal() const { return 0; }
Int_t Compare(const TObject *o) const;

void SetClusterIndex(Int_t layer, Int_t index);
Bool_t Propagate(const AliCluster *c, Double_t thick, Double_t x0rho);
Expand Down
2 changes: 1 addition & 1 deletion ITS/UPGRADE/AliITSUTrackerCooked.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Int_t AliITSUTrackerCooked::MakeSeeds(Int_t l1, Int_t l2) {
}
}
}

fSeeds->Sort();
return fSeeds->GetEntriesFast();
}

Expand Down

0 comments on commit ab21eb9

Please sign in to comment.