3 // Track class with minimal number of information
4 // (targets at selection of primary tracks)
7 #include "AliPicoTrack.h"
8 #include "AliExternalTrackParam.h"
9 #include "AliVCluster.h"
11 //_________________________________________________________________________________________________
12 AliPicoTrack::AliPicoTrack() :
14 fPt(0), fEta(0), fPhi(0), fQ(0), fLabel(-1), fEtaEmc(0), fPhiEmc(0), fEmcal(0), fClusId(-1)
16 // Default constructor.
19 //_________________________________________________________________________________________________
20 AliPicoTrack::AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Byte_t lab,
21 Double_t etaemc, Double_t phiemc, Bool_t ise) :
23 fPt(pt), fEta(eta), fPhi(phi), fQ(q), fLabel(lab),
24 fEtaEmc(etaemc), fPhiEmc(phiemc), fEmcal(ise), fClusId(-1)
29 //_________________________________________________________________________________________________
30 AliPicoTrack::AliPicoTrack(const AliPicoTrack &pc) :
32 fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi),
33 fQ(pc.fQ), fLabel(pc.fLabel),
34 fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fEmcal(pc.fEmcal),
40 //_________________________________________________________________________________________________
41 AliPicoTrack &AliPicoTrack::operator=(const AliPicoTrack &pc)
43 // Assignment operator.
46 AliVTrack::operator=(pc);
61 //_________________________________________________________________________________________________
62 Int_t AliPicoTrack::Compare(const TObject* obj) const
64 // Compare this class with an other instance of this class used in a
65 // TCollection::Sort()/TClonesArray::Sort() which is descending.
66 // Returns 0 when equal, 1 when this is smaller and -1 when bigger.
68 const AliPicoTrack *t = dynamic_cast<const AliPicoTrack*>(obj);
78 //_________________________________________________________________________________________________
79 void AliPicoTrack::GetEtaPhiDiff(AliVTrack *t, AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
81 // Calculate phi and eta difference between track and cluster.
92 const AliExternalTrackParam *outp = t->GetOuterParam();
96 Double_t trkPos[3] = {0.,0.,0.};
97 if (!outp->GetXYZ(trkPos))
99 TVector3 vec(trkPos[0],trkPos[1],trkPos[2]);
103 AliPicoTrack *ptrack = dynamic_cast<AliPicoTrack*>(t);
105 veta = ptrack->GetEtaEmc();
106 vphi = ptrack->GetPhiEmc();
111 if (TMath::Abs(veta)>0.75 || (vphi<70*TMath::DegToRad()) || (vphi>190*TMath::DegToRad()))
115 Float_t pos[3] = {0};
118 Double_t ceta = cpos.Eta();
119 Double_t cphi = cpos.Phi();
121 phidiff=TVector2::Phi_mpi_pi(vphi-cphi);