fMomentum->SetPxPyPzE(px,py,pz,e);
}
}
+
+Double_t AliAODJet::DeltaR(const AliVParticle* part){
+
+ // Helper function to calculate the distance between two jets
+ // or a jet and particle
+
+ Double_t dPhi = Phi() - part->Phi();
+ if(dPhi>TMath::Pi())dPhi = dPhi - 2.*TMath::Pi();
+ if(dPhi<(-1.*TMath::Pi()))dPhi = dPhi + 2.*TMath::Pi();
+ Double_t dEta = Eta() - part->Eta();
+ 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;
+}
+