]>
Commit | Line | Data |
---|---|---|
7f6ddf58 | 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 vertex class | |
18 | // | |
19 | // Origin: Iouri Belikov, IReS, Strasbourg, Jouri.Belikov@cern.ch | |
20 | //------------------------------------------------------------------------- | |
7f6ddf58 | 21 | #include <TMath.h> |
22 | ||
23 | #include "AliV0vertex.h" | |
24 | #include "AliITStrackV2.h" | |
25 | ||
26 | ClassImp(AliV0vertex) | |
27 | ||
7f6ddf58 | 28 | AliV0vertex::AliV0vertex(const AliITStrackV2 &n, const AliITStrackV2 &p) { |
29 | //-------------------------------------------------------------------- | |
30 | // Main constructor | |
31 | //-------------------------------------------------------------------- | |
32 | fPdgCode=kK0Short; | |
e23730c7 | 33 | fNidx=n.GetLabel(); fPidx=p.GetLabel(); //indices in the array of ESD tracks |
7f6ddf58 | 34 | |
35 | //Trivial estimation of the vertex parameters | |
36 | Double_t pt, phi, x, par[5]; | |
37 | Double_t alpha, cs, sn; | |
38 | ||
39 | n.GetExternalParameters(x,par); alpha=n.GetAlpha(); | |
40 | pt=1./TMath::Abs(par[4]); | |
41 | phi=TMath::ASin(par[2]) + alpha; | |
42 | Double_t px1=pt*TMath::Cos(phi), py1=pt*TMath::Sin(phi), pz1=pt*par[3]; | |
43 | cs=TMath::Cos(alpha); sn=TMath::Sin(alpha); | |
44 | Double_t x1=x*cs - par[0]*sn; | |
45 | Double_t y1=x*sn + par[0]*cs; | |
46 | Double_t z1=par[1]; | |
47 | Double_t sx1=sn*sn*n.GetSigmaY2(), sy1=cs*cs*n.GetSigmaY2(); | |
48 | ||
49 | p.GetExternalParameters(x,par); alpha=p.GetAlpha(); | |
50 | pt=1./TMath::Abs(par[4]); | |
51 | phi=TMath::ASin(par[2]) + alpha; | |
52 | Double_t px2=pt*TMath::Cos(phi), py2=pt*TMath::Sin(phi), pz2=pt*par[3]; | |
53 | cs=TMath::Cos(alpha); sn=TMath::Sin(alpha); | |
54 | Double_t x2=x*cs - par[0]*sn; | |
55 | Double_t y2=x*sn + par[0]*cs; | |
56 | Double_t z2=par[1]; | |
57 | Double_t sx2=sn*sn*p.GetSigmaY2(), sy2=cs*cs*p.GetSigmaY2(); | |
58 | ||
59 | Double_t sz1=n.GetSigmaZ2(), sz2=p.GetSigmaZ2(); | |
60 | Double_t wx1=sx2/(sx1+sx2), wx2=1.- wx1; | |
61 | Double_t wy1=sy2/(sy1+sy2), wy2=1.- wy1; | |
62 | Double_t wz1=sz2/(sz1+sz2), wz2=1.- wz1; | |
63 | fPos[0]=wx1*x1 + wx2*x2; fPos[1]=wy1*y1 + wy2*y2; fPos[2]=wz1*z1 + wz2*z2; | |
64 | ||
65 | //fPos[0]=0.5*(x1+x2); fPos[1]=0.5*(y1+y2); fPos[2]=0.5*(z1+z2); | |
66 | fNmom[0]=px1; fNmom[1]=py1; fNmom[2]=pz1; | |
67 | fPmom[0]=px2; fPmom[1]=py2; fPmom[2]=pz2; | |
68 | ||
69 | Double_t e1=TMath::Sqrt(0.13957*0.13957 + px1*px1 + py1*py1 + pz1*pz1); | |
70 | Double_t e2=TMath::Sqrt(0.13957*0.13957 + px2*px2 + py2*py2 + pz2*pz2); | |
71 | fEffMass=TMath::Sqrt((e1+e2)*(e1+e2)- | |
72 | (px1+px2)*(px1+px2)-(py1+py2)*(py1+py2)-(pz1+pz2)*(pz1+pz2)); | |
73 | ||
74 | fChi2=7.; | |
75 | } | |
7f6ddf58 | 76 |