-// $Id$
//
// Track class with minimal number of information
// (targets at selection of primary tracks).
//_________________________________________________________________________________________________
AliPicoTrack::AliPicoTrack() :
AliVTrack(),
- fPt(0), fEta(0), fPhi(0), fQ(0), fLabel(-1), fTrackType(0), fEtaEmc(0), fPhiEmc(0), fPtEmc(0), fEmcal(0), fClusId(-1)
+ fPt(0), fEta(0), fPhi(0), fM(0.13957), fQ(0), fLabel(-1), fTrackType(0),
+ fEtaEmc(0), fPhiEmc(0), fPtEmc(0), fEmcal(0), fFlag(0), fGeneratorIndex(-1), fClusId(-1), fOrig(0)
{
// Default constructor.
}
//_________________________________________________________________________________________________
AliPicoTrack::AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Int_t lab, Byte_t type,
- Double_t etaemc, Double_t phiemc, Double_t ptemc, Bool_t ise) :
+ Double_t etaemc, Double_t phiemc, Double_t ptemc, Bool_t ise, Double_t mass) :
AliVTrack(),
- fPt(pt), fEta(eta), fPhi(phi), fQ(q), fLabel(lab), fTrackType(type),
- fEtaEmc(etaemc), fPhiEmc(phiemc), fPtEmc(ptemc), fEmcal(ise), fClusId(-1)
+ fPt(pt), fEta(eta), fPhi(phi), fM(mass), fQ(q), fLabel(lab), fTrackType(type),
+ fEtaEmc(etaemc), fPhiEmc(phiemc), fPtEmc(ptemc), fEmcal(ise), fFlag(0), fGeneratorIndex(-1), fClusId(-1), fOrig(0)
{
// Constructor.
}
//_________________________________________________________________________________________________
AliPicoTrack::AliPicoTrack(const AliPicoTrack &pc) :
AliVTrack(pc),
- fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi),
+ fPt(pc.fPt), fEta(pc.fEta), fPhi(pc.fPhi), fM(pc.fM),
fQ(pc.fQ), fLabel(pc.fLabel), fTrackType(pc.fTrackType),
- fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fPtEmc(pc.fPtEmc), fEmcal(pc.fEmcal),
- fClusId(pc.fClusId)
+ fEtaEmc(pc.fEtaEmc), fPhiEmc(pc.fPhiEmc), fPtEmc(pc.fPtEmc), fEmcal(pc.fEmcal), fFlag(pc.fFlag), fGeneratorIndex(pc.fGeneratorIndex),
+ fClusId(pc.fClusId), fOrig(pc.fOrig)
{
// Constructor.
}
fPt = pc.fPt;
fEta = pc.fEta;
fPhi = pc.fPhi;
+ fM = pc.fM;
fQ = pc.fQ;
fLabel = pc.fLabel;
fTrackType = pc.fTrackType;
fPhiEmc = pc.fPhiEmc;
fPtEmc = pc.fPtEmc;
fEmcal = pc.fEmcal;
+ fFlag = pc.fFlag;
+ fGeneratorIndex = pc.fGeneratorIndex;
fClusId = pc.fClusId;
+ fOrig = pc.fOrig;
}
return *this;
}
//_________________________________________________________________________________________________
-void AliPicoTrack::GetEtaPhiDiff(AliVTrack *t, AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
+void AliPicoTrack::GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
{
// Calculate phi and eta difference between track and cluster.
etadiff=veta-ceta;
phidiff=TVector2::Phi_mpi_pi(vphi-cphi);
}
+
+//_________________________________________________________________________________________________
+Byte_t AliPicoTrack::GetTrackType(const AliVTrack *t)
+{
+ // Get track type encoded from bits 20 and 21.
+
+ Byte_t ret = 0;
+ if (t->TestBit(BIT(22)) && !t->TestBit(BIT(23)))
+ ret = 1;
+ else if (!t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
+ ret = 2;
+ else if (t->TestBit(BIT(22)) && t->TestBit(BIT(23)))
+ ret = 3;
+ return ret;
+}