]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpriVtx.h
Adding Id to PWG3 classes for better tracking of the coverity defect fixes (Ivana)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpriVtx.h
1 #ifndef ALIHFEPRIVTX_H
2 #define ALIHFEPRIVTX_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 // QA class of primary vertex study for Heavy Flavor electrons
23 // this has functionality to reject electrons from primary vertex
24 // and check primary vertex characteristics
25 //
26
27 #ifndef ROOT_TObject
28 //#include <TObject.h>
29 #endif
30
31 class TH1F;
32 class TH1I;
33 class TH2F;
34 class TString;
35 class AliESDEvent;
36 class AliESDtrack;
37 class AliMCEvent;
38 class AliKFParticle;
39
40 //________________________________________________________________
41 class AliHFEpriVtx : public TObject {
42
43         public: 
44                 AliHFEpriVtx();
45                 AliHFEpriVtx(const AliHFEpriVtx &p); // copy constructor
46                 AliHFEpriVtx &operator=(const AliHFEpriVtx &); // assignment operator
47                 virtual ~AliHFEpriVtx();
48
49                 void CreateHistograms(TString hnopt=""); // create histograms
50                 void Init();
51                 void SetEvent(AliESDEvent * const ESD){fESD1=ESD;}; // set ESD pointer
52                 void SetMCEvent(AliMCEvent * const mcEvent){fMCEvent=mcEvent;} // set stack pointer
53                 void CountNtracks(Int_t sourcePart, Int_t recpid, Double_t recprob); // count number of tracks passed certain cut
54                 void FillNtracks(); // fill counted number of tracks
55                 void CountPriVxtElecContributor(AliESDtrack *ESDelectron, Int_t sourcePart, Int_t recpid, Double_t recprob); 
56                 void FillNprimVtxContributor() const;
57                 void RecalcPrimvtx(Int_t nkftrk, const Int_t * const, const AliKFParticle * const); //recalculate primary vertex after removing given tracks
58                 void RecalcPrimvtx(AliESDtrack * const ESDelectron); //recalculate primary vertex after removing given track
59                 void GetRecalcPrimvtx(Double_t privtx[3]) const {
60                     privtx[0]=fPVxRe; privtx[1]=fPVyRe; privtx[2]=fPVzRe;
61                 }
62                 void GetNPriVxtContributor();
63                 Double_t GetDistanceFromRecalVertexXY(AliESDtrack * const ESDelectron);
64                             Int_t GetNsectrk2prim() const {return fNsectrk2prim;}; 
65                 Int_t GetMCPID(AliESDtrack const *track); // return mc pid
66
67
68         private:
69
70                 AliESDEvent* fESD1; // ESD event 
71                 AliMCEvent* fMCEvent; // MC Event
72
73                 TString fkSourceLabel[10]; // storing source label
74
75                 enum kSources {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse};
76
77                 struct AliHists{
78                         TH1F *fNtracks; // histogram to fill number of counted tracks for different sources
79                         TH1F *fNprimVtxContributor; // histogram to fill number of tracks contributing primary vertex 
80                         TH1F *fPtElec; // histogram to fill pt of electron tracks
81                         TH1F *fPtElecContributor; // histogram to fill pt of electron tracks contributing primary vertex
82                         Int_t fNtrackCount; // number of counted track
83                         Int_t fNprimVtxContributorCount; // number of tracks contributing primary vertex
84
85                         AliHists()
86                         : fNtracks()
87                         , fNprimVtxContributor()
88                         , fPtElec()
89                         , fPtElecContributor()
90                         , fNtrackCount(0)
91                         , fNprimVtxContributorCount(0)
92                         {
93                           // default constructor
94                         }
95
96                         AliHists(const AliHists & p)
97                         : fNtracks(p.fNtracks)
98                         , fNprimVtxContributor(p.fNprimVtxContributor)
99                         , fPtElec(p.fPtElec)
100                         , fPtElecContributor(p.fPtElecContributor)
101                         , fNtrackCount(p.fNtrackCount)
102                         , fNprimVtxContributorCount(p.fNprimVtxContributorCount)
103                         {
104                           // copy constructor
105                         }
106                         AliHists &operator=(const AliHists &)
107                         {
108                           // assignment operator, not yet implemented
109                           return *this;
110                         }
111                 };
112                 AliHists fPrimVtx[10]; // define structure of histograms
113
114                 Int_t fNtrackswoPid; //  number of track counted
115                 TH1F *fHNtrackswoPid; // histogram to fill number of track counted
116                 TH1I *fNESDprimVtxContributor; // histogram to fill number of primary vertex contributor for given event 
117                 TH1I *fNESDprimVtxIndices; // histogram to fill number of primary vertex indices for given event
118                 TH2F *fDiffDCAvsPt; // histogram to fill DCA difference as a function of pT
119                 TH2F *fDiffDCAvsNt; // histogram to fill DCA difference as a function of pT
120
121                 Int_t fNsectrk2prim; // # of secvtx tracks contributing to primvtx calculation
122                 Double_t fPVxRe;     // recalculated primary vertex x 
123                 Double_t fPVyRe;     // recalculated primary vertex y 
124                 Double_t fPVzRe;     // recalculated primary vertex z  
125
126         ClassDef(AliHFEpriVtx,0);
127 };
128
129 #endif