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