3 // Track class with minimal number of information
4 // (targets at selection of primary tracks).
8 #include "AliPicoTrack.h"
9 #include "AliExternalTrackParam.h"
10 #include "AliVCluster.h"
12 //_________________________________________________________________________________________________
13 AliPicoTrack::AliPicoTrack() :
15 fPt(0), fEta(0), fPhi(0), fQ(0), fLabel(-1), fTrackType(0), fEtaEmc(0), fPhiEmc(0), fEmcal(0), fClusId(-1)
17 // Default constructor.
20 //_________________________________________________________________________________________________
21 AliPicoTrack::AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Int_t lab, Byte_t type,
22 Double_t etaemc, Double_t phiemc, Bool_t ise) :
24 fPt(pt), fEta(eta), fPhi(phi), fQ(q), fLabel(lab), fTrackType(type),
25 fEtaEmc(etaemc), fPhiEmc(phiemc), fEmcal(ise), fClusId(-1)
30 //_________________________________________________________________________________________________
31 AliPicoTrack::AliPicoTrack(const AliPicoTrack &pc) :
33 fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi),
34 fQ(pc.fQ), fLabel(pc.fLabel), fTrackType(pc.fTrackType),
35 fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fEmcal(pc.fEmcal),
41 //_________________________________________________________________________________________________
42 AliPicoTrack &AliPicoTrack::operator=(const AliPicoTrack &pc)
44 // Assignment operator.
47 AliVTrack::operator=(pc);
53 fTrackType = pc.fTrackType;
63 //_________________________________________________________________________________________________
64 Int_t AliPicoTrack::Compare(const TObject* obj) const
66 // Compare this class with an other instance of this class used in a
67 // TCollection::Sort()/TClonesArray::Sort() which is descending.
68 // Returns 0 when equal, 1 when this is smaller and -1 when bigger.
70 const AliPicoTrack *t = dynamic_cast<const AliPicoTrack*>(obj);
80 //_________________________________________________________________________________________________
81 void AliPicoTrack::GetEtaPhiDiff(AliVTrack *t, AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
83 // Calculate phi and eta difference between track and cluster.
94 Double_t veta = t->GetTrackEtaOnEMCal();
95 Double_t vphi = t->GetTrackPhiOnEMCal();
100 Double_t ceta = cpos.Eta();
101 Double_t cphi = cpos.Phi();
103 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);