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