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
27 #ifndef ALIHFECOLLECTION_H
28 #include "AliHFEcollection.h"
41 class AliHFEV0pid : public TObject{
43 enum{ // Reconstructed V0
51 enum{ // Identified Daughter particles
61 Double_t GetEffMass(AliESDv0 *v0, UInt_t p1, UInt_t p2) const;
63 void Process(AliVEvent * const inputEvent);
64 Int_t ProcessV0(TObject *v0);
68 inline TList *GetListOfQAhistograms();
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; }
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); };
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
87 kAODanalysis = BIT(14)
89 AliKFParticle *CreateMotherParticle(AliVTrack *pdaughter, AliVTrack *ndaughter, Int_t pspec, Int_t nspec);
90 void AddTrackToKFVertex(AliVTrack *track, Int_t species);
92 Bool_t IsGammaConv(TObject *v0);
93 Bool_t IsK0s(TObject *v0);
94 Bool_t IsPhi(TObject *v0);
95 Bool_t IsLambda(TObject *v0);
97 Bool_t CutESDtrack(AliESDtrack *track);
98 Bool_t CutV0(AliESDv0 *v0, Int_t species);
100 Bool_t LooseRejectK0(AliESDv0 * const v0) const;
101 Bool_t LooseRejectLambda(AliESDv0 * const v0) const;
102 Bool_t LooseRejectGamma(AliESDv0 * const v0) const;
105 class AliHFEV0pidTrackIndex{
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; };
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
135 class AliHFELambdaInf{
137 AliHFELambdaInf(AliKFParticle *track, AliKFVertex * const primaryVertex);
140 Double_t GetInvariantMass() const { return fInvariantMass; };
141 Double_t GetChi2NDF() const { return fChi2NDF; };
142 Double_t GetDistanceFromPrimaryVertex() const { return fDistVtx; };
144 Double_t fInvariantMass; // invariant mass before constraint
145 Double_t fChi2NDF; // chi2/ndf after constraints
146 Double_t fDistVtx; // Distance to primary Vertex
149 AliHFEV0pid(const AliHFEV0pid &ref);
150 AliHFEV0pid&operator=(const AliHFEV0pid &ref);
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
162 ClassDef(AliHFEV0pid, 1) // V0 PID Class
166 //____________________________________________________________
167 TList *AliHFEV0pid::GetListOfQAhistograms(){
172 return fQA->GetList();