From 3f82c4f228f0e53fc1421725b00f791cae0f5929 Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 8 Mar 2006 16:30:51 +0000 Subject: [PATCH 1/1] Changes to work correctly with laser tracks (M.Ivanov) --- TPC/AliTPCReconstructor.cxx | 2 ++ TPC/AliTPCReconstructor.h | 8 +++++++- TPC/AliTPCseed.cxx | 5 +++-- TPC/AliTPCtrack.cxx | 27 ++++++++++++++------------- TPC/AliTPCtrackerMI.cxx | 26 ++++++++++++++++---------- 5 files changed, 42 insertions(+), 26 deletions(-) diff --git a/TPC/AliTPCReconstructor.cxx b/TPC/AliTPCReconstructor.cxx index a491a174359..aa3b9f05a7e 100644 --- a/TPC/AliTPCReconstructor.cxx +++ b/TPC/AliTPCReconstructor.cxx @@ -34,6 +34,8 @@ ClassImp(AliTPCReconstructor) Double_t AliTPCReconstructor::fgCtgRange = 1.05; +Double_t AliTPCReconstructor::fgMaxSnpTracker = 0.95; // max tangent in tracker - correspond to 3 +Double_t AliTPCReconstructor::fgMaxSnpTrack = 0.999; // tangent //_____________________________________________________________________________ void AliTPCReconstructor::Reconstruct(AliRunLoader* runLoader) const diff --git a/TPC/AliTPCReconstructor.h b/TPC/AliTPCReconstructor.h index 8949a8e9d01..208ede54a2f 100644 --- a/TPC/AliTPCReconstructor.h +++ b/TPC/AliTPCReconstructor.h @@ -42,11 +42,17 @@ public: static void SetCtgRange(Double_t ctgRange = 1.05) {fgCtgRange = ctgRange;} static Double_t GetCtgRange(){ return fgCtgRange;} + static void SetMaxSnpTracker(Double_t maxSnp) {fgMaxSnpTracker = maxSnp;} + static Double_t GetMaxSnpTracker(){ return fgMaxSnpTracker;} + static void SetMaxSnpTrack(Double_t maxSnp) {fgMaxSnpTrack = maxSnp;} + static Double_t GetMaxSnpTrack(){ return fgMaxSnpTrack;} + private: AliTPCParam* GetTPCParam(AliRunLoader* runLoader) const; static Double_t fgCtgRange; //! +-fCtgRange is the ctg(Theta) window used for clusterization and tracking (MI) - + static Double_t fgMaxSnpTracker; // max sin of local angle - for TPC tracker + static Double_t fgMaxSnpTrack; // max sin of local angle - for track ClassDef(AliTPCReconstructor, 0) // class for the TPC reconstruction }; diff --git a/TPC/AliTPCseed.cxx b/TPC/AliTPCseed.cxx index bc323871ace..c54f3e9daa8 100644 --- a/TPC/AliTPCseed.cxx +++ b/TPC/AliTPCseed.cxx @@ -23,6 +23,7 @@ //----------------------------------------------------------------- #include "TClonesArray.h" #include "AliTPCseed.h" +#include "AliTPCReconstructor.h" ClassImp(AliTPCseed) @@ -300,7 +301,7 @@ Int_t AliTPCseed::GetProlongation(Double_t xk, Double_t &y, Double_t & z) const Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1; - if (TMath::Abs(fP4*xk - fP2) >= 0.999) { + if (TMath::Abs(fP4*xk - fP2) >= AliTPCReconstructor::GetMaxSnpTrack()) { return 0; } @@ -414,7 +415,7 @@ Int_t AliTPCseed::Update(const AliCluster *c, Double_t chisq, UInt_t /*index*/) Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1; Double_t cur=fP4 + k40*dy + k41*dz, eta=fP2 + k20*dy + k21*dz; - if (TMath::Abs(cur*fX-eta) >= 0.9) { + if (TMath::Abs(cur*fX-eta) >= AliTPCReconstructor::GetMaxSnpTrack()) { return 0; } diff --git a/TPC/AliTPCtrack.cxx b/TPC/AliTPCtrack.cxx index 9195cfbb26a..1b2b4760dc3 100644 --- a/TPC/AliTPCtrack.cxx +++ b/TPC/AliTPCtrack.cxx @@ -26,6 +26,7 @@ #include "AliTPCtrack.h" #include "AliCluster.h" #include "AliESDtrack.h" +#include "AliTPCReconstructor.h" ClassImp(AliTPCtrack) @@ -233,13 +234,13 @@ Double_t AliTPCtrack::GetYat(Double_t xk) const { //----------------------------------------------------------------- // This function calculates the Y-coordinate of a track at the plane x=xk. //----------------------------------------------------------------- - if (TMath::Abs(fP4*fX - fP2)>0.9999) return 1e10; //patch 01 jan 06 + if (TMath::Abs(fP4*fX - fP2)>AliTPCReconstructor::GetMaxSnpTrack()) return 0.; //patch 01 jan 06 Double_t c1=fP4*fX - fP2, r1=TMath::Sqrt(1.- c1*c1); Double_t c2=fP4*xk - fP2; - if (c2*c2>0.99999) { - Int_t n=GetNumberOfClusters(); - if (n>4) cerr<AliTPCReconstructor::GetMaxSnpTrack()) { + // Int_t n=GetNumberOfClusters(); + // if (n>4) cerr<= 0.9) { + if (TMath::Abs(fP4*xk - fP2) >= AliTPCReconstructor::GetMaxSnpTrack()) { // Int_t n=GetNumberOfClusters(); //if (n>4) cerr<GetY() - fP0, dz=c->GetZ() - fP1; Double_t cur=fP4 + k40*dy + k41*dz, eta=fP2 + k20*dy + k21*dz; - if (TMath::Abs(cur*fX-eta) >= 0.9) { + if (TMath::Abs(cur*fX-eta) >= AliTPCReconstructor::GetMaxSnpTrack()) { // Int_t n=GetNumberOfClusters(); //if (n>4) cerr<=0.9999) return 0; //patch 01 jan 06 + if (TMath::Abs(r1)>=AliTPCReconstructor::GetMaxSnpTrack()) return 0; //patch 01 jan 06 fX = x1*ca + y1*sa; fP0=-x1*sa + y1*ca; fP2=fP2*ca + (fP4*y1 + sqrt(1.- r1*r1))*sa; Double_t r2=fP4*fX - fP2; - if (TMath::Abs(r2) >= 0.99999) { - Int_t n=GetNumberOfClusters(); - if (n>4) cerr<= AliTPCReconstructor::GetMaxSnpTrack()) { + //Int_t n=GetNumberOfClusters(); + // if (n>4) cerr<= 0.) { - Int_t n=GetNumberOfClusters(); - if (n>4) cerr<4) cerr<fClusterPointer[track->fRow] = c; // - Float_t angle2 = track->GetSnp()*track->GetSnp(); + Double_t angle2 = track->GetSnp()*track->GetSnp(); angle2 = TMath::Sqrt(angle2/(1-angle2)); // //SET NEW Track Point @@ -645,7 +645,7 @@ Double_t AliTPCtrackerMI::ErrY2(AliTPCseed* seed, AliTPCclusterMI * cl){ Float_t z = TMath::Abs(fParam->GetZLength()-TMath::Abs(seed->GetZ())); Int_t ctype = cl->GetType(); Float_t padlength= GetPadPitchLength(seed->fRow); - Float_t angle2 = seed->GetSnp()*seed->GetSnp(); + Double_t angle2 = seed->GetSnp()*seed->GetSnp(); angle2 = angle2/(1-angle2); // //cluster "quality" @@ -780,7 +780,7 @@ Double_t AliTPCtrackerMI::ErrZ2(AliTPCseed* seed, AliTPCclusterMI * cl){ Int_t ctype = cl->GetType(); Float_t padlength= GetPadPitchLength(seed->fRow); // - Float_t angle2 = seed->GetSnp()*seed->GetSnp(); + Double_t angle2 = seed->GetSnp()*seed->GetSnp(); // if (angle2<0.6) angle2 = 0.6; angle2 = seed->GetTgl()*seed->GetTgl()*(1+angle2/(1-angle2)); // @@ -1370,9 +1370,9 @@ Int_t AliTPCtrackerMI::FollowToNext(AliTPCseed& t, Int_t nr) { if (TMath::Abs(angle-t.GetAlpha())>0.001){ Double_t rotation = angle-t.GetAlpha(); t.fRelativeSector= relativesector; - t.Rotate(rotation); + if (!t.Rotate(rotation)) return 0; } - t.PropagateTo(x); + if (!t.PropagateTo(x)) return 0; // t.fCurrentCluster = cl; t.fRow = nr; @@ -1392,7 +1392,12 @@ Int_t AliTPCtrackerMI::FollowToNext(AliTPCseed& t, Int_t nr) { } } } - if (fIteration>1) {t.fNFoundable++; return 0;} // not look for new cluster during refitting + if (TMath::Abs(t.GetSnp())>AliTPCReconstructor::GetMaxSnpTracker()) return 0; // cut on angle + if (fIteration>1){ + // not look for new cluster during refitting + t.fNFoundable++; + return 0; + } // UInt_t index=0; // if (TMath::Abs(t.GetSnp())>0.95 || TMath::Abs(x*t.GetC()-t.GetEta())>0.95) return 0;// patch 28 fev 06 @@ -1429,7 +1434,8 @@ Int_t AliTPCtrackerMI::FollowToNext(AliTPCseed& t, Int_t nr) { } else { - if (TMath::Abs(z)<(AliTPCReconstructor::GetCtgRange()*x+10) && TMath::Abs(z)GetZLength() ) t.fNFoundable++; + if (TMath::Abs(z)<(AliTPCReconstructor::GetCtgRange()*x+10) && TMath::Abs(z)GetZLength() && (TMath::Abs(t.GetSnp())AliTPCReconstructor::GetMaxSnpTracker()) return 0; AliTPCRow &krow=GetRow(t.fRelativeSector,nr); if (TMath::Abs(TMath::Abs(y)-ymax)fSector < fParam->GetNSector()/2) ? 0.2 :0.3; - Float_t angulary = seed->GetSnp(); + Double_t angulary = seed->GetSnp(); angulary = angulary*angulary/(1-angulary*angulary); seed->fCurrentSigmaY2 = sd2+padlength*padlength*angulary/12.+sresy*sresy; // -- 2.43.0