for (i=0; i<ntr; i++) {
AliESDtrack *esdtr=event->GetTrack(i);
UInt_t status=esdtr->GetStatus();
- UInt_t flags=AliESDtrack::kITSin|AliESDtrack::kTPCin;
+ UInt_t flags=AliESDtrack::kITSin|AliESDtrack::kTPCin|
+ AliESDtrack::kTPCpid|AliESDtrack::kESDpid;
if ((status&AliESDtrack::kITSrefit)==0)
- if ((status&flags)!=status) continue;
+ if (flags!=status) continue;
AliITStrackV2 *iotrack=new AliITStrackV2(*esdtr);
iotrack->SetLabel(i); // now it is the index in array of ESD tracks
AliV0vertex *v=(AliV0vertex*)vtcs.UncheckedAt(i);
v->ChangeMassHypothesis(kLambda0); // the v0 must be Lambda
if (TMath::Abs(v->GetEffMass()-massLambda)>fMassWin) continue;
- if (v->GetD(0,0,0)<fDV0min) continue;
+ if (v->GetD(fX,fY,fZ)<fDV0min) continue;
for (Int_t j=0; j<ntr; j++) {
AliITStrackV2 *b=(AliITStrackV2*)trks.UncheckedAt(j);
- if (TMath::Abs(b->GetD())<fDBachMin) continue;
if (b->Get1Pt()>0.) continue; // bachelor's charge
+ if (TMath::Abs(b->GetD(fX,fY))<fDBachMin) continue;
AliV0vertex v0(*v), *pv0=&v0;
AliITStrackV2 bt(*b), *pbt=&bt;
{
Double_t x1,y1,z1; pv0->GetXYZ(x1,y1,z1);
if (r2 > (x1*x1+y1*y1)) continue;
- if (z*z > z1*z1) continue;
+ //if ((z-fZ)*(z-fZ) > (z1-fZ)*(z1-fZ)) continue;
}
Double_t px,py,pz; cascade.GetPxPyPz(px,py,pz);
Double_t p2=px*px+py*py+pz*pz;
- Double_t cost=(x*px+y*py+z*pz)/TMath::Sqrt(p2*(r2+z*z));
-
- if (cost<fCPAmax) continue; //condition on the cascade pointing angle
+ Double_t cost=((x-fX)*px + (y-fY)*py + (z-fZ)*pz)/
+ TMath::Sqrt(p2*((x-fX)*(x-fX) + (y-fY)*(y-fY) + (z-fZ)*(z-fZ)));
+ if (cost<fCPAmax) continue; //condition on the cascade pointing angle
//cascade.ChangeMassHypothesis(); //default is Xi
event->AddCascade(&cascade);
AliV0vertex *v=(AliV0vertex*)vtcs.UncheckedAt(i);
v->ChangeMassHypothesis(kLambda0Bar); //the v0 must be anti-Lambda
if (TMath::Abs(v->GetEffMass()-massLambda)>fMassWin) continue;
- if (v->GetD(0,0,0)<fDV0min) continue;
+ if (v->GetD(fX,fY,fZ)<fDV0min) continue;
for (Int_t j=0; j<ntr; j++) {
AliITStrackV2 *b=(AliITStrackV2*)trks.UncheckedAt(j);
- if (TMath::Abs(b->GetD())<fDBachMin) continue;
+ if (TMath::Abs(b->GetD(fX,fY))<fDBachMin) continue;
if (b->Get1Pt()<0.) continue; // bachelor's charge
AliV0vertex v0(*v), *pv0=&v0;
Double_t px,py,pz; cascade.GetPxPyPz(px,py,pz);
Double_t p2=px*px+py*py+pz*pz;
- Double_t cost=(x*px+y*py+z*pz)/TMath::Sqrt(p2*(r2+z*z));
+ Double_t cost=((x-fX)*px + (y-fY)*py + (z-fZ)*pz)/
+ TMath::Sqrt(p2*((x-fX)*(x-fX) + (y-fY)*(y-fY) + (z-fZ)*(z-fZ)));
if (cost<fCPAmax) continue; //condition on the cascade pointing angle
//cascade.ChangeMassHypothesis(); //default is Xi
AliCascadeVertexer();
AliCascadeVertexer(const Double_t cuts[8]);
void SetCuts(const Double_t cuts[8]);
+ void SetVertex(Double_t *vtx) { fX=vtx[0]; fY=vtx[1]; fZ=vtx[2]; }
Int_t V0sTracks2CascadeVertices(AliESD *event);
Int_t V0sTracks2CascadeVertices(TTree *v, TTree *t, TTree *x);
Double_t PropagateToDCA(AliV0vertex *vtx, AliITStrackV2 *trk);
void GetCuts(Double_t cuts[8]) const;
+ void GetVertex(Double_t *vtx) const { vtx[0]=fX; vtx[1]=fY; vtx[2]=fZ; }
private:
Double_t fChi2max; // maximal allowed chi2
Double_t fCPAmax; // maximal allowed cosine of the cascade pointing angle
Double_t fRmin, fRmax;// max & min radii of the fiducial volume
+ Double_t fX; // X-coordinate of the primary vertex
+ Double_t fY; // Y-coordinate of the primary vertex
+ Double_t fZ; // Z-coordinate of the primary vertex
+
ClassDef(AliCascadeVertexer,1) // cascade verterxer
};
fDV0min=cuts[1]; fMassWin=cuts[2]; fDBachMin=cuts[3];
fDCAmax=cuts[4]; fCPAmax=cuts[5];
fRmin=cuts[6]; fRmax=cuts[7];
+ fX=fY=fZ=0.;
}
inline void AliCascadeVertexer::SetCuts(const Double_t cuts[8]) {
Double_t cuts[]={33, // max. allowed chi2
0.16,// min. allowed negative daughter's impact parameter
0.05,// min. allowed positive daughter's impact parameter
- 0.080,// max. allowed DCA between the daughter tracks
- 0.998,// max. allowed cosine of V0's pointing angle
+ 0.08,// max. allowed DCA between the daughter tracks
+ 0.99,// max. allowed cosine of V0's pointing angle
0.9, // min. radius of the fiducial volume
2.9 // max. radius of the fiducial volume
};
2.9 // max. radius of the fiducial volume
};
AliCascadeVertexer cvtxer=AliCascadeVertexer(cts);
+ cvtxer.SetVertex(vtx);
cvtxer.V0sTracks2CascadeVertices(esd);
}