New task for 2particle correlations with PID for triggers at high pT (Subikash Choudh...
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / TriggerPID / AliAnalysisTaskPIDCORR.h
1 #ifndef ALIANALYSISTASKPIDCORR_H
2 #define ALIANALYSISTASKPIDCORR_H
3
4 class TH1F;
5 class TH2F;
6 class TList;
7 class TObjArray;
8 class AliAODEvent;
9 class AliAODVertex;
10 class AliAODTrack;
11 class AliPIDResponse;
12 class AliPID;
13 class AliEventPoolManager;
14 class AliPIDCorrParticle;
15
16
17 #include <TObject.h> //PIDCorrParticle is a derived class from"TObject"
18
19 #ifndef ALIANALYSISTASKSE_H
20 #include "AliAnalysisTaskSE.h"
21 #endif
22
23 class AliAnalysisTaskPIDCORR : public AliAnalysisTaskSE {
24  public:
25     AliAnalysisTaskPIDCORR();
26     AliAnalysisTaskPIDCORR(const char *name);
27     virtual ~AliAnalysisTaskPIDCORR();
28     
29     virtual void     UserCreateOutputObjects();
30     virtual void     UserExec(Option_t *option);
31     virtual void     Terminate(Option_t *);
32     
33  private:
34
35  Bool_t SelectEvent(AliAODVertex *vertex);
36  Int_t ClassifyTrack(AliAODTrack* track);
37
38  void FillGlobalTracksArray();
39  AliAODTrack* GetGlobalTrack(Int_t trackIndx);
40  Double_t PhiRange(Double_t DPhi);
41  Bool_t GetTrackStatus(AliAODTrack *track);
42  Int_t GetTriggerPtBin(AliAODTrack *track);
43  Bool_t TwoTrackEfficiency(AliAODTrack *Trig,AliAODTrack *Asso,Float_t TwoTrackEfficiencyCut,Float_t BSign);
44  Bool_t TwoTrackEfficiencyBg(AliAODTrack *Trig,AliPIDCorrParticle *Asso,Float_t TwoTrackEfficiencyCut,Float_t BSign);
45  Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t BSign);
46
47  
48     
49 AliAODEvent    *fAOD;
50 AliAODVertex   *fAODVertex;
51 AliPIDResponse *fPIDResponse;
52 TList          *fOutputList;
53 TH1F           *fHistPt;
54 TH2F           *fHistdEdx;
55 TH1F           *fHistNSigmaTPCPion[10];
56 TH2F           *fDihadronCorrelation[10];
57 TH2F           *fDihadronCorrelationPion[10];
58 TH2F           *fDihadronCorrelationProtonKaon[10];
59
60 TH2F           *fMixedEvent[10];
61 TH2F           *fMixedPion[10];
62 TH2F           *fMixedProtonKaon[10];
63
64 TH1F           *fTriggerPhiAll;
65 TH1F           *fTriggerPhiPion;
66 TH1F           *fTriggerPhiKaonProton;
67
68 TH1F           *fTriggerEtaAll;
69 TH1F           *fTriggerEtaPion;
70 TH1F           *fTriggerEtaKaonProton;
71
72 TH1F           *fAssoPhi;
73 TH1F           *fAssoEta;
74
75
76
77 TObjArray        *fGlobalTracks;
78 TClonesArray     *fArrayMC;
79
80 TH1F             *fHistNSAll[3];
81 TH1F             *fHistNSPion[3];
82 TH1F             *fHistNSProton[3];
83
84 TH1F             *fHistASAll[3];
85 TH1F             *fHistASPion[3];
86 TH1F             *fHistASProton[3];
87
88 TH1F             *fHistBgAll[3];
89 TH1F             *fHistBgPion[3];
90 TH1F             *fHistBgProton[3];
91
92 TH1F             *fHistBulkAll[3];
93 TH1F             *fHistBulkPion[3];
94 TH1F             *fHistBulkProton[3];
95   
96 //Mixing functions
97 void DefineEventPool();
98 TObjArray *AcceptTracksforMixing(AliAODEvent *event);
99 AliEventPoolManager    *fPoolMgr; 
100
101 //Introduce Correction Factor
102  Float_t GetEtaCorrectionFactorAsso(Double_t Eta);
103  Float_t GetEtaCorrectionFactorTrigAll(Double_t Eta);
104  Float_t GetEtaCorrectionFactorTrigPion(Double_t Eta);
105  Float_t GetEtaCorrectionFactorTrigProton(Double_t Eta);
106  Float_t EffEtaTrigPr;
107  Float_t EffEtaTrigPi;
108  Float_t EffEtaTrigAll;
109
110 //Identifying Associated
111 void IdentifyAssociated(Double_t ETA_trig,Double_t PHI_trig,Bool_t kPION,Bool_t kPROTON,AliAODTrack *track);
112 Int_t GetTOFPID(AliAODTrack *track);
113 Int_t GetTPCTOFPID(AliAODTrack *track);
114 Bool_t CheckTOF(AliVTrack *track);
115
116
117     
118
119            // NEW HISTO to be declared here
120     
121     AliAnalysisTaskPIDCORR(const AliAnalysisTaskPIDCORR&); // not implemented
122     AliAnalysisTaskPIDCORR& operator=(const AliAnalysisTaskPIDCORR&); // not implemented
123     
124     ClassDef(AliAnalysisTaskPIDCORR, 1); // example of analysis
125 };
126
127
128
129 class AliPIDCorrParticle : public TObject
130 {
131   public:
132     AliPIDCorrParticle(Float_t eta, Float_t phi, Float_t pt, Short_t charge)
133       : fEta(eta), fPhi(phi), fpT(pt), fCharge(charge)
134     {
135 }
136  
137     virtual Double_t Pt() const { return fpT; }
138     
139     virtual Double_t Phi()        const { return fPhi; }
140     
141     
142     virtual Double_t Eta()        const { return fEta; }
143     
144     
145     virtual Short_t Charge()      const { return fCharge; }
146     
147     
148     ~AliPIDCorrParticle() {}
149 private:
150      AliPIDCorrParticle(const AliPIDCorrParticle&);  // not implemented
151     AliPIDCorrParticle& operator=(const AliPIDCorrParticle&);  // not implemented
152     Float_t fEta;      // eta
153     Float_t fPhi;      // phi
154     Float_t fpT;       // pT
155     Short_t fCharge;   // charge
156     
157     ClassDef( AliPIDCorrParticle, 1); // class which contains only quantities requires for this analysis to reduce memory consumption for event mixing
158 };
159 \r
160
161
162 #endif
163