]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEsecVtx.h
Fixes to cure warnings
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEsecVtx.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 //  Secondary vertexing construction Class
17 //  Construct secondary vertex from Beauty hadron with electron and
18 //  hadrons, then apply selection criteria
19 //
20
21 #ifndef ALIHFESECVTX_H
22 #define ALIHFESECVTX_H
23
24 #ifndef ROOT_TObject
25 //#include <TObject.h>
26 #endif
27
28 #ifndef ROOT_THnSparse
29 #include <THnSparse.h>
30 #endif
31
32 class TH1F;
33 class TH2F;
34 class TString;
35 class AliESDEvent;
36 class AliAODEvent;
37 class AliVTrack;
38 class AliESDtrack;
39 class AliAODTrack;
40 class AliStack;
41 class AliHFEtrackFilter;
42 class AliHFEpairs;
43 class AliHFEsecVtxs;
44
45 //________________________________________________________________
46 class AliHFEsecVtx : public TObject {
47
48   public: 
49     AliHFEsecVtx();
50     AliHFEsecVtx(const AliHFEsecVtx &p); // copy constructor
51     AliHFEsecVtx &operator=(const AliHFEsecVtx &); // assignment operator
52     virtual ~AliHFEsecVtx();
53
54     void CreateHistograms(TList *qaList);
55
56     void Process(AliVTrack *track);
57
58     Bool_t HasMCData() const { return TestBit(kHasMCData); };
59     Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
60     Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
61
62                 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
63     void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
64     void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
65     void SetEvent(AliESDEvent* const ESD){fESD1=ESD;};    // set ESD pointer
66     void SetEventAOD(AliAODEvent* const AOD){fAOD1=AOD;}; // set ESD pointer
67     void SetStack(AliStack* const stack){fStack=stack;};  // set stack pointer
68     void SetMCArray(TClonesArray* const mcarry){fMCArray=mcarry;} // set mcarray pointer
69     void SetUseMCPID(Bool_t usemcpid){fUseMCPID=usemcpid;};
70
71
72     Int_t GetMCPID(AliESDtrack *track); // return MC pid
73                 Int_t GetMCPDG(AliVTrack *track);   // return MC pid
74     Int_t GetPairOriginESD(AliESDtrack* track1, AliESDtrack* track2); // return pair origin as a pdg code
75     Int_t GetPairOriginAOD(AliAODTrack* track1, AliAODTrack* track2); // return pair origin as a pdg code
76     Int_t GetPairCode(const AliVTrack* const track1, const AliVTrack* const track2); // return corresponding pair code to pdg code
77     Int_t GetElectronSource(Int_t mclabel); // return origin of the electron
78     Int_t GetPDG(AliVTrack *track);     // return pdg 
79                 void GetESDPID(AliESDtrack *track, Int_t &recpid, Double_t &recprob); //return esd pid likelihood
80     void GetPrimaryCondition();
81
82     TClonesArray *HFEpairs();
83     TClonesArray *HFEsecvtxs();
84
85     void AddHFEpairToArray(const AliHFEpairs* const pair);
86     void AddHFEsecvtxToArray(const AliHFEsecVtxs* const secvtx);
87
88     void InitHFEpairs();
89     void InitHFEsecvtxs();
90
91     void DeleteHFEpairs();
92     void DeleteHFEsecvtxs();
93
94     Bool_t SingleTrackCut(AliESDtrack* track1) const; // single track cut
95     void PairAnalysis(AliVTrack* ESDtrack1, AliVTrack* ESDtrack2, Int_t index2); // do e-h analysis
96     void RunSECVTX(AliVTrack *track); // run secondary vertexing algorithm
97
98     void MakeContainer(); // make containers
99
100   protected:
101     void Init();
102     void FindSECVTXCandid(AliVTrack *track);
103     void CalcSECVTXProperty(AliVTrack* track1, AliVTrack* track2, AliVTrack* track3); // calculated distinctive variables
104
105
106   private:
107     enum{
108       kHasMCData = BIT(15),     // bitset for mc data usage
109       kAODanalysis = BIT(16)    // bitset for aod analysis
110     };
111     enum {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse}; // electron origin 
112     enum {kCharm=4, kBeauty=5}; // quark flavor
113
114     AliHFEtrackFilter *fFilter; // filter Tracks to combine the signal track with
115     AliESDEvent* fESD1; // ESD pointer             
116     AliAODEvent* fAOD1; // AOD pointer             
117     AliStack* fStack;   // stack pointer              
118
119     Bool_t fUseMCPID;   // if use MC pid 
120
121     TString fkSourceLabel[10]; // electron source label
122
123     Int_t fNparents;           // number of heavy hadrons to be considered
124     Int_t fParentSelect[2][7]; // heavy hadron species
125                 Double_t fPtRng[7];        // pt ranges to consider pt dependant dca cut
126                 Double_t fDcaCut[6];       // pt dependant dca cut
127
128     Int_t fNoOfHFEpairs;       // number of e-h pairs  
129     Int_t fNoOfHFEsecvtxs;     // number of secondary vertexes
130
131     TClonesArray *fHFEpairs;   //! Array of pair 
132     TClonesArray *fHFEsecvtxs; //! Array of secondary vertexes 
133     TClonesArray *fMCArray;    //! mc array pointer
134
135                 Double_t fPVx;          // primary vertex copy x 
136                 Double_t fPVy;          // primary vertex copy y
137     Double_t fCosPhi;       // cos of opening angle of two pair vertex
138     Double_t fSignedLxy;    // signed Lxy of secondary vertex
139     Double_t fKFchi2;       // chi2 of secondary vertex
140     Double_t fInvmass;      // invariant mass of secondary vertex
141     Double_t fInvmassSigma; // invariant mass sigma of secondary vertex
142     Double_t fKFip;         // impact parameter of secondary vertex track
143
144     THnSparseF *fPairQA;    // qa histos for pair analysis 
145     THnSparseF *fSecvtxQA;  // qa histos for secvtx
146     TList *fSecVtxList;     // list for secondary vertexing outputs
147
148   ClassDef(AliHFEsecVtx,0);
149 };
150
151 #endif