3 #include "AliEmcalJet.h"
7 //__________________________________________________________________________________________________
8 AliEmcalJet::AliEmcalJet(Double_t px, Double_t py, Double_t pz)
10 fPt(TMath::Sqrt(px*px+py*py)),
11 fEta(TMath::ASinH(pz/fPt)),
24 fPhi = TMath::ATan2(py, px);
26 fPhi += 2. * TMath::Pi();
30 //_________________________________________________________________________________________________
31 AliEmcalJet::AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m) :
47 fPhi += 2. * TMath::Pi();
50 //_________________________________________________________________________________________________
51 AliEmcalJet::AliEmcalJet(const AliEmcalJet &jet) :
61 fClusterIDs(jet.fClusterIDs),
62 fTrackIDs(jet.fTrackIDs)
67 //_________________________________________________________________________________________________
68 AliEmcalJet &AliEmcalJet::operator=(const AliEmcalJet &jet)
70 // Assignment operator.
73 AliVParticle::operator=(jet);
80 fMaxCPt = jet.fMaxCPt;
81 fMaxNPt = jet.fMaxNPt;
82 fClusterIDs = jet.fClusterIDs;
83 fTrackIDs = jet.fTrackIDs;
89 //__________________________________________________________________________________________________
90 void AliEmcalJet::GetMom(TLorentzVector &vec) const
92 // Return momentum as four vector.
94 Double_t p = fPt *TMath::CosH(fEta);
95 vec.SetPtEtaPhiE(fPt,fEta,fPhi,TMath::Sqrt(p*p+fM*fM));
98 //__________________________________________________________________________________________________
99 void AliEmcalJet::Print(Option_t* /*option*/) const
101 // Print jet information.
103 printf("Jet pt=%.2f, eta=%.2f, phi=%.2f, area=%.2f, NEF=%.2f\n", fPt, fEta, fPhi, fArea, fNEF);
106 //__________________________________________________________________________________________________
107 void AliEmcalJet::SortConstituents()
109 // Sort constituent by index (increasing).
111 std::sort(fClusterIDs.GetArray(), fClusterIDs.GetArray() + fClusterIDs.GetSize());
112 std::sort(fTrackIDs.GetArray(), fTrackIDs.GetArray() + fTrackIDs.GetSize());