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), fM(0.13957), fQ(0), fLabel(-1), fTrackType(0),
16 fEtaEmc(0), fPhiEmc(0), fPtEmc(0), fEmcal(0), fClusId(-1), fOrig(0)
18 // Default constructor.
21 //_________________________________________________________________________________________________
22 AliPicoTrack::AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Int_t lab, Byte_t type,
23 Double_t etaemc, Double_t phiemc, Double_t ptemc, Bool_t ise, Double_t mass) :
25 fPt(pt), fEta(eta), fPhi(phi), fM(mass), fQ(q), fLabel(lab), fTrackType(type),
26 fEtaEmc(etaemc), fPhiEmc(phiemc), fPtEmc(ptemc), fEmcal(ise), fClusId(-1), fOrig(0)
31 //_________________________________________________________________________________________________
32 AliPicoTrack::AliPicoTrack(const AliPicoTrack &pc) :
34 fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi), fM(pc.fM),
35 fQ(pc.fQ), fLabel(pc.fLabel), fTrackType(pc.fTrackType),
36 fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fPtEmc(pc.fPtEmc), fEmcal(pc.fEmcal),
37 fClusId(pc.fClusId), fOrig(pc.fOrig)
42 //_________________________________________________________________________________________________
43 AliPicoTrack &AliPicoTrack::operator=(const AliPicoTrack &pc)
45 // Assignment operator.
48 AliVTrack::operator=(pc);
55 fTrackType = pc.fTrackType;
67 //_________________________________________________________________________________________________
68 Int_t AliPicoTrack::Compare(const TObject* obj) const
70 // Compare this class with an other instance of this class used in a
71 // TCollection::Sort()/TClonesArray::Sort() which is descending.
72 // Returns 0 when equal, 1 when this is smaller and -1 when bigger.
74 const AliPicoTrack *t = dynamic_cast<const AliPicoTrack*>(obj);
84 //_________________________________________________________________________________________________
85 void AliPicoTrack::GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
87 // Calculate phi and eta difference between track and cluster.
98 Double_t veta = t->GetTrackEtaOnEMCal();
99 Double_t vphi = t->GetTrackPhiOnEMCal();
101 Float_t pos[3] = {0};
104 Double_t ceta = cpos.Eta();
105 Double_t cphi = cpos.Phi();
107 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
110 //_________________________________________________________________________________________________
111 Byte_t AliPicoTrack::GetTrackType(const AliVTrack *t)
113 // Get track type encoded from bits 20 and 21.
116 if (t->TestBit(BIT(20)) && !t->TestBit(BIT(21)))
118 else if (!t->TestBit(BIT(20)) && t->TestBit(BIT(21)))
120 else if (t->TestBit(BIT(20)) && t->TestBit(BIT(21)))