]>
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> | |
3f6d0c08 | 17 | #include "TH1I.h" |
18 | ||
ee4ca40d | 19 | #include "AliPID.h" |
734d2c12 | 20 | |
aafecd8b | 21 | class TF1; |
734d2c12 | 22 | class TH2F; |
23 | class TH1D; | |
3f6d0c08 | 24 | |
ee4ca40d | 25 | class AliAODEvent; |
26 | class AliAODtrack; | |
734d2c12 | 27 | class AliESDEvent; |
28 | class AliESDtrack; | |
2b748670 | 29 | class AliExternalTrackParam; |
e4358d7f | 30 | class AliStack; |
734d2c12 | 31 | |
32 | class AliProtonAnalysis : public TObject { | |
33 | public: | |
34 | AliProtonAnalysis(); | |
35 | AliProtonAnalysis(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
36 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
37 | virtual ~AliProtonAnalysis(); | |
2b748670 | 38 | |
39 | void UseTPCOnly() {fUseTPCOnly = kTRUE;} | |
734d2c12 | 40 | |
41 | void InitHistograms(Int_t nbinsY, Float_t fLowY, Float_t fHighY, | |
42 | Int_t nbinsPt, Float_t fLowPt, Float_t fHighPt); | |
2b748670 | 43 | Bool_t ReadFromFile(const char* filename); |
734d2c12 | 44 | void Analyze(AliESDEvent* fESD); |
ee4ca40d | 45 | void Analyze(AliAODEvent* fAOD); |
e4358d7f | 46 | void Analyze(AliStack* stack); |
734d2c12 | 47 | |
48 | TH2F *GetProtonYPtHistogram() {return fHistYPtProtons;} | |
49 | TH2F *GetAntiProtonYPtHistogram() {return fHistYPtAntiProtons;} | |
50 | TH1D *GetProtonYHistogram(); | |
51 | TH1D *GetAntiProtonYHistogram(); | |
52 | TH1D *GetProtonPtHistogram(); | |
53 | TH1D *GetAntiProtonPtHistogram(); | |
54 | TH1D *GetYRatioHistogram(); | |
55 | TH1D *GetPtRatioHistogram(); | |
56 | TH1D *GetYAsymmetryHistogram(); | |
57 | TH1D *GetPtAsymmetryHistogram(); | |
3f6d0c08 | 58 | |
59 | Int_t GetNumberOfAnalyzedEvents() {return (Int_t)fHistEvents->GetEntries();} | |
60 | Bool_t PrintMean(TH1 *hist, Double_t edge); | |
61 | Bool_t PrintYields(TH1 *hist, Double_t edge); | |
62 | ||
734d2c12 | 63 | //Cut functions |
64 | void SetMinTPCClusters(Int_t minTPCClusters) { | |
65 | fMinTPCClusters = minTPCClusters; | |
66 | fMinTPCClustersFlag = kTRUE; | |
67 | } | |
68 | void SetMinITSClusters(Int_t minITSClusters) { | |
69 | fMinITSClusters = minITSClusters; | |
70 | fMinITSClustersFlag = kTRUE; | |
71 | } | |
72 | void SetMaxChi2PerTPCCluster(Double_t maxChi2PerTPCCluster) { | |
73 | fMaxChi2PerTPCCluster = maxChi2PerTPCCluster; | |
74 | fMaxChi2PerTPCClusterFlag = kTRUE; | |
75 | } | |
76 | void SetMaxChi2PerITSCluster(Double_t maxChi2PerITSCluster) { | |
77 | fMaxChi2PerITSCluster = maxChi2PerITSCluster; | |
78 | fMaxChi2PerITSClusterFlag = kTRUE; | |
79 | } | |
80 | void SetMaxCov11(Double_t maxCov11) {fMaxCov11 = maxCov11; fMaxCov11Flag = kTRUE;} | |
81 | void SetMaxCov22(Double_t maxCov22) {fMaxCov22 = maxCov22; fMaxCov22Flag = kTRUE;} | |
82 | void SetMaxCov33(Double_t maxCov33) {fMaxCov33 = maxCov33; fMaxCov33Flag = kTRUE;} | |
83 | void SetMaxCov44(Double_t maxCov44) {fMaxCov44 = maxCov44; fMaxCov44Flag = kTRUE;} | |
84 | void SetMaxCov55(Double_t maxCov55) {fMaxCov55 = maxCov55; fMaxCov55Flag = kTRUE;} | |
85 | void SetMaxSigmaToVertex(Double_t maxSigmaToVertex) { | |
86 | fMaxSigmaToVertex = maxSigmaToVertex; | |
87 | fMaxSigmaToVertexFlag = kTRUE; | |
88 | } | |
89 | void SetITSRefit() {fITSRefitFlag = kTRUE;} | |
90 | void SetTPCRefit() {fTPCRefitFlag = kTRUE;} | |
91 | ||
92 | //Prior probabilities | |
ee4ca40d | 93 | void SetPriorProbabilities(Double_t *partFrac) {for(Int_t i = 0; i < AliPID::kSPECIESN; i++) fPartFrac[i] = partFrac[i];} |
aafecd8b | 94 | void SetPriorProbabilityFunctions(TF1 *felectron, TF1 *fmuon, TF1 *fpion, TF1 *fkaon, TF1 *fproton) { |
95 | fFunctionProbabilityFlag = kTRUE; | |
96 | fElectronFunction = felectron; | |
97 | fMuonFunction = fmuon; | |
98 | fPionFunction = fpion; | |
99 | fKaonFunction = fkaon; | |
100 | fProtonFunction = fproton; | |
101 | } | |
102 | Double_t GetParticleFraction(Int_t i, Double_t p); | |
103 | ||
734d2c12 | 104 | private: |
8b8b0b7a | 105 | AliProtonAnalysis(const AliProtonAnalysis&); // Not implemented |
106 | AliProtonAnalysis& operator=(const AliProtonAnalysis&); // Not implemented | |
107 | ||
734d2c12 | 108 | Bool_t IsAccepted(AliESDtrack *track); |
109 | Float_t GetSigmaToVertex(AliESDtrack* esdTrack); | |
2b748670 | 110 | Double_t Rapidity(Double_t Px, Double_t Py, Double_t Pz); |
734d2c12 | 111 | |
112 | Int_t fNBinsY; //number of bins in y | |
113 | Float_t fMinY, fMaxY; //min & max value of y | |
114 | Int_t fNBinsPt; //number of bins in pT | |
115 | Float_t fMinPt, fMaxPt; //min & max value of pT | |
116 | ||
117 | //cuts | |
118 | Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters | |
119 | Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster | |
120 | Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix | |
121 | Double_t fMaxSigmaToVertex; //max sigma to vertex cut | |
122 | Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not | |
123 | Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not | |
124 | Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not | |
125 | Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not | |
126 | Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not | |
127 | ||
128 | //pid | |
aafecd8b | 129 | Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used |
ee4ca40d | 130 | Double_t fPartFrac[10]; //prior probabilities |
aafecd8b | 131 | TF1 *fElectronFunction; //momentum dependence of the prior probs |
132 | TF1 *fMuonFunction; //momentum dependence of the prior probs | |
133 | TF1 *fPionFunction; //momentum dependence of the prior probs | |
134 | TF1 *fKaonFunction; //momentum dependence of the prior probs | |
135 | TF1 *fProtonFunction; //momentum dependence of the prior probs | |
136 | ||
2b748670 | 137 | //Detectors |
138 | Bool_t fUseTPCOnly; //kTRUE if TPC only information is used | |
139 | ||
3f6d0c08 | 140 | TH1I *fHistEvents; //event counter |
aafecd8b | 141 | TH2F *fHistYPtProtons; //Y-Pt of Protons |
142 | TH2F *fHistYPtAntiProtons; // Y-Pt of Antiprotons | |
734d2c12 | 143 | |
144 | ClassDef(AliProtonAnalysis,0); | |
145 | }; | |
146 | ||
147 | #endif |