]>
Commit | Line | Data |
---|---|---|
6b91e8c0 | 1 | #ifndef ALILNID_H |
2 | #define ALILNID_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // class for light nuclei identification | |
8 | // author: Eulogio Serradilla <eulogio.serradilla@cern.ch> | |
9 | ||
10 | #include <TObject.h> | |
11 | #include <AliPID.h> | |
12 | ||
f4d6dd11 | 13 | class TParticle; |
14 | ||
6b91e8c0 | 15 | class AliLnID: public TObject |
16 | { | |
17 | public: | |
18 | AliLnID(); | |
19 | AliLnID(const AliLnID& other); | |
20 | AliLnID& operator=(const AliLnID& other); | |
21 | ||
22 | virtual ~AliLnID(); | |
23 | ||
f4d6dd11 | 24 | Int_t GetPID(const TParticle* p) const; |
6b91e8c0 | 25 | |
26 | Int_t GetPID(Int_t partCode, Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta, Double_t nSigITS=3, Double_t nSigTPC=3, Double_t nSigTOF=3) const; | |
27 | ||
28 | Int_t GetTPCpid(Int_t partCode, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3) const; | |
29 | ||
30 | Int_t GetITSTPCpid(Int_t partCode, Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t nSigmaITS, Double_t pTPC, Double_t dEdxTPC, Double_t nPointsTPC, Double_t nSigmaTPC) const; | |
31 | ||
32 | Int_t GetTPCTOFpid(Int_t partCode, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigmaTPC, Double_t pTOF, Double_t beta, Double_t nSigmaTOF) const; | |
33 | ||
34 | Int_t GetMaxLikelihoodPID(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta) const; | |
35 | ||
36 | Int_t GetBayesPID(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta) const; | |
37 | ||
38 | Bool_t GetITSlikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
39 | Bool_t GetTPClikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
40 | Bool_t GetTOFlikelihood(Double_t p, Double_t beta, Double_t* r) const; | |
41 | ||
42 | Double_t GetBetaExpectedSigma(Double_t p, Double_t mass) const; | |
6b91e8c0 | 43 | |
44 | Bool_t GetITSmatch(Int_t pid, Double_t p, Double_t dEdx, Int_t nPoints, Double_t nSigma=3.) const; | |
45 | Bool_t GetTPCmatch(Int_t pid, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3.) const; | |
46 | Bool_t GetTOFmatch(Int_t pid, Double_t pTOF, Double_t beta, Double_t nSigma=3.) const; | |
6b91e8c0 | 47 | |
48 | Int_t GetPidProcedure() const { return fPidProcedure; } | |
49 | ||
50 | Bool_t IsITSTPCmismatch(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t nSigma=5.) const; | |
51 | Bool_t IsITSTOFmismatch(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTOF, Double_t beta, Double_t nSigma=5.) const; | |
52 | Bool_t IsTPCTOFmismatch(Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta, Double_t nSigma=5.) const; | |
53 | ||
54 | void SetPriorProbabilities(const Double_t* prob); | |
55 | void SetPriorProbabilities(Double_t e, Double_t mu, Double_t pi, Double_t k, Double_t p, Double_t d, Double_t t, Double_t he3, Double_t alpha); | |
56 | ||
57 | void SetPidProcedure(Int_t proc) { fPidProcedure = proc; } | |
58 | ||
59 | void SetITSBetheBlochParams(const Double_t* param, Double_t res=0.13); | |
60 | ||
61 | void SetTPCBetheBlochParams(const Double_t* param, Double_t mip=1., Double_t res=0.06); | |
62 | void SetTPCBetheBlochParams(Double_t c0, Double_t c1, Double_t c2, Double_t c3, Double_t c4, Double_t mip=1., Double_t res=0.06); | |
63 | ||
78a09943 | 64 | void SetTPCChargeCorrection(Double_t zexp) { fZexp = zexp; } |
65 | ||
6b91e8c0 | 66 | enum { kSPECIES = 9 }; |
67 | enum { kBayes, kMaxLikelihood, kTPC, kITSTPC, kTPCTOF }; | |
68 | ||
69 | private: | |
70 | ||
71 | Double_t Beta(Double_t p, Double_t m) const; | |
72 | Bool_t GetLikelihood(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta, Double_t* r) const; | |
73 | Int_t GetIndexOfMaxValue(const Double_t* w) const; | |
74 | ||
75 | private: | |
76 | ||
77 | Int_t fPidProcedure; // PID procedure code | |
6b91e8c0 | 78 | AliPID::EParticleType fSpecies[kSPECIES]; // particle species known by the pid |
79 | ||
80 | Double_t fPrior[kSPECIES]; // prior probabilities | |
81 | Double_t fRange; // number of sigmas to the expected values | |
78a09943 | 82 | Double_t fZexp; // TPC BB charge dependence |
6b91e8c0 | 83 | |
84 | class AliITSPIDResponse* fITSpid; // ITS likelihood | |
85 | class AliTPCPIDResponse* fTPCpid; // TPC likelihood | |
86 | ||
87 | ClassDef(AliLnID, 1) | |
88 | }; | |
89 | ||
90 | #endif // ALILNID_H |