]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliAnalysisTaskSEITSsaSpectra.h
added ration ITS global/TPC
[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
15class TString;
16class TTree;
17class TH1F;
18class TH2F;
19class TRandom3;
20class AliESDEvent;
21class TNtuple;
22
23#include "AliAnalysisTaskSE.h"
24
25class 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
34 void SetMaxChi2Clu(Double_t chi=1.){
35 fMaxChi2Clu=chi;
36 }
37 void SetRapidityRange(Double_t dy=0.5){
38 fMaxY=dy;
39 }
40 void SetMinNSigma(Double_t ns=3.){
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 }
56
57 void SetReadMC(Bool_t flag = kTRUE) {fMC = flag;}
58 void SetFillNtuple(Bool_t fill=kTRUE) {fFillNtuple=fill;}
59 void SetSmearMC(Double_t smearp, Double_t smeardedx){
60 fSmearMC=kTRUE;
61 fSmearP=smearp;
62 fSmeardEdx=smeardedx;
63 }
4d668cf7 64 Double_t BetheBloch(Double_t bg,Bool_t optMC) const;
65 Double_t CookdEdx(Double_t *s) const;
66 Double_t Eta2y(Double_t pt, Double_t m, Double_t eta) const;
67 Bool_t DCAcut(Double_t impactXY, Double_t impactZ, Double_t pt, Bool_t optMC) const;
36be14b3 68
69 private:
70 AliAnalysisTaskSEITSsaSpectra(const AliAnalysisTaskSEITSsaSpectra &source);
71 AliAnalysisTaskSEITSsaSpectra& operator=(const AliAnalysisTaskSEITSsaSpectra &source);
72
73 enum {kNbins=22};
74
75 AliESDEvent *fESD; //ESD object
76 TList *fOutput; //! tlist with output
77 TH1F *fHistNEvents; //! histo with number of events
78 TH1F *fHistNTracks; //! histo with number of tracks
79
80 TH2F *fHistDEDX; //! histo with dedx versus momentum
81 TH2F *fHistDEDXdouble; //! histo with dedx versus signed momentum
82
83 TH1F *fHistBeforeEvSel; //! histo with pt distribution before my event selection
84 TH1F *fHistAfterEvSel; //! histo with pt distribution after my event selection
85
86 TH1F *fHistMCpos[3]; //! histo with spectra from the MC truth (positive)
87 TH1F *fHistMCneg[3]; //! histo with spectra from the MC truth (negative)
88 TH1F *fHistMCposBefEvSel[3]; //! histo with spectra from the MC truth (positive)
89 TH1F *fHistMCnegBefEvSel[3]; //! histo with spectra from the MC truth (negative)
90
91 TH1F *fHistCharge[4]; //! histo with charge distribution to check the calibration
92
93 TH1F *fHistPosPi[kNbins]; //! histo with dedx distibution in the pions hypotesis (positive)
94 TH1F *fHistPosK[kNbins]; //! histo with dedx distibution in the kaons hypotesis (positive)
95 TH1F *fHistPosP[kNbins]; //! histo with dedx distibution in the protons hypotesis (positive)
96 TH1F *fHistNegPi[kNbins]; //! histo with dedx distibution in the pions hypotesis (negative)
97 TH1F *fHistNegK[kNbins]; //! histo with dedx distibution in the kaons hypotesis (negative)
98 TH1F *fHistNegP[kNbins]; //! histo with dedx distibution in the protons hypotesis (negative)
99
100 TH1F *fHistDCAPosPi[kNbins]; //! histo with DCA distibution in the pions hypotesis (positive)
101 TH1F *fHistDCAPosK[kNbins]; //! histo with DCA distibution in the kaons hypotesis (positive)
102 TH1F *fHistDCAPosP[kNbins]; //! histo with DCA distibution in the protons hypotesis (positive)
103 TH1F *fHistDCANegPi[kNbins]; //! histo with DCA distibution in the pions hypotesis (negative)
104 TH1F *fHistDCANegK[kNbins]; //! histo with DCA distibution in the kaons hypotesis (negative)
105 TH1F *fHistDCANegP[kNbins]; //! histo with DCA distibution in the protons hypotesis (negative)
106
107 TH1F *fHistMCPosPi[kNbins]; //! histo with dedx using the MC truth in the pions hypotesis (positive)
108 TH1F *fHistMCPosK[kNbins]; //! histo with dedx using the MC truth in the kaons hypotesis (positive)
109 TH1F *fHistMCPosP[kNbins]; //! histo with dedx using the MC truth in the protons hypotesis (positive)
110 TH1F *fHistMCNegPi[kNbins]; //! histo with dedx using the MC truth in the pions hypotesis (negative)
111 TH1F *fHistMCNegK[kNbins]; //! histo with dedx using the MC truth in the kaons hypotesis (negative)
112 TH1F *fHistMCNegP[kNbins]; //! histo with dedx using the MC truth in the protons hypotesis (negative)
113
114 TH1F *fHistPosNSigma[3]; //! NSigma histos for 6 species
115 TH1F *fHistPosNSigmaPrim[3]; //! NSigma histos for 6 species
116 TH1F *fHistPosNSigmaPrimMC[3]; //! NSigma histos for 6 species
117 TH1F *fHistNegNSigma[3]; //! NSigma histos for 6 species
118 TH1F *fHistNegNSigmaPrim[3]; //! NSigma histos for 6 species
119 TH1F *fHistNegNSigmaPrimMC[3]; //! NSigma histos for 6 species
120
121 Double_t fPtBinLimits[kNbins+1]; // limits of Pt Bins
122 Int_t fMinSPDPts; // minimum number of SPD Points
123 Int_t fMinNdEdxSamples; // minimum number of SDD+SSD points
124 Double_t fMindEdx; // minimum dE/dx value in a layer (to cut noise)
125 Double_t fMinNSigma; // minimum number of sigmas
126 Double_t fMaxY; // maximum rapidity
127 Double_t fMaxChi2Clu; // maximum cluster
128 Double_t fNSigmaDCAxy; // DCA cut in bend. plane
129 Double_t fNSigmaDCAz; // DCA cut along z
130
131 Bool_t fMC; //flag to switch on the MC analysis for the efficiency estimation
132 Bool_t fSmearMC; // flag to apply extra smearing on MC
133 Double_t fSmearP; // extra relative smearing on simulated momentum
134 Double_t fSmeardEdx; // extra relative smearing on simulated dE/dx
135 TRandom3* fRandGener; // generator for smaring
136 Bool_t fFillNtuple; // fill ntuple
137 TNtuple *fNtupleNSigma;//! output ntuple
138 TNtuple *fNtupleMC;//! output MC ntuple
139
140 ClassDef(AliAnalysisTaskSEITSsaSpectra, 1);
141};
142
143#endif