7 #include "AliEmcalJet.h"
11 //__________________________________________________________________________________________________
12 AliEmcalJet::AliEmcalJet(Double_t px, Double_t py, Double_t pz)
14 fPt(TMath::Sqrt(px*px+py*py)),
15 fEta(TMath::ASinH(pz/fPt)),
28 fPhi = TMath::ATan2(py, px);
30 fPhi += 2. * TMath::Pi();
34 //_________________________________________________________________________________________________
35 AliEmcalJet::AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m) :
51 fPhi += 2. * TMath::Pi();
54 //_________________________________________________________________________________________________
55 AliEmcalJet::AliEmcalJet(const AliEmcalJet &jet) :
65 fClusterIDs(jet.fClusterIDs),
66 fTrackIDs(jet.fTrackIDs)
71 //_________________________________________________________________________________________________
72 AliEmcalJet &AliEmcalJet::operator=(const AliEmcalJet &jet)
74 // Assignment operator.
77 AliVParticle::operator=(jet);
84 fMaxCPt = jet.fMaxCPt;
85 fMaxNPt = jet.fMaxNPt;
86 fClusterIDs = jet.fClusterIDs;
87 fTrackIDs = jet.fTrackIDs;
93 //__________________________________________________________________________________________________
94 void AliEmcalJet::GetMom(TLorentzVector &vec) const
96 // Return momentum as four vector.
98 Double_t p = fPt *TMath::CosH(fEta);
99 vec.SetPtEtaPhiE(fPt,fEta,fPhi,TMath::Sqrt(p*p+fM*fM));
102 //__________________________________________________________________________________________________
103 void AliEmcalJet::Print(Option_t* /*option*/) const
105 // Print jet information.
107 printf("Jet pt=%.2f, eta=%.2f, phi=%.2f, area=%.2f, NEF=%.2f\n", fPt, fEta, fPhi, fArea, fNEF);
110 //__________________________________________________________________________________________________
111 void AliEmcalJet::SortConstituents()
113 // Sort constituent by index (increasing).
115 std::sort(fClusterIDs.GetArray(), fClusterIDs.GetArray() + fClusterIDs.GetSize());
116 std::sort(fTrackIDs.GetArray(), fTrackIDs.GetArray() + fTrackIDs.GetSize());