Place the config and root file at the right place
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEV0pid.h
CommitLineData
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// Utility class for V0 PID
17// Provides smaples of electrons, pions and protons
18// More information can be found in the implementation file
19//
c2690925 20#ifndef ALIHFEV0PID_H
21#define ALIHFEV0PID_H
22
e156c3bb 23#ifndef ROOT_TNamed
24#include <TNamed.h>
70da6c5a 25#endif
26
70da6c5a 27class TObjArray;
28class TList;
faee3b18 29class TString;
70da6c5a 30
31class AliESDv0;
32class AliESDtrack;
33class AliKFParticle;
34class AliKFVertex;
35class AliVEvent;
36class AliVTrack;
3a72645a 37class AliMCEvent;
70da6c5a 38
faee3b18 39class AliHFEV0cuts;
40class AliHFEcollection;
41
e156c3bb 42class AliHFEV0pid : public TNamed{
70da6c5a 43 public:
70da6c5a 44 AliHFEV0pid();
e156c3bb 45 AliHFEV0pid(const char *name);
70da6c5a 46 ~AliHFEV0pid();
47
faee3b18 48 void Process(AliVEvent * const inputEvent);
70da6c5a 49 Int_t ProcessV0(TObject *v0);
faee3b18 50 void Flush();
70da6c5a 51
faee3b18 52 void InitQA();
53 TList *GetListOfQAhistograms();
70da6c5a 54
55 TObjArray *GetListOfElectrons() const { return fElectrons; }
56 TObjArray *GetListOfPionsK0() const { return fPionsK0; }
57 TObjArray *GetListOfPionsL() const { return fPionsL; }
58 TObjArray *GetListOfKaons() const { return fKaons; }
59 TObjArray *GetListOfProtons() const { return fProtons; }
60
faee3b18 61 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }
62 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }
63 void SetAODanalysis(Bool_t isAOD = kTRUE) { SetBit(kAODanalysis, isAOD); };
64 void SetESDanalysis(Bool_t isESD = kTRUE) { SetBit(kAODanalysis, !isESD); };
70da6c5a 65
3a72645a 66 void SetMCEvent(AliMCEvent* const ev) { fMCEvent = ev; };
67
faee3b18 68 protected:
70da6c5a 69 enum{
70 kAODanalysis = BIT(14)
faee3b18 71 };
3a72645a 72
73 Int_t PreselectV0(AliESDv0 * const v0, Int_t idMC);
74
75 void ArmenterosPlotMC(AliESDv0 * const v0, Int_t idMC);
70da6c5a 76 Bool_t IsGammaConv(TObject *v0);
77 Bool_t IsK0s(TObject *v0);
8c1c76e9 78 Bool_t IsPhi(const TObject *v0) const;
faee3b18 79 Bool_t IsLambda(TObject *v0);
80 TList *GetV0pidQA();
70da6c5a 81
3a72645a 82 Int_t IdentifyV0(TObject *v0, Int_t d[2]);
83
e97c2edf 84 void BenchmarkV0finder();
85
faee3b18 86 private:
70da6c5a 87 class AliHFEV0pidTrackIndex{
faee3b18 88 public:
89 AliHFEV0pidTrackIndex();
90 ~AliHFEV0pidTrackIndex();
91 void Init(Int_t capacity);
92 void Add(Int_t index, Int_t species);
93 Bool_t Find(Int_t index) const;
94 Bool_t Find(Int_t index, Int_t species) const;
95 Int_t GetNumberOfElectrons() const { return fNElectrons; };
96 Int_t GetNumberOfPionsK0() const { return fNPionsK0; };
97 Int_t GetNumberOfPionsL() const { return fNPionsL; };
98 Int_t GetNumberOfKaons() const { return fNKaons; };
99 Int_t GetNumberOfProtons() const { return fNProtons; };
63bffcf1 100 void Flush();
faee3b18 101
102 private:
103 AliHFEV0pidTrackIndex(const AliHFEV0pidTrackIndex &ref);
104 AliHFEV0pidTrackIndex &operator=(const AliHFEV0pidTrackIndex &ref);
105 Int_t fNElectrons; // Number of identified electrons
106 Int_t fNPionsK0; // Number of identified pions from K0s
107 Int_t fNPionsL; // Lumber of identified pions from Lambda
108 Int_t fNKaons; // Number of identified kaons
109 Int_t fNProtons; // Number of identified protons
110 Int_t *fIndexElectron; // Indices of identified electrons
111 Int_t *fIndexPionK0; // Indices of identified pions from K0s
112 Int_t *fIndexPionL; // Indices of identified pions from Lambda
113 Int_t *fIndexKaon; // Indices of identified kaons
114 Int_t *fIndexProton; // Indices of identified protons
70da6c5a 115 };
70da6c5a 116 AliHFEV0pid(const AliHFEV0pid &ref);
117 AliHFEV0pid&operator=(const AliHFEV0pid &ref);
faee3b18 118
70da6c5a 119 AliVEvent *fInputEvent; // Input Event
3a72645a 120 Int_t fNtracks; // number of tracks in current event
121 AliMCEvent *fMCEvent; // MC evnet
122 Bool_t fMCon; // availability of MC information
70da6c5a 123 AliKFVertex *fPrimaryVertex; // Primary Vertex
124 TObjArray *fElectrons; // List of Electron tracks coming from Conversions
125 TObjArray *fPionsK0; // List of Pion tracks coming from K0
126 TObjArray *fPionsL; // List of Pion tracks coming from L
127 TObjArray *fKaons; // List of Kaon tracks from Phi decay
128 TObjArray *fProtons; // List of Proton Tracks coming from Lambdas
faee3b18 129
130 TObjArray *fGammas; // for MC purposes - list of found gammas
131 TObjArray *fK0s; // for MC purposes - list of found K0s
132 TObjArray *fLambdas; // for MC purposes - list of found lambdas
133 TObjArray *fAntiLambdas; // for MC purposes - list of found anti lambdas
134
70da6c5a 135 AliHFEV0pidTrackIndex *fIndices; // Container for Track indices
136 AliHFEcollection *fQA; // Collection of QA histograms
faee3b18 137 AliHFEV0cuts *fV0cuts; // separate class for studying and applying the V0 cuts
138 TList *fOutput; // collection list
70da6c5a 139
e156c3bb 140 UInt_t fDestBits; // logical bits for destructor
141
70da6c5a 142 ClassDef(AliHFEV0pid, 1) // V0 PID Class
143
144};
145
70da6c5a 146#endif