1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // Several studies done on clean samples of electrons, pions and kaons
19 // More information can be found in the implementation file
33 class TMultiLayerPerceptron;
40 class AliExternalTrackParam;
44 class AliHFEcollection;
50 class AliHFEpidQA : public TObject{
54 AliHFEpidQA(const AliHFEpidQA &ref);
55 AliHFEpidQA &operator=(const AliHFEpidQA &ref);
56 virtual void Copy(TObject &o) const;
65 Bool_t HasV0pidQA() const { return TestBit(kV0pidQA); };
66 Bool_t HasRecalculateTRDpid() const { return TestBit(kRecalculateTRDpid); };
68 void SetEvent(AliVEvent* const ev) { fEvent = ev; };
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); };
72 void SetTRDTotalChargeInSlice0() { fTRDTotalChargeInSlice0 = kTRUE; }
74 void SetPIDResponse(AliPIDResponse* const pid) { fESDpid = pid; }
75 Float_t TOFbeta(const AliESDtrack* const track) const;
78 void SetNNref(TFile *f) { fNNref = f; };
80 AliHFEtrdPIDqa *GetTRDQA() const { return fTRDpidQA; }
85 kRecalculateTRDpid = BIT(15)
87 enum{ // detectors for histogram names
94 TObjArray *MakeTrackList(const TObjArray *tracks) const;
95 TObjArray *MakeCleanListElectrons(const TObjArray *tracks) const;
97 void MakePurity(const TObjArray *tracks, Int_t species);
98 TObjArray *MakeCleanListForTRD(const TObjArray * const track, Int_t species);
99 void FillElectronLikelihoods(const TObjArray * const particles, Int_t species);
100 void FillPIDresponse(const TObjArray * const particles, Int_t species);
101 void FillIllumination(const TObjArray *const particles, Int_t species);
102 void FillTPCinfo(AliESDtrack * const track, Int_t species);
103 void TestTRDResponse(const TObjArray * const tracks, Int_t species);
104 void RecalculateTRDpid(AliESDtrack *track, Double_t *pidProbs) const;
105 void RecalculateTRDpid(AliAODTrack *track, Double_t *pidProbs) const;
106 void CheckTenderV0pid(const TObjArray * const particles, Int_t species);
107 Int_t GetTenderV0pid(AliESDtrack * const track);
109 Double_t TRDlikeTracklet(Int_t layer, AliESDtrack * const track, Double_t *likelihood);
110 Int_t TRDmomBin(Double_t p) const;
113 Int_t GetMaxPID(const Double_t *pidProbs) const;
114 Int_t GetPDG(Int_t index);
117 AliVEvent *fEvent; // event pointer
118 AliMCEvent *fMC; // MC Event
119 AliHFEV0pid *fV0pid; // V0 PID
120 AliHFEV0pidMC *fV0pidMC; // V0 MC PID
121 AliHFEtrdPIDqa *fTRDpidQA; //! TRD PID QA object
122 AliHFEcollection *fOutput; // Output container
123 AliPIDResponse *fESDpid; // ESD PID object
125 TFile *fNNref; // reference file for NN pid
126 TMultiLayerPerceptron *fNet[11]; // reference networks
127 Bool_t fTRDTotalChargeInSlice0; // Fix for Foreward/Backward compatibility
129 ClassDef(AliHFEpidQA, 1) // PID QA tool