]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSPident.h
Implementing QA based on TPC online/offline tracks (Zhongbao)
[u/mrichter/AliRoot.git] / ITS / AliITSPident.h
1 #ifndef ALIITSPIDENT_H
2 #define ALIITSPIDENT_H
3
4 /////////////////////////////////////////////////////////////////////////
5 //Class for PID in the ITS                                               //
6 //The PID is based on the likelihood of all the four ITS' layers,        //
7 //without using the truncated mean for the dE/dx. The response           //
8 //functions for each layer are convoluted Landau-Gaussian functions.     // 
9 // Origin: Elena Bruna bruna@to.infn.it, Massimo Masera masera@to.infn.it//
10 ////////////////////////////////////////////////////////////////////////
11
12 #include <TObject.h>
13 class AliESDtrack;
14 class AliITSSteerPid;
15 class TF1;
16 class AliITSPidParItem;
17 class AliITSPident : public TObject{
18
19  public:
20   AliITSPident();
21   AliITSPident(Double_t mom,AliITSSteerPid *sp,Float_t *Qlay,Float_t *nlay,Float_t priorip=0.066,Float_t priorik=0.103,Float_t prioripi=0.83,Float_t priorie=0.001);
22   
23   AliITSPident(AliESDtrack *track,AliITSSteerPid *sp,Float_t *Qlay,Float_t *nlay,Float_t priorip=0.066,Float_t priorik=0.103,Float_t prioripi=0.83,Float_t priorie=0.001);
24
25   virtual ~AliITSPident();
26   Float_t GetP() const {return fMom;}//local momentum (GeV/c)
27   Double_t GetCondFunPro(Int_t lay) const {
28     return fCondFunProLay[lay];
29   }
30   Double_t GetProdCondFunPro() const;
31   Double_t GetCondFunK(Int_t lay) const {
32     return fCondFunKLay[lay];
33   }
34   Double_t GetProdCondFunK() const;
35   Double_t GetCondFunPi(Int_t lay) const {
36     return fCondFunPiLay[lay];
37   }
38   Double_t GetProdCondFunPi() const;
39   void PrintParameters() const;
40   Float_t GetPBayesp()const {return fPBayesp;}
41   Float_t GetPBayesk()const {return fPBayesk;}
42   Float_t GetPBayespi()const {return fPBayespi;}
43   Float_t GetPPriorip() const {return fPPriorip;}
44   Float_t GetPPriorik() const {return fPPriorik;}
45   Float_t GetPPrioripi() const {return fPPrioripi;}
46   Float_t GetPPriorie() const {return fPPriorie;}
47   void GetNclsPerLayer(Int_t *ncls) const;
48   static Double_t Langaufun(Double_t *x, Double_t *par);
49   static Double_t Langaufun2(Double_t *x, Double_t *par);
50   static Double_t Langaufunnorm(Double_t *x, Double_t *par);
51   static Double_t Gaus2(Double_t *x, Double_t *par);
52   
53  private:
54
55   void CookFunItsLay(Int_t lay,Int_t opt,Double_t *par,Double_t dedx,Double_t mom,Double_t rangei,Double_t rangef,TString comment);
56   void CookBayes(Double_t *condfun,Float_t *prior);
57   Float_t CookCombinedBayes(Double_t condfun[][3],Float_t *prior,Int_t part)const;
58   Float_t CookProd(Double_t condfun[][3],Int_t part) const;
59   Float_t CookSum(Double_t condfun[][3],Float_t *prior) const;
60   AliITSPident(const AliITSPident &ob); // copy constructor
61   AliITSPident& operator=(const AliITSPident & ob); // ass. op.
62
63   Float_t fMom;                   // Particle momentum
64   Double_t fCondFunProLay[8];     // one for each silicon layer
65   Double_t fCondFunKLay[8];       // cond. prob. function kaons per layer
66   Double_t fCondFunPiLay[8];      // cond. prob. function pions per layer
67   Float_t fPBayesp;               // Bayes prob. 
68   Float_t fPBayesk;               // Bayes prob. for kaons
69   Float_t fPBayespi;              // Bayes prob. for pions 
70   Float_t fPPriorip;              // Priori prob. 
71   Float_t fPPriorik;              // Priori prob. for kaons
72   Float_t fPPrioripi;             // Priori prob. for pions
73   Float_t fPPriorie;              // Priori prob. for electrons
74   Int_t fNcls[4];                 // N. of clusters per layer (sdd1,sdd2,ssd1,ssd2) 
75   ClassDef(AliITSPident,3);
76 };
77 #endif