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