]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/AliPicoTrack.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliPicoTrack.h
CommitLineData
dd233e4e 1#ifndef AliPicoTrack_H
2#define AliPicoTrack_H
3
eb556d0c 4#include <TMath.h>
dd233e4e 5
6#include "AliVTrack.h"
eb556d0c 7#include "AliAODMCParticle.h"
8
b723beb6 9class AliVCluster;
dd233e4e 10
11class AliPicoTrack: public AliVTrack {
12 public:
13 AliPicoTrack();
39799f2a 14 AliPicoTrack(Double_t pt, Double_t eta, Double_t phi, Byte_t q, Int_t label, Byte_t type,
de1c0913 15 Double_t etaemc=0, Double_t phiemc=0, Double_t ptemc=0, Bool_t ise=0, Double_t mass=0.13957);
dd233e4e 16 AliPicoTrack(const AliPicoTrack &pc);
17 AliPicoTrack &operator=(const AliPicoTrack &pc);
18
fb4e4852 19 Double_t Px() const { return fPt*TMath::Cos(fPhi); }
20 Double_t Py() const { return fPt*TMath::Sin(fPhi); }
21 Double_t Pz() const { return fPt*TMath::SinH(fEta); }
22 Double_t Pt() const { return fPt; }
23 Double_t P() const { return fPt*TMath::CosH(fEta); }
61ac1db0 24
fb4e4852 25 Bool_t PxPyPz(Double_t p[3]) const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1; }
26 Bool_t GetPxPyPz(Double_t p[3]) const { p[0]=Px();p[1]=Py();p[2]=Pz(); return 1; }
27 Double_t Xv() const { return 0.; }
28 Double_t Yv() const { return 0.; }
29 Double_t Zv() const { return 0.; }
30 Bool_t XvYvZv(Double_t x[3]) const { x[0]=0;x[1]=0;x[2]=0; return 1; }
31 Double_t OneOverPt() const { return 1./fPt; }
32 Double_t Phi() const { return fPhi; }
33 Double_t Theta() const { return 2*TMath::ATan(TMath::Exp(-fEta)); }
34 Double_t E() const { Double_t p=P(); return TMath::Sqrt(M()*M()+p*p); }
35 Double_t M() const { return fM; }
36 Double_t Eta() const { return fEta; }
37 Double_t Y() const { return 0.5*TMath::Log((E()+Pz())/(E()-Pz())); }
38 Short_t Charge() const { return (char)fQ;}
39 Int_t GetLabel() const { return fLabel; }
40 void SetLabel(Int_t label) { fLabel = label; }
41 Byte_t GetTrackType() const { return fTrackType;}
42 void SetTrackType(Byte_t type) { fTrackType = type;}
43 Int_t PdgCode() const { return 0; }
dd233e4e 44 const Double_t *PID() const { return 0; }
fb4e4852 45 Int_t GetID() const { return 0; }
46 UChar_t GetITSClusterMap() const { return 0; }
47 Int_t GetEMCALcluster() const { return fClusId; }
48 void SetEMCALcluster(Int_t id) { fClusId = id; }
49 Double_t GetEtaEmc() const { return GetTrackEtaOnEMCal(); }
50 Double_t GetPhiEmc() const { return GetTrackPhiOnEMCal(); }
51 Bool_t IsEMCAL() const { return fEmcal; }
52 ULong_t GetStatus() const { return 0; }
53 Bool_t GetXYZ(Double_t *v) const { v[0]=0; v[1]=0; v[2]=0; return 0; }
6a33e0e9 54 using AliVTrack::GetXYZ;
fb4e4852 55 Double_t GetBz() const { return 0; }
56 void GetBxByBz(Double_t b[3]) const { b[0]=0;b[1]=0;b[2]=0; }
57 Bool_t GetCovarianceXYZPxPyPz(Double_t /*cv*/[21]) const { return 0; }
58 AliVTrack *GetTrack() const { return fOrig; }
59 void SetTrack(AliVTrack *t) { fOrig = t; }
60 Double_t GetTrackPhiOnEMCal() const { return fPhiEmc ; }
61 Double_t GetTrackEtaOnEMCal() const { return fEtaEmc ; }
62 Double_t GetTrackPtOnEMCal() const { return fPtEmc ; }
63 Double_t GetTrackPOnEMCal() const { return fPtEmc*TMath::CosH(fEtaEmc);}
64 void SetTrackPhiEtaPtOnEMCal(Double_t eta, Double_t phi, Double_t pt) { fEtaEmc = eta; fPhiEmc = phi; fPtEmc = pt;}
65 void Clear(Option_t * /*option*/ ="") { fClusId = -1; fOrig = 0; }
66 Int_t Compare(const TObject* obj) const;
67 Bool_t PropagateToDCA(const AliVVertex *, Double_t, Double_t, Double_t *, Double_t *) { return 0; }
eb556d0c 68 void SetFlag(UInt_t flag) {fFlag = flag;}
69 UInt_t GetFlag() const {return fFlag;}
70 void SetPrimary(Bool_t b = kTRUE){
71 if(b)fFlag |= AliAODMCParticle::kPrimary;
72 else fFlag &= ~AliAODMCParticle::kPrimary;
73 }
74 Bool_t IsPrimary() const {return ((fFlag&AliAODMCParticle::kPrimary)==AliAODMCParticle::kPrimary);}
75
76 void SetPhysicalPrimary(Bool_t b = kTRUE){
77 if(b)fFlag |= AliAODMCParticle::kPhysicalPrim;
78 else fFlag &= ~AliAODMCParticle::kPhysicalPrim;
79 }
80 Bool_t IsPhysicalPrimary() const {return ((fFlag&AliAODMCParticle::kPhysicalPrim)==AliAODMCParticle::kPhysicalPrim);}
81
82 void SetSecondaryFromWeakDecay(Bool_t b = kTRUE){
83 if(b)fFlag |= AliAODMCParticle::kSecondaryFromWeakDecay;
84 else fFlag &= ~AliAODMCParticle::kSecondaryFromWeakDecay;
85 }
86 Bool_t IsSecondaryFromWeakDecay() const {return ((fFlag&AliAODMCParticle::kSecondaryFromWeakDecay)==AliAODMCParticle::kSecondaryFromWeakDecay);}
87
88 void SetSecondaryFromMaterial(Bool_t b = kTRUE){
89 if(b)fFlag |= AliAODMCParticle::kSecondaryFromMaterial;
90 else fFlag &= ~AliAODMCParticle::kSecondaryFromMaterial;
91 }
92 Bool_t IsSecondaryFromMaterial() const {return ((fFlag&AliAODMCParticle::kSecondaryFromMaterial)==AliAODMCParticle::kSecondaryFromMaterial);}
93
94 Bool_t IsFromHIJING() const { return (fGeneratorIndex == 0); }
95 void SetGeneratorIndex(Short_t i) {fGeneratorIndex = i;}
96 Short_t GetGeneratorIndex() const {return fGeneratorIndex;}
b723beb6 97
fb4e4852 98 static void GetEtaPhiDiff(const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff);
99 static Byte_t GetTrackType(const AliVTrack *t);
dd233e4e 100
101 protected:
eb556d0c 102 Double32_t fPt; //[0,0,12] pt at vertex
103 Double32_t fEta; //[-1,1,12] eta at vertex
104 Double32_t fPhi; //[0,6.3,12] phi at vertex
105 Double32_t fM; // mass
106 Byte_t fQ; // charge
107 Int_t fLabel; // label
108 Byte_t fTrackType; // 0=global track; 1=w/o SPD, w/ ITS refit; 2=w/o SPD, w/o ITS refit
109 Double32_t fEtaEmc; //[-1,1,12] eta at emcal surface
110 Double32_t fPhiEmc; //[0,6.3,12] phi at emcal surface
111 Double32_t fPtEmc; //[0,0,12] pt at emcal surface
112 Bool_t fEmcal; // is true if track propagated to emcal
113 UInt_t fFlag; //! Flag for indication of primary etc (MC)
114 Short_t fGeneratorIndex; //! Index of generator in cocktail
115 Short_t fClusId; //! cluster id of matched cluster; -1 if not set
116 AliVTrack *fOrig; //! ptr to original track
dd233e4e 117
eb556d0c 118 ClassDef(AliPicoTrack, 8) // Pico track class
dd233e4e 119};
120#endif