From 4ab260d641203d4c5e08caa60f924b9650a2027f Mon Sep 17 00:00:00 2001 From: mariana Date: Tue, 19 Mar 2002 13:49:29 +0000 Subject: [PATCH] Last changes from I. Belikov - the tracking performs track refitting --- ITS/AliCascadeComparison.C | 10 +- ITS/AliCascadeVertexer.cxx | 10 ++ ITS/AliITStrackerV2.cxx | 187 ++++++++++++++++++++++++++++++------- ITS/AliITStrackerV2.h | 1 + ITS/AliV0FindVertices.C | 6 +- ITS/AliV0vertex.h | 12 +++ ITS/AliV0vertexer.cxx | 20 +++- 7 files changed, 202 insertions(+), 44 deletions(-) diff --git a/ITS/AliCascadeComparison.C b/ITS/AliCascadeComparison.C index 92758ff743f..bffb2938991 100644 --- a/ITS/AliCascadeComparison.C +++ b/ITS/AliCascadeComparison.C @@ -69,6 +69,7 @@ Int_t AliCascadeComparison(Int_t code=3312) { cTree->GetEvent(i); carray.AddLast(iovertex); } + delete cTree; cf->Close(); /*** Check if the file with the "good" cascades exists ***/ @@ -129,7 +130,7 @@ Int_t AliCascadeComparison(Int_t code=3312) { hf->SetFillColor(1); hf->SetFillStyle(3013); hf->SetLineWidth(2); Double_t mmin=cascadeMass-cascadeWindow, mmax=cascadeMass+cascadeWindow; - TH1F *cs =new TH1F("v0s","Cascade Effective Mass",40, mmin, mmax); + TH1F *cs =new TH1F("cs","Cascade Effective Mass",40, mmin, mmax); cs->SetXTitle("(GeV)"); cs->SetFillColor(6); Double_t pxg=0.,pyg=0.,ptg=0.; @@ -264,7 +265,8 @@ Int_t AliCascadeComparison(Int_t code=3312) { c2->cd(2); gPad->SetFillColor(42); gPad->SetFrameFillColor(10); cs->SetXTitle("(GeV/c)"); - cs->Fit("gaus","","",cascadeMass-cascadeWidth,cascadeMass+cascadeWidth); + //cs->Fit("gaus","","",cascadeMass-cascadeWidth,cascadeMass+cascadeWidth); + cs->Draw(); Double_t max=cs->GetMaximum(); TLine *line3 = new TLine(cascadeMass-cascadeWidth,0.,cascadeMass-cascadeWidth,max); @@ -357,7 +359,7 @@ Int_t good_cascades(GoodCascade *gc, Int_t max) { if (i==ngt) continue; /*** fiducial volume ***/ - Double_t x=bp->Vx(), y=bp->Vy(), z=bp->Vz(), r2=x*x+y*y; //bachelor + Double_t x=bp->Vx(), y=bp->Vy(), r2=x*x+y*y; //bachelor if (r2r2max) continue; TParticle *pp=gAlice->Particle(plab); @@ -372,7 +374,7 @@ Int_t good_cascades(GoodCascade *gc, Int_t max) { gc[nc].code=code; gc[nc].plab=plab; gc[nc].nlab=nlab; gc[nc].blab=blab; gc[nc].px=cp->Px(); gc[nc].py=cp->Py(); gc[nc].pz=cp->Pz(); - gc[nc].x=x; gc[nc].y=y; gc[nc].z=z; + gc[nc].x=bp->Vx(); gc[nc].y=bp->Vy(); gc[nc].z=bp->Vz(); nc++; } diff --git a/ITS/AliCascadeVertexer.cxx b/ITS/AliCascadeVertexer.cxx index c692598d831..980252316e3 100644 --- a/ITS/AliCascadeVertexer.cxx +++ b/ITS/AliCascadeVertexer.cxx @@ -80,6 +80,9 @@ AliCascadeVertexer::V0sTracks2CascadeVertices(const TFile *inp, TFile *out) { AliITStrackV2 *iotrack=new AliITStrackV2; branch->SetAddress(&iotrack); trkTree->GetEvent(i); + + iotrack->PropagateTo(3.,0.0023,65.19); iotrack->PropagateTo(2.5,0.,0.); + ntrack++; trks.AddLast(iotrack); } @@ -140,6 +143,13 @@ AliCascadeVertexer::V0sTracks2CascadeVertices(const TFile *inp, TFile *out) { if (r2 > fRmax*fRmax) continue; // condition on fiducial zone if (r2 < fRmin*fRmin) continue; + { + //I.B. + Double_t x1,y1,z1; V0ver->GetXYZ(x1,y1,z1); + if (r2 > (x1*x1+y1*y1)) continue; + if (z*z > z1*z1) continue; + } + // get cascade momentum Double_t px,py,pz; cascade.GetPxPyPz(px,py,pz); diff --git a/ITS/AliITStrackerV2.cxx b/ITS/AliITStrackerV2.cxx index 212af240653..591b95d2f1a 100644 --- a/ITS/AliITStrackerV2.cxx +++ b/ITS/AliITStrackerV2.cxx @@ -33,7 +33,7 @@ //#define DEBUG #ifdef DEBUG -Int_t LAB=5126; +Int_t LAB=70201; #endif AliITStrackerV2::AliITSlayer AliITStrackerV2::fLayers[kMaxLayer]; // ITS layers @@ -137,9 +137,9 @@ cout<GetY()<<' '<GetZ()<GetEntries(); for (Int_t i=0; iGetEvent(i); - AliITStrackV2 *t=new AliITStrackV2(*itrack); + AliITStrackV2 *t=0; + try { + t=new AliITStrackV2(*itrack); + } catch (const Char_t *msg) { + cerr<GetD())>4) continue; t->PropagateTo(80.,0.0053); @@ -211,18 +218,14 @@ Int_t AliITStrackerV2::Clusters2Tracks(const TFile *inp, TFile *out) { if (t==0) continue; //this track has been already tracked Int_t tpcLabel=t->GetLabel(); //save the TPC track label +lbl=tpcLabel; #ifdef DEBUG lbl=tpcLabel; if (TMath::Abs(tpcLabel)!=LAB) continue; cout<= kMaxLayer-kLayersToSkip) { - fBestTrack.SetLabel(tpcLabel); - fBestTrack.CookdEdx(); - CookLabel(&fBestTrack,0.); //For comparison only - itsTree.Fill(); - UseClusters(&fBestTrack); - delete itsTracks.RemoveAt(i); - } + if (fBestTrack.GetNumberOfClusters() < kMaxLayer-kLayersToSkip) continue; + + if (fConstraint[fPass]) { + Int_t index[kMaxLayer]; + Int_t k; + for (k=0; k>28; + index[nl]=idx; + } + fBestTrack.~AliITStrackV2(); new(&fBestTrack) AliITStrackV2(*t); + if (!RefitAt(3.7, &fBestTrack, index)) continue; + } + + fBestTrack.SetLabel(tpcLabel); + fBestTrack.CookdEdx(); + CookLabel(&fBestTrack,0.); //For comparison only + itsTree.Fill(); + UseClusters(&fBestTrack); + delete itsTracks.RemoveAt(i); } } @@ -534,10 +550,10 @@ Int_t AliITStrackerV2::TakeNextProlongation() { // dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch //-------------------------------------------------------------------- AliITSlayer &layer=fLayers[fI]; - AliITStrackV2 &t=fTracks[fI]; + ResetTrackToFollow(fTracks[fI]); - Double_t dz=4*TMath::Sqrt(t.GetSigmaZ2() + kSigmaZ2[fI]); - Double_t dy=4*TMath::Sqrt(t.GetSigmaY2() + kSigmaY2[fI]); + Double_t dz=4*TMath::Sqrt(fTrackToFollow.GetSigmaZ2() + kSigmaZ2[fI]); + Double_t dy=4*TMath::Sqrt(fTrackToFollow.GetSigmaY2() + kSigmaY2[fI]); const AliITSclusterV2 *c=0; Int_t ci=-1; Double_t chi2=12345.; @@ -545,15 +561,16 @@ Int_t AliITStrackerV2::TakeNextProlongation() { //if (c->GetLabel(0)!=TMath::Abs(lbl)) continue; Int_t idet=c->GetDetectorIndex(); - if (t.GetDetectorIndex()!=idet) { + if (fTrackToFollow.GetDetectorIndex()!=idet) { const AliITSdetector &det=layer.GetDetector(idet); - if (!t.Propagate(det.GetPhi(),det.GetR())) { + ResetTrackToFollow(fTracks[fI]); + if (!fTrackToFollow.Propagate(det.GetPhi(),det.GetR())) { //cerr<<"AliITStrackerV2::TakeNextProlongation: " //"propagation failed !\n"; continue; } - t.SetDetectorIndex(idet); - if (TMath::Abs(t.GetZ()-GetZ()) > layer.GetR()+dz) continue; + fTrackToFollow.SetDetectorIndex(idet); + if (TMath::Abs(fTrackToFollow.GetZ()-GetZ())>layer.GetR()+dz) continue; #ifdef DEBUG cout<GetZ()) > dz) continue; - if (TMath::Abs(t.GetY() - c->GetY()) > dy) continue; + if (TMath::Abs(fTrackToFollow.GetZ() - c->GetZ()) > dz) continue; + if (TMath::Abs(fTrackToFollow.GetY() - c->GetY()) > dy) continue; - chi2=t.GetPredictedChi2(c); if (chi21) + if (TMath::Abs(fTrackToFollow.GetD())>4) return 0; + fTrackToFollow. SetSampledEdx(c->GetQ(),fTrackToFollow.GetNumberOfClusters()-1); //b.b. @@ -588,9 +608,10 @@ cout<SetAddress(&iotrack); trkTree->GetEvent(i); + + iotrack->PropagateTo(3.,0.0023,65.19); iotrack->PropagateTo(2.5,0.,0.); + if (iotrack->Get1Pt() > 0.) {nneg++; negtrks.AddLast(iotrack);} else {npos++; postrks.AddLast(iotrack);} } @@ -79,11 +82,18 @@ Int_t AliV0vertexer::Tracks2V0vertices(const TFile *inp, TFile *out) { if (i%10==0) cerr<GetD())GetD())>fRmax) continue; + for (Int_t k=0; kGetD())GetD())GetD())>fRmax) continue; + + if (TMath::Abs(ntrk->GetD())GetD())