]>
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 | **************************************************************************/ | |
259c3296 | 15 | /************************************************************************** |
16 | * * | |
17 | * Secondary vertexing construction Class * | |
dbe3abbe | 18 | * Construct secondary vertex from Beauty hadron with electron and * |
19 | * hadrons, then apply selection criteria * | |
259c3296 | 20 | * * |
21 | **************************************************************************/ | |
22 | ||
23 | ||
dbe3abbe | 24 | #ifndef ALIHFESECVTX_H |
25 | #define ALIHFESECVTX_H | |
259c3296 | 26 | |
27 | #ifndef ROOT_TObject | |
75d81601 | 28 | //#include <TObject.h> |
259c3296 | 29 | #endif |
30 | ||
31 | class TH1F; | |
32 | class TH2F; | |
33 | class TString; | |
34 | class AliESDEvent; | |
35 | class AliESDtrack; | |
36 | class AliStack; | |
37 | ||
38 | //________________________________________________________________ | |
39 | class AliHFEsecVtx : public TObject { | |
40 | ||
41 | public: | |
42 | AliHFEsecVtx(); | |
43 | AliHFEsecVtx(const AliHFEsecVtx &p); // copy constructor | |
44 | AliHFEsecVtx &operator=(const AliHFEsecVtx &); // assignment operator | |
45 | virtual ~AliHFEsecVtx(); | |
46 | ||
259c3296 | 47 | void CreateHistograms(TString hnopt=""); |
48 | ||
dbe3abbe | 49 | void SetEvent(AliESDEvent* const ESD){fESD1=ESD;}; // set ESD pointer |
50 | void SetStack(AliStack* const stack){fStack=stack;} // set stack pointer | |
259c3296 | 51 | void InitAnaPair(); // initialize default parameters |
dbe3abbe | 52 | void AnaPair(AliESDtrack* ESDtrack1, AliESDtrack* ESDtrack2, Int_t index2); // do e-h analysis |
259c3296 | 53 | void RunSECVTX(AliESDtrack *track); // run secondary vertexing algorithm |
dbe3abbe | 54 | |
55 | Int_t GetMCPID(AliESDtrack *track); // return MC pid | |
56 | Int_t PairOrigin(AliESDtrack* track1, AliESDtrack* track2); // return pair origin as a pdg code | |
57 | Int_t PairCode(AliESDtrack* track1,AliESDtrack* track2); // return corresponding pair code to pdg code | |
58 | Int_t GetElectronSource(Int_t mclabel); // return origin of the electron | |
59 | ||
75d81601 | 60 | Bool_t SingleTrackCut(AliESDtrack* track1) const; // single track cut |
dbe3abbe | 61 | |
62 | protected: | |
63 | ||
64 | void Init(); | |
259c3296 | 65 | void FindSECVTXCandid4Tracks(AliESDtrack* track1); // find secondary vertex for 4 tracks |
66 | void FindSECVTXCandid3Tracks(AliESDtrack* track1); // find secondary vertex for 3 tracks | |
67 | void FindSECVTXCandid2Tracks(AliESDtrack* track1); // find secondary vertex for 2 tracks | |
68 | void CalcSECVTXProperty(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3); // calculated distinctive variables | |
69 | void ApplyPairTagCut(); // apply strict tagging condition for 1 pair secondary vertex | |
dbe3abbe | 70 | void ApplyVtxTagCut(Double_t chi2, Int_t id1, Int_t id2); // apply tagging condition for 3 track secondary vertex |
259c3296 | 71 | void ResetTagVar(); // reset tagging variables |
72 | ||
73 | Bool_t ApplyPairTagCut(Int_t id); // apply strict tagging condition for 1 pair secondary vertex | |
74 | Bool_t ApplyTagCut(Double_t chi2); // apply tagging condition | |
259c3296 | 75 | |
259c3296 | 76 | |
77 | Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3, AliESDtrack* track4); // get secondary vertex chi2 for 4 tracks | |
78 | Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2, AliESDtrack* track3); // get secondary vertex chi2 for 3 tracks | |
79 | Double_t GetSecVtxChi2(AliESDtrack* track1, AliESDtrack* track2); // get secondary vertex chi2 for 2 tracks | |
80 | ||
81 | ||
82 | private: | |
83 | ||
84 | AliESDEvent* fESD1; // ESD pointer | |
85 | AliStack* fStack; // stack pointer | |
86 | ||
dbe3abbe | 87 | Int_t fParentSelect[2][7]; // heavy hadron species |
88 | Int_t fNparents; // number of heavy hadrons to be considered | |
259c3296 | 89 | |
dbe3abbe | 90 | TString fkSourceLabel[10]; // electron source label |
259c3296 | 91 | |
dbe3abbe | 92 | enum {kAll, kDirectCharm, kDirectBeauty, kBeautyCharm, kGamma, kPi0, kElse, kBeautyGamma, kBeautyPi0, kBeautyElse}; |
93 | enum {kCharm=4, kBeauty=5}; | |
259c3296 | 94 | |
75d81601 | 95 | struct AliHistspair{ |
259c3296 | 96 | TH2F *fInvMass; // histogram to store pair invariant mass |
97 | TH2F *fInvMassCut1; // histogram to store pair invariant mass after cut1 | |
98 | TH2F *fInvMassCut2; // histogram to store pair invariant mass after cut2 | |
99 | TH1F *fKFChi2; // histogram to store pair vertex chi2 | |
dbe3abbe | 100 | TH1F *fOpenAngle; // histogram to store pair opening angle |
101 | TH1F *fCosOpenAngle; // histogram to store cosine of the pair opening angle | |
259c3296 | 102 | TH2F *fSignedLxy; // histogram to store signed Lxy |
103 | TH1F *fKFIP; // histogram to store pair impact parameter | |
dbe3abbe | 104 | TH1F *fIPMax; // histogram to store larger impact parameter among pair tracks |
75d81601 | 105 | |
106 | AliHistspair() | |
107 | : fInvMass() | |
108 | , fInvMassCut1() | |
109 | , fInvMassCut2() | |
110 | , fKFChi2() | |
111 | , fOpenAngle() | |
112 | , fCosOpenAngle() | |
113 | , fSignedLxy() | |
114 | , fKFIP() | |
115 | , fIPMax() | |
116 | { | |
117 | // define constructor | |
118 | } | |
119 | AliHistspair(const AliHistspair & p) | |
120 | : fInvMass(p.fInvMass) | |
121 | , fInvMassCut1(p.fInvMassCut1) | |
122 | , fInvMassCut2(p.fInvMassCut2) | |
123 | , fKFChi2(p.fKFChi2) | |
124 | , fOpenAngle(p.fOpenAngle) | |
125 | , fCosOpenAngle(p.fCosOpenAngle) | |
126 | , fSignedLxy(p.fSignedLxy) | |
127 | , fKFIP(p.fKFIP) | |
128 | , fIPMax(p.fIPMax) | |
129 | { | |
130 | // copy constructor | |
131 | } | |
132 | AliHistspair &operator=(const AliHistspair &) | |
133 | { | |
134 | // assignment operator, not yet implemented | |
135 | return *this; | |
136 | } | |
259c3296 | 137 | }; |
138 | ||
75d81601 | 139 | struct AliHiststag{ |
259c3296 | 140 | TH1F *fPtBeautyElec; // histogram for electrons of single track cut passed |
141 | TH1F *fPtTaggedElec; // histogram for total b tagged electrons | |
142 | TH1F *fPtRightTaggedElec; // histogram for right b tagged electrons | |
143 | TH1F *fPtWrongTaggedElec; // histogram for wrong b tagged electrons | |
dbe3abbe | 144 | TH1F *fInvmassBeautyElecSecVtx; // histogram for right-tagged b invariant mass |
145 | TH1F *fInvmassNotBeautyElecSecVtx; // histogram for mis-tagged b invariant mass | |
146 | TH1F *fSignedLxyBeautyElecSecVtx; // histogram for right-tagged b signed Lxy | |
147 | TH1F *fSignedLxyNotBeautyElecSecVtx; // histogram for mis-tagged b signed Lxy | |
148 | TH1F *fDistTwoVtxBeautyElecSecVtx; // histogram for right-tagged b two vertex distance | |
149 | TH1F *fDistTwoVtxNotBeautyElecSecVtx; // histogram for mis-tagged b two vertex distance | |
150 | TH1F *fCosPhiBeautyElecSecVtx; // histogram for right-tagged b cos of opening angle | |
151 | TH1F *fCosPhiNotBeautyElecSecVtx; // histogram for mis-tagged b cos of opening angle | |
152 | TH1F *fChi2BeautyElecSecVtx; // histogram for right-tagged b chi2 of secondary vertex | |
153 | TH1F *fChi2NotBeautyElecSecVtx; // histogram for mis-tagged b chi2 of secondary vertex | |
154 | TH1F *fInvmassBeautyElec2trkVtx; // histogram for right-tagged b invariant mass of two track vertex | |
155 | TH1F *fInvmassNotBeautyElec2trkVtx; // histogram for mis-tagged b invariant mass of two track vertex | |
156 | TH1F *fSignedLxyBeautyElec2trkVtx; // histogram for right-tagged b signed Lxy of two track vertex | |
157 | TH1F *fSignedLxyNotBeautyElec2trkVtx; // histogram for mis-tagged b signed Lxy of two track vertex | |
158 | TH1F *fChi2BeautyElec2trkVtx; // histogram for right-tagged b chi2 of two track vertex | |
159 | TH1F *fChi2NotBeautyElec2trkVtx; // histogram for mis-tagged b chi2 of two track vertex | |
75d81601 | 160 | |
161 | AliHiststag() | |
162 | : fPtBeautyElec() | |
163 | , fPtTaggedElec() | |
164 | , fPtRightTaggedElec() | |
165 | , fPtWrongTaggedElec() | |
166 | , fInvmassBeautyElecSecVtx() | |
167 | , fInvmassNotBeautyElecSecVtx() | |
168 | , fSignedLxyBeautyElecSecVtx() | |
169 | , fSignedLxyNotBeautyElecSecVtx() | |
170 | , fDistTwoVtxBeautyElecSecVtx() | |
171 | , fDistTwoVtxNotBeautyElecSecVtx() | |
172 | , fCosPhiBeautyElecSecVtx() | |
173 | , fCosPhiNotBeautyElecSecVtx() | |
174 | , fChi2BeautyElecSecVtx() | |
175 | , fChi2NotBeautyElecSecVtx() | |
176 | , fInvmassBeautyElec2trkVtx() | |
177 | , fInvmassNotBeautyElec2trkVtx() | |
178 | , fSignedLxyBeautyElec2trkVtx() | |
179 | , fSignedLxyNotBeautyElec2trkVtx() | |
180 | , fChi2BeautyElec2trkVtx() | |
181 | , fChi2NotBeautyElec2trkVtx() | |
182 | { | |
183 | // define constructor | |
184 | } | |
185 | AliHiststag(const AliHiststag & p) | |
186 | : fPtBeautyElec(p.fPtBeautyElec) | |
187 | , fPtTaggedElec(p.fPtTaggedElec) | |
188 | , fPtRightTaggedElec(p.fPtRightTaggedElec) | |
189 | , fPtWrongTaggedElec(p.fPtWrongTaggedElec) | |
190 | , fInvmassBeautyElecSecVtx(p.fInvmassBeautyElecSecVtx) | |
191 | , fInvmassNotBeautyElecSecVtx(p.fInvmassNotBeautyElecSecVtx) | |
192 | , fSignedLxyBeautyElecSecVtx(p.fSignedLxyBeautyElecSecVtx) | |
193 | , fSignedLxyNotBeautyElecSecVtx(p.fSignedLxyNotBeautyElecSecVtx) | |
194 | , fDistTwoVtxBeautyElecSecVtx(p.fDistTwoVtxBeautyElecSecVtx) | |
195 | , fDistTwoVtxNotBeautyElecSecVtx(p.fDistTwoVtxNotBeautyElecSecVtx) | |
196 | , fCosPhiBeautyElecSecVtx(p.fCosPhiBeautyElecSecVtx) | |
197 | , fCosPhiNotBeautyElecSecVtx(p.fCosPhiNotBeautyElecSecVtx) | |
198 | , fChi2BeautyElecSecVtx(p.fChi2BeautyElecSecVtx) | |
199 | , fChi2NotBeautyElecSecVtx(p.fChi2NotBeautyElecSecVtx) | |
200 | , fInvmassBeautyElec2trkVtx(p.fInvmassBeautyElec2trkVtx) | |
201 | , fInvmassNotBeautyElec2trkVtx(p.fInvmassNotBeautyElec2trkVtx) | |
202 | , fSignedLxyBeautyElec2trkVtx(p.fSignedLxyBeautyElec2trkVtx) | |
203 | , fSignedLxyNotBeautyElec2trkVtx(p.fSignedLxyNotBeautyElec2trkVtx) | |
204 | , fChi2BeautyElec2trkVtx(p.fChi2BeautyElec2trkVtx) | |
205 | , fChi2NotBeautyElec2trkVtx(p.fChi2NotBeautyElec2trkVtx) | |
206 | { | |
207 | // copy constructor | |
208 | } | |
209 | AliHiststag &operator=(const AliHiststag &) | |
210 | { | |
211 | // assignment operator, not yet implemented | |
212 | return *this; | |
213 | } | |
259c3296 | 214 | }; |
215 | ||
75d81601 | 216 | AliHistspair fHistPair[10]; // struct of above given histogram for different electron sources |
217 | AliHiststag fHistTagged; // struct of above given histogram | |
259c3296 | 218 | |
dbe3abbe | 219 | Int_t fPairTagged; // number of tagged e-h pairs |
220 | Int_t fpairedTrackID[20]; // paird hadron track track | |
221 | Double_t fpairedChi2[20]; // pair chi2 | |
222 | Double_t fpairedInvMass[20]; // pair invariant mass | |
223 | Double_t fpairedSignedLxy[20]; // pair signed Lxy | |
259c3296 | 224 | |
dbe3abbe | 225 | Int_t fid[4][3]; // index to store sorting result |
226 | Int_t fia[4][3][2]; // index to store sorting result | |
259c3296 | 227 | |
dbe3abbe | 228 | Double_t fdistTwoSecVtx; // distance between two pair vertex |
229 | Double_t fcosPhi; // cos of opening angle of two pair vertex | |
259c3296 | 230 | Double_t fsignedLxy; // signed Lxy of secondary vertex |
231 | Double_t finvmass; // invariant mass of secondary vertex | |
232 | Double_t finvmassSigma; // invariant mass sigma of secondary vertex | |
233 | ||
234 | Bool_t fBTagged; // if b tagged, set true | |
dbe3abbe | 235 | Bool_t fBElec; // if set true for b electron, set true |
259c3296 | 236 | |
dbe3abbe | 237 | ClassDef(AliHFEsecVtx,0); |
259c3296 | 238 | }; |
239 | ||
240 | #endif |