]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliAnalysisTaskSEITSsaSpectra.h
Request by Martin: added flag for big output
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliAnalysisTaskSEITSsaSpectra.h
CommitLineData
36be14b3 1#ifndef ALIANALYSISTASKSEITSSASPECTRA_H
2#define ALIANALYSISTASKSEITSSASPECTRA_H
3
4///////////////////////////////////////////////////////////////////////////
5// AliAnalysisTaskSE for the extraction of the various histograms to
6// study the pt spectra of identified hadrons:
7// - log(dEdx)-log(dEdxBB) distributions for pions, kaons and protons in pt bins
8// - Pt distributions of pions, kaons and protons with nSigma PID
9// Authors:
10// E. Biolcati, biolcati@to.infn.it
11// L. Milano, milano@to.infn.it
12// F. Prino, prino@to.infn.it
13///////////////////////////////////////////////////////////////////////////
14
6b77d2c0 15/* $Id$ */
16
36be14b3 17class TString;
18class TTree;
19class TH1F;
20class TH2F;
21class TRandom3;
22class AliESDEvent;
23class TNtuple;
7f8f788e 24class AliESDtrackCuts;
98bb3219 25class AliITSPIDResponse;
26
36be14b3 27#include "AliAnalysisTaskSE.h"
28
29class AliAnalysisTaskSEITSsaSpectra : public AliAnalysisTaskSE {
30 public:
31 AliAnalysisTaskSEITSsaSpectra();
32 virtual ~AliAnalysisTaskSEITSsaSpectra();
33
34 virtual void UserCreateOutputObjects();
35 virtual void UserExec(Option_t *);
36 virtual void Terminate(Option_t *);
37
c841b89f 38 void SetMaxChi2Clu(Double_t chi=2.5){
36be14b3 39 fMaxChi2Clu=chi;
40 }
41 void SetRapidityRange(Double_t dy=0.5){
42 fMaxY=dy;
43 }
c841b89f 44 void SetMinNSigma(Double_t ns=1.5){
36be14b3 45 fMinNSigma=ns;
46 }
47 void SetMindEdx(Double_t mind=0.){
48 fMindEdx=mind;
49 }
50 void SetMinSPDPoints(Int_t np=1){
51 fMinSPDPts=np;
52 }
53 void SetMinNdEdxSamples(Int_t np=3){
54 fMinNdEdxSamples=np;
55 }
56 void SetDCACuts(Double_t nsxy=7., Double_t nsz=7.){
57 fNSigmaDCAxy=nsxy;
58 fNSigmaDCAz=nsz;
59 }
7f2f1e04 60 void SetMultBin(Int_t LowBin=-1,Int_t UpBin=-1){
c841b89f 61 fLowMult=LowBin;
62 fUpMult=UpBin;
63 }
1f75ac7d 64 void SetCentralityCut(Float_t low, Float_t up){
65 if((up>low)&&(!(low<0.0))&&(!(up>100.0))){
66 fLowCentrality=low; fUpCentrality=up;
67 }
68 }
69 void SetSPDMethodCut(){fSPD=kTRUE;}
70 void SetHImode(){fHImode=kTRUE;}
71
dac69cb0 72 void SetEtaMax(Double_t maxeta){
73 fEtaRange=maxeta;
74 }
1f75ac7d 75
7f8f788e 76 void SetYear(Int_t year);
36be14b3 77 void SetReadMC(Bool_t flag = kTRUE) {fMC = flag;}
78 void SetFillNtuple(Bool_t fill=kTRUE) {fFillNtuple=fill;}
146d18ee 79 void SetLowEnergypp(Bool_t opt=kTRUE) {fLowEnergypp=opt;}
80
36be14b3 81 void SetSmearMC(Double_t smearp, Double_t smeardedx){
82 fSmearMC=kTRUE;
83 fSmearP=smearp;
84 fSmeardEdx=smeardedx;
85 }
4d668cf7 86 Double_t CookdEdx(Double_t *s) const;
87 Double_t Eta2y(Double_t pt, Double_t m, Double_t eta) const;
88 Bool_t DCAcut(Double_t impactXY, Double_t impactZ, Double_t pt, Bool_t optMC) const;
36be14b3 89
90 private:
91 AliAnalysisTaskSEITSsaSpectra(const AliAnalysisTaskSEITSsaSpectra &source);
92 AliAnalysisTaskSEITSsaSpectra& operator=(const AliAnalysisTaskSEITSsaSpectra &source);
93
94 enum {kNbins=22};
95
96 AliESDEvent *fESD; //ESD object
7f8f788e 97 AliESDtrackCuts *fesdTrackCutsMult;//cuts for multiplicity
98
36be14b3 99 TList *fOutput; //! tlist with output
100 TH1F *fHistNEvents; //! histo with number of events
c841b89f 101 TH1F *fHistMult; //! histo with multiplicity of the events
1f75ac7d 102 TH1F *fHistCen; //! histo with multiplicity of the events
36be14b3 103 TH1F *fHistNTracks; //! histo with number of tracks
c841b89f 104 TH1F *fHistNTracksPos; //! histo with number of tracks
105 TH1F *fHistNTracksNeg; //! histo with number of tracks
36be14b3 106
107 TH2F *fHistDEDX; //! histo with dedx versus momentum
108 TH2F *fHistDEDXdouble; //! histo with dedx versus signed momentum
98bb3219 109 TH2F *fHistPosNSigmaSep[3]; //! histo nsigma separation vs momentum
110 TH2F *fHistNegNSigmaSep[3]; //! histo nsigma separation vs momentum
36be14b3 111
112 TH1F *fHistBeforeEvSel; //! histo with pt distribution before my event selection
113 TH1F *fHistAfterEvSel; //! histo with pt distribution after my event selection
114
10ba520e 115 TH1F *fHistPrimMCpos[3]; //! histo with spectra of primaries from the MC truth (positive)
116 TH1F *fHistPrimMCneg[3]; //! histo with spectra of primaries from the MC truth (negative)
117 TH1F *fHistSecStrMCpos[3]; //! histo with spectra of strange decays from the MC truth (positive)
118 TH1F *fHistSecStrMCneg[3]; //! histo with spectra of strange decays from the MC truth (negative)
119 TH1F *fHistSecMatMCpos[3]; //! histo with spectra of sec. from material from the MC truth (positive)
120 TH1F *fHistSecMatMCneg[3]; //! histo with spectra of sec. from material from the MC truth (negative)
121 TH1F *fHistPrimMCposBefEvSel[3]; //! histo with spectra of primaries from the MC truth (positive)
122 TH1F *fHistPrimMCnegBefEvSel[3]; //! histo with spectra of primaries from the MC truth (negative)
123 TH1F *fHistSecStrMCposBefEvSel[3]; //! histo with spectra of strange decays from the MC truth (positive)
124 TH1F *fHistSecStrMCnegBefEvSel[3]; //! histo with spectra of strange decays from the MC truth (negative)
125 TH1F *fHistSecMatMCposBefEvSel[3]; //! histo with spectra of sec. from material from the MC truth (positive)
126 TH1F *fHistSecMatMCnegBefEvSel[3]; //! histo with spectra of sec. from material from the MC truth (negative)
127 TH1F *fHistPrimMCposReco[3]; //! histo with spectra of primaries from the MC truth (positive)
128 TH1F *fHistPrimMCnegReco[3]; //! histo with spectra of primaries from the MC truth (negative)
129 TH1F *fHistSecStrMCposReco[3]; //! histo with spectra of strange decays from the MC truth (positive)
130 TH1F *fHistSecStrMCnegReco[3]; //! histo with spectra of strange decays from the MC truth (negative)
131 TH1F *fHistSecMatMCposReco[3]; //! histo with spectra of sec. from material from the MC truth (positive)
132 TH1F *fHistSecMatMCnegReco[3]; //! histo with spectra of sec. from material from the MC truth (negative)
36be14b3 133
134 TH1F *fHistCharge[4]; //! histo with charge distribution to check the calibration
135
136 TH1F *fHistPosPi[kNbins]; //! histo with dedx distibution in the pions hypotesis (positive)
137 TH1F *fHistPosK[kNbins]; //! histo with dedx distibution in the kaons hypotesis (positive)
138 TH1F *fHistPosP[kNbins]; //! histo with dedx distibution in the protons hypotesis (positive)
139 TH1F *fHistNegPi[kNbins]; //! histo with dedx distibution in the pions hypotesis (negative)
140 TH1F *fHistNegK[kNbins]; //! histo with dedx distibution in the kaons hypotesis (negative)
141 TH1F *fHistNegP[kNbins]; //! histo with dedx distibution in the protons hypotesis (negative)
142
6b77d2c0 143 TH1F *fHistDCAPosPi[kNbins]; //! histo with DCA distibution in the kaons hypotesis (positive)
36be14b3 144 TH1F *fHistDCAPosK[kNbins]; //! histo with DCA distibution in the kaons hypotesis (positive)
145 TH1F *fHistDCAPosP[kNbins]; //! histo with DCA distibution in the protons hypotesis (positive)
146 TH1F *fHistDCANegPi[kNbins]; //! histo with DCA distibution in the pions hypotesis (negative)
147 TH1F *fHistDCANegK[kNbins]; //! histo with DCA distibution in the kaons hypotesis (negative)
148 TH1F *fHistDCANegP[kNbins]; //! histo with DCA distibution in the protons hypotesis (negative)
10ba520e 149
150 TH1F *fHistMCPrimDCAPosPi[kNbins]; //! histo with DCA distibution, MC truth
151 TH1F *fHistMCPrimDCAPosK[kNbins]; //! histo with DCA distibution, MC truth
152 TH1F *fHistMCPrimDCAPosP[kNbins]; //! histo with DCA distibution, MC truth
153 TH1F *fHistMCPrimDCANegPi[kNbins]; //! histo with DCA distibution, MC truth
154 TH1F *fHistMCPrimDCANegK[kNbins]; //! histo with DCA distibution, MC truth
155 TH1F *fHistMCPrimDCANegP[kNbins]; //! histo with DCA distibution, MC truth
156
157 TH1F *fHistMCSecStDCAPosPi[kNbins]; //! histo with DCA distibution, MC truth
158 TH1F *fHistMCSecStDCAPosK[kNbins]; //! histo with DCA distibution, MC truth
159 TH1F *fHistMCSecStDCAPosP[kNbins]; //! histo with DCA distibution, MC truth
160 TH1F *fHistMCSecStDCANegPi[kNbins]; //! histo with DCA distibution, MC truth
161 TH1F *fHistMCSecStDCANegK[kNbins]; //! histo with DCA distibution, MC truth
162 TH1F *fHistMCSecStDCANegP[kNbins]; //! histo with DCA distibution, MC truth
163
164 TH1F *fHistMCSecMatDCAPosPi[kNbins]; //! histo with DCA distibution, MC truth
165 TH1F *fHistMCSecMatDCAPosK[kNbins]; //! histo with DCA distibution, MC truth
166 TH1F *fHistMCSecMatDCAPosP[kNbins]; //! histo with DCA distibution, MC truth
167 TH1F *fHistMCSecMatDCANegPi[kNbins]; //! histo with DCA distibution, MC truth
168 TH1F *fHistMCSecMatDCANegK[kNbins]; //! histo with DCA distibution, MC truth
169 TH1F *fHistMCSecMatDCANegP[kNbins]; //! histo with DCA distibution, MC truth
e6076bb8 170
171 TH1F *fHistMCPosPiHypPion[kNbins]; //! histo with dedx using the MC truth
172 TH1F *fHistMCPosPiHypKaon[kNbins]; //! histo with dedx using the MC truth
173 TH1F *fHistMCPosPiHypProton[kNbins]; //! histo with dedx using the MC truth
174 TH1F *fHistMCPosKHypPion[kNbins]; //! histo with dedx using the MC truth
175 TH1F *fHistMCPosKHypKaon[kNbins]; //! histo with dedx using the MC truth
176 TH1F *fHistMCPosKHypProton[kNbins]; //! histo with dedx using the MC truth
177 TH1F *fHistMCPosPHypPion[kNbins]; //! histo with dedx using the MC truth
178 TH1F *fHistMCPosPHypKaon[kNbins]; //! histo with dedx using the MC truth
179 TH1F *fHistMCPosPHypProton[kNbins]; //! histo with dedx using the MC truth
180
181 TH1F *fHistMCNegPiHypPion[kNbins]; //! histo with dedx using the MC truth
182 TH1F *fHistMCNegPiHypKaon[kNbins]; //! histo with dedx using the MC truth
183 TH1F *fHistMCNegPiHypProton[kNbins]; //! histo with dedx using the MC truth
184 TH1F *fHistMCNegKHypPion[kNbins]; //! histo with dedx using the MC truth
185 TH1F *fHistMCNegKHypKaon[kNbins]; //! histo with dedx using the MC truth
186 TH1F *fHistMCNegKHypProton[kNbins]; //! histo with dedx using the MC truth
187 TH1F *fHistMCNegPHypPion[kNbins]; //! histo with dedx using the MC truth
188 TH1F *fHistMCNegPHypKaon[kNbins]; //! histo with dedx using the MC truth
189 TH1F *fHistMCNegPHypProton[kNbins]; //! histo with dedx using the MC truth
36be14b3 190
10ba520e 191 TH1F *fHistPosNSigmaMean[3]; //! NSigma histos for 6 species
192 TH1F *fHistPosNSigmaMCMean[3]; //! NSigma histos for 6 species
193 TH1F *fHistPosNSigmaPrimMean[3]; //! NSigma histos for 6 species
194 TH1F *fHistPosNSigmaPrimMCMean[3]; //! NSigma histos for 6 species
195 TH1F *fHistNegNSigmaMean[3]; //! NSigma histos for 6 species
196 TH1F *fHistNegNSigmaMCMean[3]; //! NSigma histos for 6 species
197 TH1F *fHistNegNSigmaPrimMean[3]; //! NSigma histos for 6 species
198 TH1F *fHistNegNSigmaPrimMCMean[3]; //! NSigma histos for 6 species
199
36be14b3 200 TH1F *fHistPosNSigma[3]; //! NSigma histos for 6 species
10ba520e 201 TH1F *fHistPosNSigmaMC[3]; //! NSigma histos for 6 species
36be14b3 202 TH1F *fHistPosNSigmaPrim[3]; //! NSigma histos for 6 species
203 TH1F *fHistPosNSigmaPrimMC[3]; //! NSigma histos for 6 species
204 TH1F *fHistNegNSigma[3]; //! NSigma histos for 6 species
10ba520e 205 TH1F *fHistNegNSigmaMC[3]; //! NSigma histos for 6 species
36be14b3 206 TH1F *fHistNegNSigmaPrim[3]; //! NSigma histos for 6 species
207 TH1F *fHistNegNSigmaPrimMC[3]; //! NSigma histos for 6 species
208
209 Double_t fPtBinLimits[kNbins+1]; // limits of Pt Bins
98bb3219 210 AliITSPIDResponse* fITSPIDResponse; //! class with BB parameterizations
36be14b3 211 Int_t fMinSPDPts; // minimum number of SPD Points
212 Int_t fMinNdEdxSamples; // minimum number of SDD+SSD points
213 Double_t fMindEdx; // minimum dE/dx value in a layer (to cut noise)
214 Double_t fMinNSigma; // minimum number of sigmas
215 Double_t fMaxY; // maximum rapidity
216 Double_t fMaxChi2Clu; // maximum cluster
217 Double_t fNSigmaDCAxy; // DCA cut in bend. plane
218 Double_t fNSigmaDCAz; // DCA cut along z
dac69cb0 219 Double_t fEtaRange; // limits in pseudorap
c841b89f 220 Int_t fLowMult; // Multiplicity bin
221 Int_t fUpMult; // Multiplicity bin
1f75ac7d 222 Float_t fLowCentrality;//low Centrality cut
223 Float_t fUpCentrality;//up Centrality cut
224 Bool_t fSPD;//use spd2 as mulestimator
225 Bool_t fHImode;//use spd2 as mulestimator
6b77d2c0 226 Int_t fYear; // Year (2009, 2010)
36be14b3 227 Bool_t fMC; //flag to switch on the MC analysis for the efficiency estimation
228 Bool_t fSmearMC; // flag to apply extra smearing on MC
229 Double_t fSmearP; // extra relative smearing on simulated momentum
230 Double_t fSmeardEdx; // extra relative smearing on simulated dE/dx
6b77d2c0 231 TRandom3* fRandGener; // generator for smearing
36be14b3 232 Bool_t fFillNtuple; // fill ntuple
146d18ee 233 Bool_t fLowEnergypp; // flag for counrint ev. in p-p 2.76
36be14b3 234 TNtuple *fNtupleNSigma;//! output ntuple
235 TNtuple *fNtupleMC;//! output MC ntuple
236
146d18ee 237 ClassDef(AliAnalysisTaskSEITSsaSpectra, 7);
36be14b3 238};
239
240#endif