]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/SPECTRA/AliProtonAnalysis.h
effc++ warnings corrected
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliProtonAnalysis.h
CommitLineData
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 19class TF1;
734d2c12 20class TH2F;
21class TH1D;
ee4ca40d 22class AliAODEvent;
23class AliAODtrack;
734d2c12 24class AliESDEvent;
25class AliESDtrack;
26
27class 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:
93 Bool_t IsAccepted(AliESDtrack *track);
94 Float_t GetSigmaToVertex(AliESDtrack* esdTrack);
95 Double_t Rapidity(AliESDtrack *track);
96
97 Int_t fNBinsY; //number of bins in y
98 Float_t fMinY, fMaxY; //min & max value of y
99 Int_t fNBinsPt; //number of bins in pT
100 Float_t fMinPt, fMaxPt; //min & max value of pT
101
102 //cuts
103 Int_t fMinTPCClusters, fMinITSClusters; //min TPC & ITS clusters
104 Double_t fMaxChi2PerTPCCluster, fMaxChi2PerITSCluster; //max chi2 per TPC & ITS cluster
105 Double_t fMaxCov11, fMaxCov22, fMaxCov33, fMaxCov44, fMaxCov55; //max values of cov. matrix
106 Double_t fMaxSigmaToVertex; //max sigma to vertex cut
107 Bool_t fMinTPCClustersFlag, fMinITSClustersFlag; //shows if this cut is used or not
108 Bool_t fMaxChi2PerTPCClusterFlag, fMaxChi2PerITSClusterFlag; //shows if this cut is used or not
109 Bool_t fMaxCov11Flag, fMaxCov22Flag, fMaxCov33Flag, fMaxCov44Flag, fMaxCov55Flag; //shows if this cut is used or not
110 Bool_t fMaxSigmaToVertexFlag; //shows if this cut is used or not
111 Bool_t fITSRefitFlag, fTPCRefitFlag; //shows if this cut is used or not
112
113 //pid
aafecd8b 114 Bool_t fFunctionProbabilityFlag; //flag: kTRUE if functions used
ee4ca40d 115 Double_t fPartFrac[10]; //prior probabilities
aafecd8b 116 TF1 *fElectronFunction; //momentum dependence of the prior probs
117 TF1 *fMuonFunction; //momentum dependence of the prior probs
118 TF1 *fPionFunction; //momentum dependence of the prior probs
119 TF1 *fKaonFunction; //momentum dependence of the prior probs
120 TF1 *fProtonFunction; //momentum dependence of the prior probs
121
122 TH2F *fHistYPtProtons; //Y-Pt of Protons
123 TH2F *fHistYPtAntiProtons; // Y-Pt of Antiprotons
734d2c12 124
125 ClassDef(AliProtonAnalysis,0);
126};
127
128#endif