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 **************************************************************************/
16 // Utility class for V0 PID
17 // Provides smaples of electrons, pions and protons
18 // More information can be found in the implementation file
40 class AliHFEcollection;
42 class AliHFEV0pid : public TObject{
47 void Process(AliVEvent * const inputEvent);
48 Int_t ProcessV0(TObject *v0);
52 TList *GetListOfQAhistograms();
54 TObjArray *GetListOfElectrons() const { return fElectrons; }
55 TObjArray *GetListOfPionsK0() const { return fPionsK0; }
56 TObjArray *GetListOfPionsL() const { return fPionsL; }
57 TObjArray *GetListOfKaons() const { return fKaons; }
58 TObjArray *GetListOfProtons() const { return fProtons; }
60 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); }
61 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); }
62 void SetAODanalysis(Bool_t isAOD = kTRUE) { SetBit(kAODanalysis, isAOD); };
63 void SetESDanalysis(Bool_t isESD = kTRUE) { SetBit(kAODanalysis, !isESD); };
65 void SetMCEvent(AliMCEvent* const ev) { fMCEvent = ev; };
69 kAODanalysis = BIT(14)
72 Int_t PreselectV0(AliESDv0 * const v0, Int_t idMC);
74 void ArmenterosPlotMC(AliESDv0 * const v0, Int_t idMC);
75 Bool_t IsGammaConv(TObject *v0);
76 Bool_t IsK0s(TObject *v0);
77 Bool_t IsPhi(TObject *v0);
78 Bool_t IsLambda(TObject *v0);
81 Int_t IdentifyV0(TObject *v0, Int_t d[2]);
84 class AliHFEV0pidTrackIndex{
86 AliHFEV0pidTrackIndex();
87 ~AliHFEV0pidTrackIndex();
88 void Init(Int_t capacity);
89 void Add(Int_t index, Int_t species);
90 Bool_t Find(Int_t index) const;
91 Bool_t Find(Int_t index, Int_t species) const;
92 Int_t GetNumberOfElectrons() const { return fNElectrons; };
93 Int_t GetNumberOfPionsK0() const { return fNPionsK0; };
94 Int_t GetNumberOfPionsL() const { return fNPionsL; };
95 Int_t GetNumberOfKaons() const { return fNKaons; };
96 Int_t GetNumberOfProtons() const { return fNProtons; };
100 AliHFEV0pidTrackIndex(const AliHFEV0pidTrackIndex &ref);
101 AliHFEV0pidTrackIndex &operator=(const AliHFEV0pidTrackIndex &ref);
102 Int_t fNElectrons; // Number of identified electrons
103 Int_t fNPionsK0; // Number of identified pions from K0s
104 Int_t fNPionsL; // Lumber of identified pions from Lambda
105 Int_t fNKaons; // Number of identified kaons
106 Int_t fNProtons; // Number of identified protons
107 Int_t *fIndexElectron; // Indices of identified electrons
108 Int_t *fIndexPionK0; // Indices of identified pions from K0s
109 Int_t *fIndexPionL; // Indices of identified pions from Lambda
110 Int_t *fIndexKaon; // Indices of identified kaons
111 Int_t *fIndexProton; // Indices of identified protons
113 AliHFEV0pid(const AliHFEV0pid &ref);
114 AliHFEV0pid&operator=(const AliHFEV0pid &ref);
116 AliVEvent *fInputEvent; // Input Event
117 Int_t fNtracks; // number of tracks in current event
118 AliMCEvent *fMCEvent; // MC evnet
119 Bool_t fMCon; // availability of MC information
120 AliKFVertex *fPrimaryVertex; // Primary Vertex
121 TObjArray *fElectrons; // List of Electron tracks coming from Conversions
122 TObjArray *fPionsK0; // List of Pion tracks coming from K0
123 TObjArray *fPionsL; // List of Pion tracks coming from L
124 TObjArray *fKaons; // List of Kaon tracks from Phi decay
125 TObjArray *fProtons; // List of Proton Tracks coming from Lambdas
127 TObjArray *fGammas; // for MC purposes - list of found gammas
128 TObjArray *fK0s; // for MC purposes - list of found K0s
129 TObjArray *fLambdas; // for MC purposes - list of found lambdas
130 TObjArray *fAntiLambdas; // for MC purposes - list of found anti lambdas
132 AliHFEV0pidTrackIndex *fIndices; // Container for Track indices
133 AliHFEcollection *fQA; // Collection of QA histograms
134 AliHFEV0cuts *fV0cuts; // separate class for studying and applying the V0 cuts
135 TList *fOutput; // collection list
137 ClassDef(AliHFEV0pid, 1) // V0 PID Class