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