]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODJet.cxx
Make AliAODJet sortable
[u/mrichter/AliRoot.git] / STEER / AliAODJet.cxx
index 7fea86783668de0fc86160dfb3f9af039ccc2738..7083c5044a047b73c8b7f36832a19d81b3c181c1 100644 (file)
@@ -153,3 +153,20 @@ Double_t AliAODJet::DeltaR(const AliVParticle* part){
   Double_t dR = TMath::Sqrt(dPhi*dPhi+dEta*dEta);
   return dR;
 }
+
+
+Int_t AliAODJet::Compare( const TObject* obj) const {
+
+  // 
+  // see header file for class documentation
+  //
+
+  if (this == obj)
+    return 0;
+  // check type
+  if ( Pt() < ((AliAODJet*)(obj))->Pt())
+    return 1;
+  else
+    return -1;
+}
+