4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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
28 //#include <TObject.h>
40 //________________________________________________________________
41 class AliHFEpriVtx : public TObject {
45 AliHFEpriVtx(const AliHFEpriVtx &p); // copy constructor
46 AliHFEpriVtx &operator=(const AliHFEpriVtx &); // assignment operator
47 virtual ~AliHFEpriVtx();
49 void CreateHistograms(TString hnopt=""); // create histograms
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;
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
70 AliESDEvent* fESD1; // ESD event
71 AliMCEvent* fMCEvent; // MC Event
73 TString fkSourceLabel[10]; // storing source label
75 enum kSources {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse};
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
87 , fNprimVtxContributor()
89 , fPtElecContributor()
91 , fNprimVtxContributorCount(0)
93 // default constructor
96 AliHists(const AliHists & p)
97 : fNtracks(p.fNtracks)
98 , fNprimVtxContributor(p.fNprimVtxContributor)
100 , fPtElecContributor(p.fPtElecContributor)
101 , fNtrackCount(p.fNtrackCount)
102 , fNprimVtxContributorCount(p.fNprimVtxContributorCount)
106 AliHists &operator=(const AliHists &)
108 // assignment operator, not yet implemented
112 AliHists fPrimVtx[10]; // define structure of histograms
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
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
126 ClassDef(AliHFEpriVtx,0);