]>
Commit | Line | Data |
---|---|---|
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 | // | |
20 | #ifndef ALIHFEV0PID_H | |
21 | #define ALIHFEV0PID_H | |
22 | ||
23 | #ifndef ROOT_TObject | |
24 | #include <TObject.h> | |
25 | #endif | |
26 | ||
27 | #ifndef ALIHFECOLLECTION_H | |
28 | #include "AliHFEcollection.h" | |
29 | #endif | |
30 | ||
31 | class TObjArray; | |
32 | class TList; | |
33 | ||
34 | class AliESDv0; | |
35 | class AliESDtrack; | |
36 | class AliKFParticle; | |
37 | class AliKFVertex; | |
38 | class AliVEvent; | |
39 | class AliVTrack; | |
40 | ||
41 | class AliHFEV0pid : public TObject{ | |
42 | public: | |
43 | enum{ // Reconstructed V0 | |
44 | kUndef = 0, | |
45 | kRecoGamma = 1, | |
46 | kRecoK0s = 2, | |
47 | kRecoPhi = 3, | |
48 | kRecoLambda = 4 | |
49 | ||
50 | }; | |
51 | enum{ // Identified Daughter particles | |
52 | kRecoElectron = 0, | |
53 | kRecoPionK0 = 1, | |
54 | kRecoPionL = 2, | |
55 | kRecoKaon = 3, | |
56 | kRecoProton = 4 | |
57 | }; | |
58 | AliHFEV0pid(); | |
59 | ~AliHFEV0pid(); | |
60 | ||
61 | Double_t GetEffMass(AliESDv0 *v0, UInt_t p1, UInt_t p2) const; | |
62 | ||
63 | void Process(AliVEvent * const inputEvent); | |
64 | Int_t ProcessV0(TObject *v0); | |
65 | void Flush(); | |
66 | ||
67 | void InitQA(); | |
68 | inline TList *GetListOfQAhistograms(); | |
69 | ||
70 | TObjArray *GetListOfElectrons() const { return fElectrons; } | |
71 | TObjArray *GetListOfPionsK0() const { return fPionsK0; } | |
72 | TObjArray *GetListOfPionsL() const { return fPionsL; } | |
73 | TObjArray *GetListOfKaons() const { return fKaons; } | |
74 | TObjArray *GetListOfProtons() const { return fProtons; } | |
75 | ||
76 | Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); } | |
77 | Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); } | |
78 | void SetAODanalysis(Bool_t isAOD = kTRUE) { SetBit(kAODanalysis, isAOD); }; | |
79 | void SetESDanalysis(Bool_t isESD = kTRUE) { SetBit(kAODanalysis, !isESD); }; | |
80 | private: | |
81 | Float_t PsiPair(AliESDv0 *esdv0);//angle between daughters in plane perpendicular to magnetic field (characteristically around zero for conversions) | |
82 | Float_t OpenAngle(AliESDv0 *esdv0) const;//opening angle between V0 daughters; close to zero for conversions | |
83 | ||
84 | ||
85 | protected: | |
86 | enum{ | |
87 | kAODanalysis = BIT(14) | |
88 | }; | |
89 | AliKFParticle *CreateMotherParticle(AliVTrack *pdaughter, AliVTrack *ndaughter, Int_t pspec, Int_t nspec); | |
90 | void AddTrackToKFVertex(AliVTrack *track, Int_t species); | |
91 | ||
92 | Bool_t IsGammaConv(TObject *v0); | |
93 | Bool_t IsK0s(TObject *v0); | |
94 | Bool_t IsPhi(TObject *v0); | |
95 | Bool_t IsLambda(TObject *v0); | |
96 | ||
97 | Bool_t CutESDtrack(AliESDtrack *track); | |
98 | Bool_t CutV0(AliESDv0 *v0, Int_t species); | |
99 | ||
100 | Bool_t LooseRejectK0(AliESDv0 * const v0) const; | |
101 | Bool_t LooseRejectLambda(AliESDv0 * const v0) const; | |
102 | Bool_t LooseRejectGamma(AliESDv0 * const v0) const; | |
103 | ||
104 | private: | |
105 | class AliHFEV0pidTrackIndex{ | |
106 | public: | |
107 | AliHFEV0pidTrackIndex(); | |
108 | ~AliHFEV0pidTrackIndex(); | |
109 | void Init(Int_t capacity); | |
110 | void Add(Int_t index, Int_t species); | |
111 | Bool_t Find(Int_t index) const; | |
112 | Bool_t Find(Int_t index, Int_t species) const; | |
113 | Int_t GetNumberOfElectrons() const { return fNElectrons; }; | |
114 | Int_t GetNumberOfPionsK0() const { return fNPionsK0; }; | |
115 | Int_t GetNumberOfPionsL() const { return fNPionsL; }; | |
116 | Int_t GetNumberOfKaons() const { return fNKaons; }; | |
117 | Int_t GetNumberOfProtons() const { return fNProtons; }; | |
118 | void Flush(); | |
119 | ||
120 | private: | |
121 | AliHFEV0pidTrackIndex(const AliHFEV0pidTrackIndex &ref); | |
122 | AliHFEV0pidTrackIndex &operator=(const AliHFEV0pidTrackIndex &ref); | |
123 | Int_t fNElectrons; // Number of identified electrons | |
124 | Int_t fNPionsK0; // Number of identified pions from K0s | |
125 | Int_t fNPionsL; // Lumber of identified pions from Lambda | |
126 | Int_t fNKaons; // Number of identified kaons | |
127 | Int_t fNProtons; // Number of identified protons | |
128 | Int_t *fIndexElectron; // Indices of identified electrons | |
129 | Int_t *fIndexPionK0; // Indices of identified pions from K0s | |
130 | Int_t *fIndexPionL; // Indices of identified pions from Lambda | |
131 | Int_t *fIndexKaon; // Indices of identified kaons | |
132 | Int_t *fIndexProton; // Indices of identified protons | |
133 | }; | |
134 | ||
135 | class AliHFELambdaInf{ | |
136 | public: | |
137 | AliHFELambdaInf(AliKFParticle *track, AliKFVertex * const primaryVertex); | |
138 | ~AliHFELambdaInf(); | |
139 | ||
140 | Double_t GetInvariantMass() const { return fInvariantMass; }; | |
141 | Double_t GetChi2NDF() const { return fChi2NDF; }; | |
142 | Double_t GetDistanceFromPrimaryVertex() const { return fDistVtx; }; | |
143 | private: | |
144 | Double_t fInvariantMass; // invariant mass before constraint | |
145 | Double_t fChi2NDF; // chi2/ndf after constraints | |
146 | Double_t fDistVtx; // Distance to primary Vertex | |
147 | }; | |
148 | ||
149 | AliHFEV0pid(const AliHFEV0pid &ref); | |
150 | AliHFEV0pid&operator=(const AliHFEV0pid &ref); | |
151 | ||
152 | AliVEvent *fInputEvent; // Input Event | |
153 | AliKFVertex *fPrimaryVertex; // Primary Vertex | |
154 | TObjArray *fElectrons; // List of Electron tracks coming from Conversions | |
155 | TObjArray *fPionsK0; // List of Pion tracks coming from K0 | |
156 | TObjArray *fPionsL; // List of Pion tracks coming from L | |
157 | TObjArray *fKaons; // List of Kaon tracks from Phi decay | |
158 | TObjArray *fProtons; // List of Proton Tracks coming from Lambdas | |
159 | AliHFEV0pidTrackIndex *fIndices; // Container for Track indices | |
160 | AliHFEcollection *fQA; // Collection of QA histograms | |
161 | ||
162 | ClassDef(AliHFEV0pid, 1) // V0 PID Class | |
163 | ||
164 | }; | |
165 | ||
166 | //____________________________________________________________ | |
167 | TList *AliHFEV0pid::GetListOfQAhistograms(){ | |
168 | // | |
169 | // Get QA histograms | |
170 | // | |
171 | if(fQA) | |
172 | return fQA->GetList(); | |
173 | return NULL; | |
174 | } | |
175 | #endif |