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