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)),
30 fPhi = TMath::ATan2(py, px);
32 fPhi += 2. * TMath::Pi();
36 //_________________________________________________________________________________________________
37 AliEmcalJet::AliEmcalJet(Double_t pt, Double_t eta, Double_t phi, Double_t m) :
55 fPhi += TMath::TwoPi();
58 //_________________________________________________________________________________________________
59 AliEmcalJet::AliEmcalJet(const AliEmcalJet &jet) :
67 fAreaEmc(jet.fAreaEmc),
68 fAxisInEmcal(jet.fAxisInEmcal),
71 fClusterIDs(jet.fClusterIDs),
72 fTrackIDs(jet.fTrackIDs)
77 //_________________________________________________________________________________________________
78 AliEmcalJet &AliEmcalJet::operator=(const AliEmcalJet &jet)
80 // Assignment operator.
83 AliVParticle::operator=(jet);
90 fAreaEmc = jet.fAreaEmc;
91 fAxisInEmcal = jet.fAxisInEmcal;
92 fMaxCPt = jet.fMaxCPt;
93 fMaxNPt = jet.fMaxNPt;
94 fClusterIDs = jet.fClusterIDs;
95 fTrackIDs = jet.fTrackIDs;
101 //__________________________________________________________________________________________________
102 void AliEmcalJet::GetMom(TLorentzVector &vec) const
104 // Return momentum as four vector.
106 Double_t p = fPt *TMath::CosH(fEta);
107 vec.SetPtEtaPhiE(fPt,fEta,fPhi,TMath::Sqrt(p*p+fM*fM));
110 //__________________________________________________________________________________________________
111 void AliEmcalJet::Print(Option_t* /*option*/) const
113 // Print jet information.
115 printf("Jet pt=%.2f, eta=%.2f, phi=%.2f, area=%.2f, NEF=%.2f\n", fPt, fEta, fPhi, fArea, fNEF);
118 //__________________________________________________________________________________________________
119 void AliEmcalJet::SortConstituents()
121 // Sort constituent by index (increasing).
123 std::sort(fClusterIDs.GetArray(), fClusterIDs.GetArray() + fClusterIDs.GetSize());
124 std::sort(fTrackIDs.GetArray(), fTrackIDs.GetArray() + fTrackIDs.GetSize());