]>
Commit | Line | Data |
---|---|---|
734d2c12 | 1 | #ifndef ALIPROTONANALYSIS_H |
2 | #define ALIPROTONANALYSIS_H | |
3 | ||
4 | /* See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | /* $Id$ */ | |
8 | ||
9 | //------------------------------------------------------------------------- | |
10 | // Class AliProtonAnalysis | |
11 | // This is the class for the baryon (proton) analysis | |
12 | // | |
13 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | #include <TObject.h> | |
ee4ca40d | 17 | #include "AliPID.h" |
734d2c12 | 18 | |
aafecd8b | 19 | class TF1; |
734d2c12 | 20 | class TH2F; |
21 | class TH1D; | |
ee4ca40d | 22 | class AliAODEvent; |
23 | class AliAODtrack; | |
734d2c12 | 24 | class AliESDEvent; |
25 | class AliESDtrack; | |
26 | ||
27 | class AliProtonAnalysis : public TObject { | |
28 | public: | |
29 | AliProtonAnalysis(); | |
30 | AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
31 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
32 | virtual ~AliProtonAnalysis(); | |
33 | ||
34 | void InitHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
35 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
36 | void ReadFromFile(const char* filename); | |
37 | void Analyze(AliESDEvent* fESD); | |
ee4ca40d | 38 | void Analyze(AliAODEvent* fAOD); |
734d2c12 | 39 | |
40 | TH2F *GetProtonYPtHistogram() {return fHistYPtProtons;} | |
41 | TH2F *GetAntiProtonYPtHistogram() {return fHistYPtAntiProtons;} | |
42 | TH1D *GetProtonYHistogram(); | |
43 | TH1D *GetAntiProtonYHistogram(); | |
44 | TH1D *GetProtonPtHistogram(); | |
45 | TH1D *GetAntiProtonPtHistogram(); | |
46 | TH1D *GetYRatioHistogram(); | |
47 | TH1D *GetPtRatioHistogram(); | |
48 | TH1D *GetYAsymmetryHistogram(); | |
49 | TH1D *GetPtAsymmetryHistogram(); | |
50 | ||
51 | //Cut functions | |
52 | void SetMinTPCClusters(Int_t minTPCClusters) { | |
53 | fMinTPCClusters = minTPCClusters; | |
54 | fMinTPCClustersFlag = kTRUE; | |
55 | } | |
56 | void SetMinITSClusters(Int_t minITSClusters) { | |
57 | fMinITSClusters = minITSClusters; | |
58 | fMinITSClustersFlag = kTRUE; | |
59 | } | |
60 | void SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) { | |
61 | fMaxChi2PerTPCCluster = maxChi2PerTPCCluster; | |
62 | fMaxChi2PerTPCClusterFlag = kTRUE; | |
63 | } | |
64 | void SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) { | |
65 | fMaxChi2PerITSCluster = maxChi2PerITSCluster; | |
66 | fMaxChi2PerITSClusterFlag = kTRUE; | |
67 | } | |
68 | void SetMaxCov11(Double_t maxCov11) {fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;} | |
69 | void SetMaxCov22(Double_t maxCov22) {fMaxCov22 = maxCov22; fMaxCov22Flag = kTRUE;} | |
70 | void SetMaxCov33(Double_t maxCov33) {fMaxCov33 = maxCov33; fMaxCov33Flag = kTRUE;} | |
71 | void SetMaxCov44(Double_t maxCov44) {fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;} | |
72 | void SetMaxCov55(Double_t maxCov55) {fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;} | |
73 | void SetMaxSigmaToVertex(Double_t maxSigmaToVertex) { | |
74 | fMaxSigmaToVertex = maxSigmaToVertex; | |
75 | fMaxSigmaToVertexFlag = kTRUE; | |
76 | } | |
77 | void SetITSRefit() {fITSRefitFlag = kTRUE;} | |
78 | void SetTPCRefit() {fTPCRefitFlag = kTRUE;} | |
79 | ||
80 | //Prior probabilities | |
ee4ca40d | 81 | void SetPriorProbabilities(Double_t *partFrac) {for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} |
aafecd8b | 82 | void SetPriorProbabilityFunctions(TF1 *felectron, TF1 *fmuon, TF1 *fpion, TF1 *fkaon, TF1 *fproton) { |
83 | fFunctionProbabilityFlag = kTRUE; | |
84 | fElectronFunction = felectron; | |
85 | fMuonFunction = fmuon; | |
86 | fPionFunction = fpion; | |
87 | fKaonFunction = fkaon; | |
88 | fProtonFunction = fproton; | |
89 | } | |
90 | Double_t GetParticleFraction(Int_t i, Double_t p); | |
91 | ||
734d2c12 | 92 | private: |
8b8b0b7a | 93 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
94 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
95 | ||
734d2c12 | 96 | Bool_t IsAccepted(AliESDtrack *track); |
97 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack); | |
98 | Double_t Rapidity(AliESDtrack *track); | |
99 | ||
100 | Int_t fNBinsY; //number of bins in y | |
101 | Float_t fMinY, fMaxY; //min & max value of y | |
102 | Int_t fNBinsPt; //number of bins in pT | |
103 | Float_t fMinPt, fMaxPt; //min & max value of pT | |
104 | ||
105 | //cuts | |
106 | Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters | |
107 | Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster | |
108 | Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix | |
109 | Double_t fMaxSigmaToVertex; //max sigma to vertex cut | |
110 | Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not | |
111 | Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not | |
112 | Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not | |
113 | Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not | |
114 | Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not | |
115 | ||
116 | //pid | |
aafecd8b | 117 | Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used |
ee4ca40d | 118 | Double_t fPartFrac[10]; //prior probabilities |
aafecd8b | 119 | TF1 *fElectronFunction; //momentum dependence of the prior probs |
120 | TF1 *fMuonFunction; //momentum dependence of the prior probs | |
121 | TF1 *fPionFunction; //momentum dependence of the prior probs | |
122 | TF1 *fKaonFunction; //momentum dependence of the prior probs | |
123 | TF1 *fProtonFunction; //momentum dependence of the prior probs | |
124 | ||
125 | TH2F *fHistYPtProtons; //Y-Pt of Protons | |
126 | TH2F *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
734d2c12 | 127 | |
128 | ClassDef(AliProtonAnalysis,0); | |
129 | }; | |
130 | ||
131 | #endif |