]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEV0pid.h
Adding Id to PWG3 classes for better tracking of the coverity defect fixes (Ivana)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEV0pid.h
1 #ifndef ALIHFEV0PID_H
2 #define ALIHFEV0PID_H
3
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 *                                                                        *
7 * Author: The ALICE Off-line Project.                                    *
8 * Contributors are mentioned in the code where appropriate.              *
9 *                                                                        *
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 **************************************************************************/
18
19 /* $Id$ */ 
20
21 //
22 // Utility class for V0 PID
23 // Provides smaples of electrons, pions and protons
24 // More information can be found in the implementation file
25 //
26 #ifndef ROOT_TObject
27 #include <TObject.h>
28 #endif
29
30 class TObjArray;
31 class TList;
32 class TString;
33
34 class AliESDv0;
35 class AliESDtrack;
36 class AliKFParticle;
37 class AliKFVertex;
38 class AliVEvent;
39 class AliVTrack;
40 class AliMCEvent;
41
42 class AliHFEV0cuts;
43 class AliHFEcollection;
44
45 class AliHFEV0pid : public TObject{
46   public:
47     AliHFEV0pid();
48     ~AliHFEV0pid();
49
50     void  Process(AliVEvent * const inputEvent);
51     Int_t ProcessV0(TObject *v0);
52     void  Flush();
53
54     void  InitQA();
55     TList *GetListOfQAhistograms();
56
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; }
62
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); }; 
67
68     void     SetMCEvent(AliMCEvent* const ev) { fMCEvent = ev; };
69     
70  protected:
71     enum{
72       kAODanalysis = BIT(14)
73         };
74
75     Int_t PreselectV0(AliESDv0 * const v0, Int_t idMC);
76
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);        
82     TList *GetV0pidQA(); 
83
84     Int_t IdentifyV0(TObject *v0, Int_t d[2]);
85
86     void  BenchmarkV0finder();
87
88  private:
89     class AliHFEV0pidTrackIndex{
90     public:
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; };
102       void Flush();
103       
104     private:
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
117     };
118     AliHFEV0pid(const AliHFEV0pid &ref);
119     AliHFEV0pid&operator=(const AliHFEV0pid &ref);
120     
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
131
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
136
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
141
142     ClassDef(AliHFEV0pid, 1)          // V0 PID Class
143
144 };
145
146 #endif