]>
Commit | Line | Data |
---|---|---|
c7bafca9 | 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 | //------------------------------------------------------------------------- | |
17 | // Implementation of the V0 vertexer class | |
18 | // reads tracks writes out V0 vertices | |
19 | // fills the ESD with the V0s | |
8859d205 | 20 | // Origin: Iouri Belikov, IPHC, Strasbourg, Jouri.Belikov@cern.ch |
c7bafca9 | 21 | //------------------------------------------------------------------------- |
c028b974 | 22 | |
23 | ||
af885e0f | 24 | #include "AliESDEvent.h" |
c7bafca9 | 25 | #include "AliESDv0.h" |
c7bafca9 | 26 | #include "AliV0vertexer.h" |
27 | ||
28 | ClassImp(AliV0vertexer) | |
29 | ||
5e4ff34d | 30 | |
31 | //A set of very loose cuts | |
e82eee7e | 32 | Double_t AliV0vertexer::fgChi2max=33.; //max chi2 |
33 | Double_t AliV0vertexer::fgDNmin=0.05; //min imp parameter for the 1st daughter | |
34 | Double_t AliV0vertexer::fgDPmin=0.05; //min imp parameter for the 2nd daughter | |
9fbe5c5c | 35 | Double_t AliV0vertexer::fgDCAmax=1.5; //max DCA between the daughter tracks |
36 | Double_t AliV0vertexer::fgCPAmin=0.9; //min cosine of V0's pointing angle | |
e82eee7e | 37 | Double_t AliV0vertexer::fgRmin=0.2; //min radius of the fiducial volume |
1a8430dc | 38 | Double_t AliV0vertexer::fgRmax=200.; //max radius of the fiducial volume |
5e4ff34d | 39 | |
af885e0f | 40 | Int_t AliV0vertexer::Tracks2V0vertices(AliESDEvent *event) { |
c7bafca9 | 41 | //-------------------------------------------------------------------- |
42 | //This function reconstructs V0 vertices | |
43 | //-------------------------------------------------------------------- | |
8859d205 | 44 | |
8859d205 | 45 | const AliESDVertex *vtxT3D=event->GetPrimaryVertex(); |
46 | ||
e690d4d0 | 47 | Double_t xPrimaryVertex=vtxT3D->GetX(); |
48 | Double_t yPrimaryVertex=vtxT3D->GetY(); | |
49 | Double_t zPrimaryVertex=vtxT3D->GetZ(); | |
c7bafca9 | 50 | |
51 | Int_t nentr=event->GetNumberOfTracks(); | |
52 | Double_t b=event->GetMagneticField(); | |
53 | ||
da46f3ca | 54 | if (nentr<2) return 0; |
55 | ||
1684b2ce | 56 | TArrayI neg(nentr); |
57 | TArrayI pos(nentr); | |
c7bafca9 | 58 | |
59 | Int_t nneg=0, npos=0, nvtx=0; | |
60 | ||
61 | Int_t i; | |
62 | for (i=0; i<nentr; i++) { | |
63 | AliESDtrack *esdTrack=event->GetTrack(i); | |
46be1d8a | 64 | ULong_t status=esdTrack->GetStatus(); |
c7bafca9 | 65 | |
6f63c098 | 66 | //if ((status&AliESDtrack::kITSrefit)==0)//not to accept the ITS SA tracks |
46be1d8a | 67 | if ((status&AliESDtrack::kTPCrefit)==0) continue; |
c7bafca9 | 68 | |
8859d205 | 69 | Double_t d=esdTrack->GetD(xPrimaryVertex,yPrimaryVertex,b); |
c7bafca9 | 70 | if (TMath::Abs(d)<fDPmin) continue; |
71 | if (TMath::Abs(d)>fRmax) continue; | |
72 | ||
73 | if (esdTrack->GetSign() < 0.) neg[nneg++]=i; | |
74 | else pos[npos++]=i; | |
75 | } | |
76 | ||
77 | ||
78 | for (i=0; i<nneg; i++) { | |
79 | Int_t nidx=neg[i]; | |
80 | AliESDtrack *ntrk=event->GetTrack(nidx); | |
81 | ||
82 | for (Int_t k=0; k<npos; k++) { | |
83 | Int_t pidx=pos[k]; | |
84 | AliESDtrack *ptrk=event->GetTrack(pidx); | |
85 | ||
8859d205 | 86 | if (TMath::Abs(ntrk->GetD(xPrimaryVertex,yPrimaryVertex,b))<fDNmin) |
87 | if (TMath::Abs(ptrk->GetD(xPrimaryVertex,yPrimaryVertex,b))<fDNmin) continue; | |
c7bafca9 | 88 | |
89 | Double_t xn, xp, dca=ntrk->GetDCA(ptrk,b,xn,xp); | |
90 | if (dca > fDCAmax) continue; | |
91 | if ((xn+xp) > 2*fRmax) continue; | |
92 | if ((xn+xp) < 2*fRmin) continue; | |
93 | ||
94 | AliExternalTrackParam nt(*ntrk), pt(*ptrk); | |
95 | Bool_t corrected=kFALSE; | |
96 | if ((nt.GetX() > 3.) && (xn < 3.)) { | |
97 | //correct for the beam pipe material | |
98 | corrected=kTRUE; | |
99 | } | |
100 | if ((pt.GetX() > 3.) && (xp < 3.)) { | |
101 | //correct for the beam pipe material | |
102 | corrected=kTRUE; | |
103 | } | |
104 | if (corrected) { | |
105 | dca=nt.GetDCA(&pt,b,xn,xp); | |
106 | if (dca > fDCAmax) continue; | |
107 | if ((xn+xp) > 2*fRmax) continue; | |
108 | if ((xn+xp) < 2*fRmin) continue; | |
109 | } | |
110 | ||
111 | nt.PropagateTo(xn,b); pt.PropagateTo(xp,b); | |
112 | ||
113 | AliESDv0 vertex(nt,nidx,pt,pidx); | |
c028b974 | 114 | if (vertex.GetChi2V0() > fChi2max) continue; |
c7bafca9 | 115 | |
ee7731d6 | 116 | Double_t x=vertex.Xv(), y=vertex.Yv(); |
117 | Double_t r2=x*x + y*y; | |
118 | if (r2 < fRmin*fRmin) continue; | |
119 | if (r2 > fRmax*fRmax) continue; | |
120 | ||
8859d205 | 121 | Float_t cpa=vertex.GetV0CosineOfPointingAngle(xPrimaryVertex,yPrimaryVertex,zPrimaryVertex); |
dfbacac8 | 122 | const Double_t pThr=1.5; |
123 | Double_t pv0=vertex.P(); | |
124 | if (pv0<pThr) { | |
125 | //Below the threshold "pThr", try a momentum dependent cos(PA) cut | |
126 | const Double_t bend=0.03; // approximate Xi bending angle | |
58d0e2bc | 127 | const Double_t qt=0.211; // max Lambda pT in Omega decay |
e89f8429 | 128 | const Double_t cpaThr=TMath::Cos(TMath::ATan(qt/pThr) + bend); |
dfbacac8 | 129 | Double_t |
e89f8429 | 130 | cpaCut=(fCPAmin/cpaThr)*TMath::Cos(TMath::ATan(qt/pv0) + bend); |
dfbacac8 | 131 | if (cpa < cpaCut) continue; |
58d0e2bc | 132 | } else |
46be1d8a | 133 | if (cpa < fCPAmin) continue; |
dfbacac8 | 134 | |
c028b974 | 135 | vertex.SetDcaV0Daughters(dca); |
b75d63a7 | 136 | vertex.SetV0CosineOfPointingAngle(cpa); |
137 | vertex.ChangeMassHypothesis(kK0Short); | |
c7bafca9 | 138 | |
139 | event->AddV0(&vertex); | |
140 | ||
141 | nvtx++; | |
142 | } | |
143 | } | |
144 | ||
145 | Info("Tracks2V0vertices","Number of reconstructed V0 vertices: %d",nvtx); | |
146 | ||
da46f3ca | 147 | return nvtx; |
c7bafca9 | 148 | } |
149 | ||
150 | ||
151 | ||
152 | ||
153 | ||
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 |