TOF pp spectra task added to PWGLFspectra lib
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TOF / pp7 / AliAnalysisCombinedHadronSpectra2MC.h
CommitLineData
f872ff90 1#ifndef ALIANALYSISTASKCHARGEDHADRONSPECTRA2MC_H
2#define ALIANALYSISTASKCHARGEDHADRONSPECTRA2MC_H
414be7d1 3
4//////////////////////////////////////////////////////////////////////////////
5// //
6// This analysis extracts pT-spectra of charged kaons, protons, and pions. //
7// It is based on particles identifation via the dE/dx signal of the TPC. //
8// //
9//////////////////////////////////////////////////////////////////////////////
10
11class TH1;
12class TH1F;
13class TH2F;
14class TH3F;
15class TList;
16class TObjArray;
17class AliESDEvent;
18class AliESDtrack;
19class AliESDtrackCuts;
20class AliHeader;
21class AliESDpid;
22#include "AliTOFT0v1.h"
23#include "AliTOFT0maker.h"
24#include "AliTOFcalib.h"
25#include "AliCDBManager.h"
26#include <TTree.h>
27
28class AliAnalysisFilter;
29class AliCFContainer;
30class TDatabasePDG;
31
32#include "AliAnalysisTask.h"
33#include "AliESDVertex.h"
34#include "AliPhysicsSelectionTask.h"
35#include "AliPhysicsSelection.h"
36#include "AliBackgroundSelection.h"
37#include "AliTOFT0v1.h"
38#include "AliTOFT0maker.h"
39#include "AliTOFcalib.h"
40#include "AliCDBManager.h"
41
42
43
44#include "AliAnalysisTaskSE.h"
45#include "THnSparse.h"
46
47class AliAnalysisCombinedHadronSpectra2MC : public AliAnalysisTaskSE {
48 public:
49 AliAnalysisCombinedHadronSpectra2MC(const char *name);
50 AliAnalysisCombinedHadronSpectra2MC();
51 virtual ~AliAnalysisCombinedHadronSpectra2MC() {}
52 //
53 virtual void UserCreateOutputObjects();
54 virtual void UserExec(Option_t *option);
55 virtual void Terminate(Option_t *);
56 //
57 //
58 void SetESDtrackCuts(AliESDtrackCuts * trackCuts){fESDtrackCuts = trackCuts;};
59 //void SetAlephParameters(const Double_t * parameters){for(Int_t j=0;j<5;j++) fAlephParameters[j] = parameters[j]; Initialize();};
60 Int_t Mult();
61 Int_t multiplicity;
62 Int_t vert;
63 //
64
65 private:
66 //
67 //void BinLogAxis(const THnSparse *h, Int_t axisNumber);
68
69 //
70 AliESDEvent *fESD; //! ESD object
71 TList *fListHist; //! list for histograms
72 //
73 AliESDtrackCuts * fESDtrackCuts; // basic cut variables
74 AliESDpid * fESDpid; // basic TPC object for n-sigma cuts
75 Bool_t fMCtrue; // flag if real data or MC is processed
76 Double_t fAlephParameters[5]; // Aleph Parameters for Bethe-Bloch
77 //
78
79 TList* TOFCheck;
80
81 Bool_t calibrateESD;
82 Bool_t correctTExp;
83 Bool_t useT0TOF;
84 Double_t timeResolution;
85 Bool_t tuneTOFMC;
86 TTree *fTreeTrack;
87 TTree *fTreeEv;
88 Bool_t fLoadOCDB;
89 Int_t frunOld;
90 Int_t frun;
91 AliTOFcalib *tofCalib;
92 AliTOFT0maker *t0maker;
93 Int_t fMCtracks; // n MC trk
94 Int_t fMCPrimaries; // MC primaries
95 Double_t fT0TOF0; // best t0
96 Double_t fT0TOF1; // sigma best t0 in ps
97 Double_t fT0TOF2; // t0 fill
98 Double_t fT0TOF3; // n TOF tracks
99 Double_t fT0TOF4; // TOF t0
100 Double_t fT0TOF5; // TOF t0 sigma
101 Double_t fT0TOF6; // sigma t0 fill
102 Double_t fT0TOF7; // n TOF tracks used for T0
103 Double_t XPrimVertex;
104 Double_t YPrimVertex;
105 Double_t ZPrimVertex;
106 Int_t NContrPrimVertex;
107 Double_t rapidityMC;
108 Float_t fDCAXY;
109 Float_t fDCAZ;
110 Int_t fcut;
111 Int_t fTOFout;
112 Int_t ftrdout;
113 Int_t ftime;
114 Int_t ftpcclust;
115 Double_t flength;
116 Int_t fsign;
117 Double_t ftimetof;
118 Int_t ftofchan;
119 Double_t feta;
120 Double_t fphi;
121 Double_t fmomtrasv;
122 Double_t sigmapi;
123 Double_t sigmaka;
124 Double_t sigmapr;
125 Float_t fTot;
126 Double_t r1[5];
127 Double_t fmom;
128 Double_t fexptimepi;
129 Double_t fexptimeka;
130 Double_t fexptimepr;
131 Double_t ftofz; // local z of track's impact on the TOF pad
132 Double_t ftofx;// local x of track's impact on the TOF pad
133 Float_t t0track;
134 Double_t TPCSignal;
135 Float_t TPCSigmaPI;
136 Float_t TPCSigmaKA;
137 Float_t TPCSigmaPR;
138 Int_t fmatch;
139 Double_t fPhiout;
140 Double_t fXout;
141 Double_t fYout;
142 Double_t fZout;
143 Int_t fTimeZeroType; // flag to select timeZero type
144
145 Float_t spdCorr;
146 Double_t treeMCP;
147 Double_t treeMCPt;
148 Double_t treeMCEta;
149 Double_t treeMCPhi;
150 Int_t treeMCPdg;
151 Double_t treeMCPBis;
152 Double_t treeMCPtBis;
153 Double_t treeMCEtaBis;
154 Double_t treeMCPhiBis;
155 Int_t treeMCPdgBis;
156 Float_t t0trackSigma;
157 Double_t fptMC;
158 Double_t fphiMC;
159 Double_t fetaMC;
160 Int_t fPdgcode;
161
162
163 TH2D* pad;
164 TH1D* resx; TH1D * resz; TH1D * tofres; TH1D * tofresTOF; TH1D * tofresgood;
165 TH1F *hNumMatch;
166 TH1F* hNumMatchPos; TH1F* hNumMatchNeg; TH1F* hDenMatch;
167
168 TH1F*hNumMatchPip; TH1F*hNumMatchPim; TH1F*hNumMatchKap; TH1F*hNumMatchKam; TH1F*hNumMatchPrp; TH1F*hNumMatchPrm; TH1F*hDenMatchPip; TH1F*hDenMatchPim; TH1F*hDenMatchKap; TH1F*hDenMatchKam; TH1F*hDenMatchPrp; TH1F*hDenMatchPrm;
169
170
171TH1F* hDenMatchPos; TH1F* hDenMatchNeg; TH1F* hNumMatchEta; TH1F* hNumMatchPosEta; TH1F* hNumMatchNegEta; TH1F* hDenMatchEta; TH1F* hDenMatchPosEta; TH1F* hDenMatchNegEta; TH1F* hNumMatchphiOut; TH1F* hNumMatchPosphiOut; TH1F* hNumMatchNegphiOut; TH1F* hDenMatchphiOut; TH1F* hDenMatchPosphiOut; TH1F* hDenMatchNegphiOut; TH1F* hNumMatchEtaPtMa; TH1F* hNumMatchPosEtaPtMa; TH1F* hNumMatchNegEtaPtMa; TH1F* hDenMatchEtaPtMa; TH1F* hDenMatchPosEtaPtMa; TH1F* hDenMatchNegEtaPtMa; TH1F* hNumMatchphiOutPtMa; TH1F* hNumMatchPosphiOutPtMa; TH1F* hNumMatchNegphiOutPtMa; TH1F* hDenMatchphiOutPtMa; TH1F* hDenMatchPosphiOutPtMa; TH1F* hDenMatchNegphiOutPtMa; TH1F* hNumMatchTRDOut; TH1F* hNumMatchPosTRDOut; TH1F* hNumMatchNegTRDOut; TH1F* hDenMatchTRDOut; TH1F* hDenMatchPosTRDOut; TH1F* hDenMatchNegTRDOut; TH1F* hNumMatchNoTRDOut; TH1F* hNumMatchPosNoTRDOut; TH1F* hNumMatchNegNoTRDOut; TH1F* hDenMatchNoTRDOut; TH1F* hDenMatchPosNoTRDOut; TH1F* hDenMatchNegNoTRDOut; TH1F* hNumMatchTPCpip; TH1F* hNumMatchTPCkap; TH1F* hNumMatchTPCprp; TH1F* hDenMatchTPCpip; TH1F* hDenMatchTPCkap; TH1F* hDenMatchTPCprp; TH1F* hNumMatchTPCpim; TH1F* hNumMatchTPCkam; TH1F* hNumMatchTPCprm; TH1F* hDenMatchTPCpim; TH1F* hDenMatchTPCkam; TH1F* hDenMatchTPCprm;
172
173 TH1F *hNumEv;
174 TH1F* hNumMatchMultTrkTRDOut[7][6];
175 TH1F* hDenMatchMultTrkTRDOut[7][6];
176 TH1F* hDenTrkMultTrkTRDOut[7][6];
177 TH1F* hNumMatchMultTrkNoTRDOut[7][6];
178 TH1F* hDenMatchMultTrkNoTRDOut[7][6];
179 TH1F* hDenTrkMultTrkNoTRDOut[7][6];
180
181 TH1F *hNumMatchMultTrk[7][6];
182 TH1F *hDenMatchMultTrk[7][6];
183 TH1F *hDenTrkMultTrk[7][6];
184 TH1F *hNumMatchMultSPD[7][6];
185 TH1F *hDenMatchMultSPD[7][6];
186 TH1F *hDenTrkMultSPD[7][6];
187
188 TH1F *hNumMatchMultTrkInc[7][2];
189 TH1F *hDenMatchMultTrkInc[7][2];
190 TH1F *hNumMatchMultSPDInc[7][2];
191 TH1F *hDenMatchMultSPDInc[7][2];
192 TH1F* hDenTrkVertMultTrk[6];
193
194 TH1F* hDenTrkTriggerMultTrk[6];
195
196 //
197 AliAnalysisCombinedHadronSpectra2MC(const AliAnalysisCombinedHadronSpectra2MC&);
198 AliAnalysisCombinedHadronSpectra2MC & operator=(const AliAnalysisCombinedHadronSpectra2MC&);
199
200 ClassDef(AliAnalysisCombinedHadronSpectra2MC, 1);
201};
202
f872ff90 203#endif