printf("Charged: %13.3f\n", EffectiveAreaCharged());
printf("Neutral: %13.3f\n", EffectiveAreaNeutral());
}
+
+void AliAODJet::SetPxPyPzE(Double_t px, Double_t py, Double_t pz, Double_t e){
+ //
+ // Set the four Momentum from outside
+ // MomentumVector()->SetPxPyPzE() cannot be used since pointer can be 0x0
+ //
+
+ if(!fMomentum){
+ fMomentum = new TLorentzVector(px,py,pz,e);
+ }
+ else{
+ 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;
+}