]>
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; |
5ad23888 | 14 | class AliAODMCParticle; |
052278a6 | 15 | class AliITSPIDResponse; |
16 | class AliTPCPIDResponse; | |
f4d6dd11 | 17 | |
6b91e8c0 | 18 | class AliLnID: public TObject |
19 | { | |
20 | public: | |
21 | AliLnID(); | |
22 | AliLnID(const AliLnID& other); | |
23 | AliLnID& operator=(const AliLnID& other); | |
24 | ||
25 | virtual ~AliLnID(); | |
26 | ||
f4d6dd11 | 27 | Int_t GetPID(const TParticle* p) const; |
5ad23888 | 28 | Int_t GetPID(const AliAODMCParticle* p) const; |
29 | Int_t GetPID(Int_t pdgCode) const; | |
6b91e8c0 | 30 | |
31 | 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; | |
32 | ||
5ad23888 | 33 | Int_t GetITSpid(Int_t partCode, Double_t pITS, Double_t dEdx, Double_t nPoints, Double_t nSigma=3) const; |
34 | ||
6b91e8c0 | 35 | Int_t GetTPCpid(Int_t partCode, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3) const; |
36 | ||
37 | 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; | |
38 | ||
39 | 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; | |
40 | ||
41 | 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; | |
42 | ||
43 | 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; | |
44 | ||
45 | Bool_t GetITSlikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
46 | Bool_t GetTPClikelihood(Double_t p, Double_t dEdx, Int_t nPoints, Double_t* r) const; | |
47 | Bool_t GetTOFlikelihood(Double_t p, Double_t beta, Double_t* r) const; | |
48 | ||
49 | Double_t GetBetaExpectedSigma(Double_t p, Double_t mass) const; | |
6b91e8c0 | 50 | |
51 | Bool_t GetITSmatch(Int_t pid, Double_t p, Double_t dEdx, Int_t nPoints, Double_t nSigma=3.) const; | |
52 | Bool_t GetTPCmatch(Int_t pid, Double_t pTPC, Double_t dEdx, Double_t nPoints, Double_t nSigma=3.) const; | |
53 | Bool_t GetTOFmatch(Int_t pid, Double_t pTOF, Double_t beta, Double_t nSigma=3.) const; | |
6b91e8c0 | 54 | |
55 | Int_t GetPidProcedure() const { return fPidProcedure; } | |
56 | ||
57 | 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; | |
58 | Bool_t IsITSTOFmismatch(Double_t pITS, Double_t dEdxITS, Int_t nPointsITS, Double_t pTOF, Double_t beta, Double_t nSigma=5.) const; | |
59 | Bool_t IsTPCTOFmismatch(Double_t pTPC, Double_t dEdxTPC, Int_t nPointsTPC, Double_t pTOF, Double_t beta, Double_t nSigma=5.) const; | |
60 | ||
61 | void SetPriorProbabilities(const Double_t* prob); | |
62 | 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); | |
63 | ||
64 | void SetPidProcedure(Int_t proc) { fPidProcedure = proc; } | |
65 | ||
66 | void SetITSBetheBlochParams(const Double_t* param, Double_t res=0.13); | |
67 | ||
68 | void SetTPCBetheBlochParams(const Double_t* param, Double_t mip=1., Double_t res=0.06); | |
69 | 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); | |
70 | ||
78a09943 | 71 | void SetTPCChargeCorrection(Double_t zexp) { fZexp = zexp; } |
72 | ||
6b91e8c0 | 73 | enum { kSPECIES = 9 }; |
5ad23888 | 74 | enum { kBayes=0, kMaxLikelihood, kITS, kTPC, kITSTPC, kTPCTOF }; |
6b91e8c0 | 75 | |
76 | private: | |
77 | ||
78 | Double_t Beta(Double_t p, Double_t m) const; | |
79 | 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; | |
80 | Int_t GetIndexOfMaxValue(const Double_t* w) const; | |
81 | ||
82 | private: | |
83 | ||
84 | Int_t fPidProcedure; // PID procedure code | |
6b91e8c0 | 85 | AliPID::EParticleType fSpecies[kSPECIES]; // particle species known by the pid |
86 | ||
87 | Double_t fPrior[kSPECIES]; // prior probabilities | |
88 | Double_t fRange; // number of sigmas to the expected values | |
78a09943 | 89 | Double_t fZexp; // TPC BB charge dependence |
6b91e8c0 | 90 | |
052278a6 | 91 | AliITSPIDResponse* fITSpid; // ITS likelihood |
92 | AliTPCPIDResponse* fTPCpid; // TPC likelihood | |
6b91e8c0 | 93 | |
94 | ClassDef(AliLnID, 1) | |
95 | }; | |
96 | ||
97 | #endif // ALILNID_H |