]>
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 | ||
13 | class AliLnID: public TObject | |
14 | { | |
15 | public: | |
16 | AliLnID(); | |
17 | AliLnID(const AliLnID& other); | |
18 | AliLnID& operator=(const AliLnID& other); | |
19 | ||
20 | virtual ~AliLnID(); | |
21 | ||
22 | Int_t GetPID(const class TParticle* p) const; | |
23 | ||
24 | 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; | |
25 | ||
26 | Int_t GetTPCpid(Int_t partCode, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3) const; | |
27 | ||
28 | 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; | |
29 | ||
30 | 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; | |
31 | ||
32 | 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; | |
33 | ||
34 | 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; | |
35 | ||
36 | Bool_t GetITSlikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
37 | Bool_t GetTPClikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
38 | Bool_t GetTOFlikelihood(Double_t p, Double_t beta, Double_t* r) const; | |
39 | ||
40 | Double_t GetBetaExpectedSigma(Double_t p, Double_t mass) const; | |
41 | Double_t GetM2ExpectedSigma(Double_t p, Double_t mass) const; | |
42 | ||
43 | Bool_t GetITSmatch(Int_t pid, Double_t p, Double_t dEdx, Int_t nPoints, Double_t nSigma=3.) const; | |
44 | Bool_t GetTPCmatch(Int_t pid, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3.) const; | |
45 | Bool_t GetTOFmatch(Int_t pid, Double_t pTOF, Double_t beta, Double_t nSigma=3.) const; | |
46 | Bool_t GetM2match(Int_t pid, Double_t pTOF, Double_t m2, Double_t nSigma=3.) const; | |
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 | ||
64 | enum { kSPECIES = 9 }; | |
65 | enum { kBayes, kMaxLikelihood, kTPC, kITSTPC, kTPCTOF }; | |
66 | ||
67 | private: | |
68 | ||
69 | Double_t Beta(Double_t p, Double_t m) const; | |
70 | 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; | |
71 | Int_t GetIndexOfMaxValue(const Double_t* w) const; | |
72 | ||
73 | private: | |
74 | ||
75 | Int_t fPidProcedure; // PID procedure code | |
76 | const Int_t fkNumSpecies; // number of particle species | |
77 | AliPID::EParticleType fSpecies[kSPECIES]; // particle species known by the pid | |
78 | ||
79 | Double_t fPrior[kSPECIES]; // prior probabilities | |
80 | Double_t fRange; // number of sigmas to the expected values | |
81 | ||
82 | class AliITSPIDResponse* fITSpid; // ITS likelihood | |
83 | class AliTPCPIDResponse* fTPCpid; // TPC likelihood | |
84 | ||
85 | ClassDef(AliLnID, 1) | |
86 | }; | |
87 | ||
88 | #endif // ALILNID_H |