4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
22 // Utility class for V0 PID
23 // Provides smaples of electrons, pions and protons
24 // More information can be found in the implementation file
43 class AliHFEcollection;
45 class AliHFEV0pid : public TObject{
50 void Process(AliVEvent * const inputEvent);
51 Int_t ProcessV0(TObject *v0);
55 TList *GetListOfQAhistograms();
57 TObjArray *GetListOfElectrons() const { return fElectrons; }
58 TObjArray *GetListOfPionsK0() const { return fPionsK0; }
59 TObjArray *GetListOfPionsL() const { return fPionsL; }
60 TObjArray *GetListOfKaons() const { return fKaons; }
61 TObjArray *GetListOfProtons() const { return fProtons; }
63 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }
64 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }
65 void SetAODanalysis(Bool_t isAOD = kTRUE) { SetBit(kAODanalysis, isAOD); };
66 void SetESDanalysis(Bool_t isESD = kTRUE) { SetBit(kAODanalysis, !isESD); };
68 void SetMCEvent(AliMCEvent* const ev) { fMCEvent = ev; };
72 kAODanalysis = BIT(14)
75 Int_t PreselectV0(AliESDv0 * const v0, Int_t idMC);
77 void ArmenterosPlotMC(AliESDv0 * const v0, Int_t idMC);
78 Bool_t IsGammaConv(TObject *v0);
79 Bool_t IsK0s(TObject *v0);
80 Bool_t IsPhi(TObject *v0);
81 Bool_t IsLambda(TObject *v0);
84 Int_t IdentifyV0(TObject *v0, Int_t d[2]);
86 void BenchmarkV0finder();
89 class AliHFEV0pidTrackIndex{
91 AliHFEV0pidTrackIndex();
92 ~AliHFEV0pidTrackIndex();
93 void Init(Int_t capacity);
94 void Add(Int_t index, Int_t species);
95 Bool_t Find(Int_t index) const;
96 Bool_t Find(Int_t index, Int_t species) const;
97 Int_t GetNumberOfElectrons() const { return fNElectrons; };
98 Int_t GetNumberOfPionsK0() const { return fNPionsK0; };
99 Int_t GetNumberOfPionsL() const { return fNPionsL; };
100 Int_t GetNumberOfKaons() const { return fNKaons; };
101 Int_t GetNumberOfProtons() const { return fNProtons; };
105 AliHFEV0pidTrackIndex(const AliHFEV0pidTrackIndex &ref);
106 AliHFEV0pidTrackIndex &operator=(const AliHFEV0pidTrackIndex &ref);
107 Int_t fNElectrons; // Number of identified electrons
108 Int_t fNPionsK0; // Number of identified pions from K0s
109 Int_t fNPionsL; // Lumber of identified pions from Lambda
110 Int_t fNKaons; // Number of identified kaons
111 Int_t fNProtons; // Number of identified protons
112 Int_t *fIndexElectron; // Indices of identified electrons
113 Int_t *fIndexPionK0; // Indices of identified pions from K0s
114 Int_t *fIndexPionL; // Indices of identified pions from Lambda
115 Int_t *fIndexKaon; // Indices of identified kaons
116 Int_t *fIndexProton; // Indices of identified protons
118 AliHFEV0pid(const AliHFEV0pid &ref);
119 AliHFEV0pid&operator=(const AliHFEV0pid &ref);
121 AliVEvent *fInputEvent; // Input Event
122 Int_t fNtracks; // number of tracks in current event
123 AliMCEvent *fMCEvent; // MC evnet
124 Bool_t fMCon; // availability of MC information
125 AliKFVertex *fPrimaryVertex; // Primary Vertex
126 TObjArray *fElectrons; // List of Electron tracks coming from Conversions
127 TObjArray *fPionsK0; // List of Pion tracks coming from K0
128 TObjArray *fPionsL; // List of Pion tracks coming from L
129 TObjArray *fKaons; // List of Kaon tracks from Phi decay
130 TObjArray *fProtons; // List of Proton Tracks coming from Lambdas
132 TObjArray *fGammas; // for MC purposes - list of found gammas
133 TObjArray *fK0s; // for MC purposes - list of found K0s
134 TObjArray *fLambdas; // for MC purposes - list of found lambdas
135 TObjArray *fAntiLambdas; // for MC purposes - list of found anti lambdas
137 AliHFEV0pidTrackIndex *fIndices; // Container for Track indices
138 AliHFEcollection *fQA; // Collection of QA histograms
139 AliHFEV0cuts *fV0cuts; // separate class for studying and applying the V0 cuts
140 TList *fOutput; // collection list
142 ClassDef(AliHFEV0pid, 1) // V0 PID Class