]>
Commit | Line | Data |
---|---|---|
70da6c5a | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Class for PID QA | |
17 | // Several studies done on clean samples of electrons, pions and kaons | |
18 | // coming from V0 PID | |
19 | // More information can be found in the implementation file | |
20 | // | |
c2690925 | 21 | #ifndef ALIHFEPIDQA_H |
22 | #define ALIHFEPIDQA_H | |
23 | ||
70da6c5a | 24 | #ifndef ROOT_TObject |
25 | #include <TObject.h> | |
26 | #endif | |
27 | ||
28 | class TList; | |
29 | class TObjArray; | |
faee3b18 | 30 | class TPDGCode; |
31 | class TParticle; | |
32 | class TFile; | |
33 | class TMultiLayerPerceptron; | |
70da6c5a | 34 | |
35 | class AliAODTrack; | |
36 | class AliESDtrack; | |
70da6c5a | 37 | class AliMCEvent; |
70da6c5a | 38 | class AliVEvent; |
8c1c76e9 | 39 | class AliPIDResponse; |
faee3b18 | 40 | class AliExternalTrackParam; |
41 | class AliLog; | |
42 | ||
70da6c5a | 43 | class AliHFEV0pidMC; |
faee3b18 | 44 | class AliHFEcollection; |
45 | class AliHFEtrdPIDqa; | |
46 | class AliHFEV0pid; | |
47 | class AliHFEpidTRD; | |
48 | ||
70da6c5a | 49 | |
50 | class AliHFEpidQA : public TObject{ | |
51 | public: | |
52 | AliHFEpidQA(); | |
53 | ~AliHFEpidQA(); | |
faee3b18 | 54 | AliHFEpidQA(const AliHFEpidQA &ref); |
55 | AliHFEpidQA &operator=(const AliHFEpidQA &ref); | |
56 | virtual void Copy(TObject &o) const; | |
70da6c5a | 57 | |
58 | void Init(); | |
faee3b18 | 59 | void Process(); |
70da6c5a | 60 | |
61 | TList *GetOutput(); | |
62 | TList *GetV0pidQA(); | |
63 | TList *GetV0pidMC(); | |
64 | ||
65 | Bool_t HasV0pidQA() const { return TestBit(kV0pidQA); }; | |
66 | Bool_t HasRecalculateTRDpid() const { return TestBit(kRecalculateTRDpid); }; | |
67 | ||
faee3b18 | 68 | void SetEvent(AliVEvent* const ev) { fEvent = ev; }; |
70da6c5a | 69 | void SetMCEvent(AliMCEvent * const mc) { fMC = mc; }; |
70 | void SetV0pidQA(Bool_t v0pidQA = kTRUE) { SetBit(kV0pidQA, v0pidQA); }; | |
71 | void SetRecalculateTRDpid(Bool_t recal = kTRUE) { SetBit(kRecalculateTRDpid, recal); }; | |
e156c3bb | 72 | void SetTRDTotalChargeInSlice0() { fTRDTotalChargeInSlice0 = kTRUE; } |
70da6c5a | 73 | |
8c1c76e9 | 74 | void SetPIDResponse(AliPIDResponse* const pid) { fESDpid = pid; } |
e156c3bb | 75 | Float_t TOFbeta(const AliESDtrack* const track) const; |
faee3b18 | 76 | |
77 | void CheckEvent(); | |
78 | void SetNNref(TFile *f) { fNNref = f; }; | |
79 | ||
80 | AliHFEtrdPIDqa *GetTRDQA() const { return fTRDpidQA; } | |
70da6c5a | 81 | |
e17c1f86 | 82 | Int_t GetCentrality(AliVEvent* const fInputEvent); |
a8ef1999 | 83 | Int_t GetMultiplicityITS(AliVEvent* const fInputEvent) const; |
e17c1f86 | 84 | void SetPbPb() { fIsPbPb = kTRUE; }; |
85 | void SetPP() { fIsPbPb = kFALSE; }; | |
86 | void SetPPMultiBin() { fIsppMultiBin = kFALSE; }; | |
87 | Bool_t IsPbPb() const { return fIsPbPb; }; | |
88 | Bool_t IsPP() const { return !fIsPbPb; }; | |
89 | Bool_t IsPPMultiBin() const { return fIsppMultiBin; }; | |
90 | ||
70da6c5a | 91 | protected: |
92 | enum{ | |
93 | kV0pidQA = BIT(14), | |
94 | kRecalculateTRDpid = BIT(15) | |
95 | }; | |
96 | enum{ // detectors for histogram names | |
97 | kITS = 0, | |
98 | kTPC = 1, | |
99 | kTRD = 2, | |
faee3b18 | 100 | kTOF = 3 |
70da6c5a | 101 | }; |
102 | ||
3a72645a | 103 | TObjArray *MakeTrackList(const TObjArray *tracks) const; |
104 | TObjArray *MakeCleanListElectrons(const TObjArray *tracks) const; | |
105 | ||
106 | void MakePurity(const TObjArray *tracks, Int_t species); | |
107 | TObjArray *MakeCleanListForTRD(const TObjArray * const track, Int_t species); | |
108 | void FillElectronLikelihoods(const TObjArray * const particles, Int_t species); | |
109 | void FillPIDresponse(const TObjArray * const particles, Int_t species); | |
110 | void FillIllumination(const TObjArray *const particles, Int_t species); | |
faee3b18 | 111 | void FillTPCinfo(AliESDtrack * const track, Int_t species); |
8c1c76e9 | 112 | void TestTRDResponse(const TObjArray * const tracks, Int_t species); |
70da6c5a | 113 | void RecalculateTRDpid(AliESDtrack *track, Double_t *pidProbs) const; |
114 | void RecalculateTRDpid(AliAODTrack *track, Double_t *pidProbs) const; | |
3a72645a | 115 | void CheckTenderV0pid(const TObjArray * const particles, Int_t species); |
faee3b18 | 116 | Int_t GetTenderV0pid(AliESDtrack * const track); |
117 | ||
118 | Double_t TRDlikeTracklet(Int_t layer, AliESDtrack * const track, Double_t *likelihood); | |
6555e2ad | 119 | Int_t TRDmomBin(Double_t p) const; |
70da6c5a | 120 | |
e17c1f86 | 121 | |
122 | ||
123 | ||
faee3b18 | 124 | protected: |
3a72645a | 125 | Int_t GetMaxPID(const Double_t *pidProbs) const; |
faee3b18 | 126 | Int_t GetPDG(Int_t index); |
127 | ||
70da6c5a | 128 | private: |
faee3b18 | 129 | AliVEvent *fEvent; // event pointer |
70da6c5a | 130 | AliMCEvent *fMC; // MC Event |
131 | AliHFEV0pid *fV0pid; // V0 PID | |
132 | AliHFEV0pidMC *fV0pidMC; // V0 MC PID | |
faee3b18 | 133 | AliHFEtrdPIDqa *fTRDpidQA; //! TRD PID QA object |
70da6c5a | 134 | AliHFEcollection *fOutput; // Output container |
8c1c76e9 | 135 | AliPIDResponse *fESDpid; // ESD PID object |
faee3b18 | 136 | private: |
137 | TFile *fNNref; // reference file for NN pid | |
138 | TMultiLayerPerceptron *fNet[11]; // reference networks | |
e156c3bb | 139 | Bool_t fTRDTotalChargeInSlice0; // Fix for Foreward/Backward compatibility |
e17c1f86 | 140 | |
141 | Bool_t fIsPbPb; // Analysis Type: pp or PbPb | |
142 | Bool_t fIsppMultiBin; // pp multiplicity bin analysis | |
143 | ||
70da6c5a | 144 | ClassDef(AliHFEpidQA, 1) // PID QA tool |
145 | }; | |
146 | #endif |