]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG3/hfe/AliHFEpidQA.h
Major update of the HFE package (comments inside the code
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidQA.h
... / ...
CommitLineData
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//
21#ifndef ALIHFEPIDQA_H
22#define ALIHFEPIDQA_H
23
24#ifndef ROOT_TObject
25#include <TObject.h>
26#endif
27
28class TList;
29class TObjArray;
30class TPDGCode;
31class TParticle;
32class TFile;
33class TMultiLayerPerceptron;
34
35class AliAODTrack;
36class AliESDtrack;
37class AliMCEvent;
38class AliVEvent;
39class AliESDpid;
40class AliExternalTrackParam;
41class AliLog;
42
43class AliHFEV0pidMC;
44class AliHFEcollection;
45class AliHFEtrdPIDqa;
46class AliHFEV0pid;
47class AliHFEpidTRD;
48
49
50class AliHFEpidQA : public TObject{
51 public:
52 AliHFEpidQA();
53 ~AliHFEpidQA();
54 AliHFEpidQA(const AliHFEpidQA &ref);
55 AliHFEpidQA &operator=(const AliHFEpidQA &ref);
56 virtual void Copy(TObject &o) const;
57
58 void Init();
59 void Process();
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
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
73 void SetESDpid(AliESDpid* const pid) { fESDpid = pid; }
74 Float_t TOFbeta(AliESDtrack* const track) const;
75
76 void CheckEvent();
77 void SetNNref(TFile *f) { fNNref = f; };
78
79 AliHFEtrdPIDqa *GetTRDQA() const { return fTRDpidQA; }
80
81 protected:
82 enum{
83 kV0pidQA = BIT(14),
84 kRecalculateTRDpid = BIT(15)
85 };
86 enum{ // detectors for histogram names
87 kITS = 0,
88 kTPC = 1,
89 kTRD = 2,
90 kTOF = 3
91 };
92
93 TObjArray *MakeTrackList(const TObjArray *tracks) const;
94 TObjArray *MakeCleanListElectrons(const TObjArray *tracks) const;
95
96 void MakePurity(const TObjArray *tracks, Int_t species);
97 TObjArray *MakeCleanListForTRD(const TObjArray * const track, Int_t species);
98 void FillElectronLikelihoods(const TObjArray * const particles, Int_t species);
99 void FillPIDresponse(const TObjArray * const particles, Int_t species);
100 void FillIllumination(const TObjArray *const particles, Int_t species);
101 void FillTPCinfo(AliESDtrack * const track, Int_t species);
102 void RecalculateTRDpid(AliESDtrack *track, Double_t *pidProbs) const;
103 void RecalculateTRDpid(AliAODTrack *track, Double_t *pidProbs) const;
104 void CheckTenderV0pid(const TObjArray * const particles, Int_t species);
105 Int_t GetTenderV0pid(AliESDtrack * const track);
106
107 Double_t TRDlikeTracklet(Int_t layer, AliESDtrack * const track, Double_t *likelihood);
108 const Int_t TRDmomBin(Double_t p);
109
110 protected:
111 Int_t GetMaxPID(const Double_t *pidProbs) const;
112 Int_t GetPDG(Int_t index);
113
114 private:
115 AliVEvent *fEvent; // event pointer
116 AliMCEvent *fMC; // MC Event
117 AliHFEV0pid *fV0pid; // V0 PID
118 AliHFEV0pidMC *fV0pidMC; // V0 MC PID
119 AliHFEtrdPIDqa *fTRDpidQA; //! TRD PID QA object
120 AliHFEcollection *fOutput; // Output container
121 AliESDpid *fESDpid; // ESD PID object
122 private:
123 TFile *fNNref; // reference file for NN pid
124 TMultiLayerPerceptron *fNet[11]; // reference networks
125
126 ClassDef(AliHFEpidQA, 1) // PID QA tool
127};
128#endif