ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
//
// QA class of primary vertex study for Heavy Flavor electrons
// this has functionality to reject electrons from primary vertex
// and check primary vertex characteristics
//

#ifndef ALIHFEPRIVTX_H
#define ALIHFEPRIVTX_H

#ifndef ROOT_TObject
//#include <TObject.h>
#endif

class TH1F;
class TH1I;
class TH2F;
class TString;
class AliESDEvent;
class AliESDtrack;
class AliMCEvent;
class AliKFParticle;

//________________________________________________________________
class AliHFEpriVtx : public TObject {

        public: 
                AliHFEpriVtx();
                AliHFEpriVtx(const AliHFEpriVtx &p); // copy constructor
                AliHFEpriVtx &operator=(const AliHFEpriVtx &); // assignment operator
                virtual ~AliHFEpriVtx();

                void CreateHistograms(TString hnopt=""); // create histograms
                void Init();
                void SetEvent(AliESDEvent * const ESD){fESD1=ESD;}; // set ESD pointer
                void SetMCEvent(AliMCEvent * const mcEvent){fMCEvent=mcEvent;} // set stack pointer
                void CountNtracks(Int_t sourcePart, Int_t recpid, Double_t recprob); // count number of tracks passed certain cut
                void FillNtracks(); // fill counted number of tracks
                void CountPriVxtElecContributor(AliESDtrack *ESDelectron, Int_t sourcePart, Int_t recpid, Double_t recprob); 
                void FillNprimVtxContributor() const;
                void RecalcPrimvtx(Int_t nkftrk, const Int_t * const, const AliKFParticle * const); //recalculate primary vertex after removing given tracks
                void RecalcPrimvtx(const AliESDtrack * const ESDelectron); //recalculate primary vertex after removing given track
                void GetRecalcPrimvtx(Double_t privtx[3]) const {
                    privtx[0]=fPVxRe; privtx[1]=fPVyRe; privtx[2]=fPVzRe;
                }
                void GetNPriVxtContributor();
                Double_t GetDistanceFromRecalVertexXY(const AliESDtrack * const ESDelectron);
		            Int_t GetNsectrk2prim() const {return fNsectrk2prim;}; 
                Int_t GetMCPID(AliESDtrack const *track); // return mc pid


        private:

                AliESDEvent* fESD1; // ESD event 
                AliMCEvent* fMCEvent; // MC Event

                TString fkSourceLabel[10]; // storing source label

                enum kSources {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse};

                struct AliHists{
                        TH1F *fNtracks; // histogram to fill number of counted tracks for different sources
                        TH1F *fNprimVtxContributor; // histogram to fill number of tracks contributing primary vertex 
                        TH1F *fPtElec; // histogram to fill pt of electron tracks
                        TH1F *fPtElecContributor; // histogram to fill pt of electron tracks contributing primary vertex
                        Int_t fNtrackCount; // number of counted track
                        Int_t fNprimVtxContributorCount; // number of tracks contributing primary vertex

			AliHists()
			: fNtracks()
			, fNprimVtxContributor()
			, fPtElec()
			, fPtElecContributor()
			, fNtrackCount(0)
			, fNprimVtxContributorCount(0)
			{
			  // default constructor
			}

			AliHists(const AliHists & p)
			: fNtracks(p.fNtracks)
			, fNprimVtxContributor(p.fNprimVtxContributor)
			, fPtElec(p.fPtElec)
			, fPtElecContributor(p.fPtElecContributor)
			, fNtrackCount(p.fNtrackCount)
			, fNprimVtxContributorCount(p.fNprimVtxContributorCount)
			{
			  // copy constructor
			}
			AliHists &operator=(const AliHists &)
			{
			  // assignment operator, not yet implemented
			  return *this;
			}
                };
                AliHists fPrimVtx[10]; // define structure of histograms

                Int_t fNtrackswoPid; //  number of track counted
                TH1F *fHNtrackswoPid; // histogram to fill number of track counted
                TH1I *fNESDprimVtxContributor; // histogram to fill number of primary vertex contributor for given event 
                TH1I *fNESDprimVtxIndices; // histogram to fill number of primary vertex indices for given event
                TH2F *fDiffDCAvsPt; // histogram to fill DCA difference as a function of pT
                TH2F *fDiffDCAvsNt; // histogram to fill DCA difference as a function of pT

                Int_t fNsectrk2prim; // # of secvtx tracks contributing to primvtx calculation
                Double_t fPVxRe;     // recalculated primary vertex x 
                Double_t fPVyRe;     // recalculated primary vertex y 
                Double_t fPVzRe;     // recalculated primary vertex z  

        ClassDef(AliHFEpriVtx,0);
};

#endif
 AliHFEpriVtx.h:1
 AliHFEpriVtx.h:2
 AliHFEpriVtx.h:3
 AliHFEpriVtx.h:4
 AliHFEpriVtx.h:5
 AliHFEpriVtx.h:6
 AliHFEpriVtx.h:7
 AliHFEpriVtx.h:8
 AliHFEpriVtx.h:9
 AliHFEpriVtx.h:10
 AliHFEpriVtx.h:11
 AliHFEpriVtx.h:12
 AliHFEpriVtx.h:13
 AliHFEpriVtx.h:14
 AliHFEpriVtx.h:15
 AliHFEpriVtx.h:16
 AliHFEpriVtx.h:17
 AliHFEpriVtx.h:18
 AliHFEpriVtx.h:19
 AliHFEpriVtx.h:20
 AliHFEpriVtx.h:21
 AliHFEpriVtx.h:22
 AliHFEpriVtx.h:23
 AliHFEpriVtx.h:24
 AliHFEpriVtx.h:25
 AliHFEpriVtx.h:26
 AliHFEpriVtx.h:27
 AliHFEpriVtx.h:28
 AliHFEpriVtx.h:29
 AliHFEpriVtx.h:30
 AliHFEpriVtx.h:31
 AliHFEpriVtx.h:32
 AliHFEpriVtx.h:33
 AliHFEpriVtx.h:34
 AliHFEpriVtx.h:35
 AliHFEpriVtx.h:36
 AliHFEpriVtx.h:37
 AliHFEpriVtx.h:38
 AliHFEpriVtx.h:39
 AliHFEpriVtx.h:40
 AliHFEpriVtx.h:41
 AliHFEpriVtx.h:42
 AliHFEpriVtx.h:43
 AliHFEpriVtx.h:44
 AliHFEpriVtx.h:45
 AliHFEpriVtx.h:46
 AliHFEpriVtx.h:47
 AliHFEpriVtx.h:48
 AliHFEpriVtx.h:49
 AliHFEpriVtx.h:50
 AliHFEpriVtx.h:51
 AliHFEpriVtx.h:52
 AliHFEpriVtx.h:53
 AliHFEpriVtx.h:54
 AliHFEpriVtx.h:55
 AliHFEpriVtx.h:56
 AliHFEpriVtx.h:57
 AliHFEpriVtx.h:58
 AliHFEpriVtx.h:59
 AliHFEpriVtx.h:60
 AliHFEpriVtx.h:61
 AliHFEpriVtx.h:62
 AliHFEpriVtx.h:63
 AliHFEpriVtx.h:64
 AliHFEpriVtx.h:65
 AliHFEpriVtx.h:66
 AliHFEpriVtx.h:67
 AliHFEpriVtx.h:68
 AliHFEpriVtx.h:69
 AliHFEpriVtx.h:70
 AliHFEpriVtx.h:71
 AliHFEpriVtx.h:72
 AliHFEpriVtx.h:73
 AliHFEpriVtx.h:74
 AliHFEpriVtx.h:75
 AliHFEpriVtx.h:76
 AliHFEpriVtx.h:77
 AliHFEpriVtx.h:78
 AliHFEpriVtx.h:79
 AliHFEpriVtx.h:80
 AliHFEpriVtx.h:81
 AliHFEpriVtx.h:82
 AliHFEpriVtx.h:83
 AliHFEpriVtx.h:84
 AliHFEpriVtx.h:85
 AliHFEpriVtx.h:86
 AliHFEpriVtx.h:87
 AliHFEpriVtx.h:88
 AliHFEpriVtx.h:89
 AliHFEpriVtx.h:90
 AliHFEpriVtx.h:91
 AliHFEpriVtx.h:92
 AliHFEpriVtx.h:93
 AliHFEpriVtx.h:94
 AliHFEpriVtx.h:95
 AliHFEpriVtx.h:96
 AliHFEpriVtx.h:97
 AliHFEpriVtx.h:98
 AliHFEpriVtx.h:99
 AliHFEpriVtx.h:100
 AliHFEpriVtx.h:101
 AliHFEpriVtx.h:102
 AliHFEpriVtx.h:103
 AliHFEpriVtx.h:104
 AliHFEpriVtx.h:105
 AliHFEpriVtx.h:106
 AliHFEpriVtx.h:107
 AliHFEpriVtx.h:108
 AliHFEpriVtx.h:109
 AliHFEpriVtx.h:110
 AliHFEpriVtx.h:111
 AliHFEpriVtx.h:112
 AliHFEpriVtx.h:113
 AliHFEpriVtx.h:114
 AliHFEpriVtx.h:115
 AliHFEpriVtx.h:116
 AliHFEpriVtx.h:117
 AliHFEpriVtx.h:118
 AliHFEpriVtx.h:119
 AliHFEpriVtx.h:120
 AliHFEpriVtx.h:121
 AliHFEpriVtx.h:122
 AliHFEpriVtx.h:123
 AliHFEpriVtx.h:124
 AliHFEpriVtx.h:125
 AliHFEpriVtx.h:126