#ifndef ALIITSTRACKERMI_H #define ALIITSTRACKERMI_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ //------------------------------------------------------------------------- // ITS tracker // reads AliITSclusterMI clusters and creates AliITStrackMI tracks // Origin: Marian Ivanov, CERN, Marian.Ivanov@cern.ch //------------------------------------------------------------------------- class TTree; class TTreeSRedirector; class AliESD; class AliHelix; class AliITSgeom; #include #include "AliITSRecPoint.h" #include "AliITStrackMI.h" #include "AliTracker.h" //------------------------------------------------------------------------- class AliITStrackerMI : public AliTracker { public: AliITStrackerMI():AliTracker(){} AliITStrackerMI(const AliITSgeom *geom); ~AliITStrackerMI(); AliCluster *GetCluster(Int_t index) const; virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const; AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const {return fgLayers[layn].GetCluster(ncl);} Int_t GetNumberOfClustersLayer(Int_t layn) const {return fgLayers[layn].GetNumberOfClusters();} Int_t LoadClusters(TTree *cf); void UnloadClusters(); Int_t Clusters2Tracks(AliESD *event); Int_t PropagateBack(AliESD *event); Int_t RefitInward(AliESD *event); Bool_t RefitAt(Double_t x, AliITStrackMI *seed, const AliITStrackMI *t, Bool_t extra=kFALSE); Bool_t RefitAt(Double_t x, AliITStrackMI *seed, const Int_t *clindex); void SetupFirstPass(Int_t *flags, Double_t *cuts=0); void SetupSecondPass(Int_t *flags, Double_t *cuts=0); void SetLastLayerToTrackTo(Int_t l=0) {fLastLayerToTrackTo=l;} void SetLayersNotToSkip(Int_t *l); void UseClusters(const AliKalmanTrack *t, Int_t from=0) const; void GetNTeor(Int_t layer, const AliITSRecPoint* cl, Float_t theta, Float_t phi, Float_t &ny, Float_t &nz); Int_t GetError(Int_t layer, const AliITSRecPoint*cl, Float_t theta, Float_t phi, Float_t expQ, Float_t &erry, Float_t &errz); void GetDCASigma(AliITStrackMI* track, Float_t & sigmarfi, Float_t &sigmaz); Double_t GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer); Int_t UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const; class AliITSdetector { public: AliITSdetector(){} AliITSdetector(Double_t r,Double_t phi) {fR=r; fPhi=phi; fSinPhi = TMath::Sin(phi); fCosPhi = TMath::Cos(phi); fYmin=10000;fYmax=-1000; fZmin=10000;fZmax=-1000;} inline void GetGlobalXYZ( const AliITSRecPoint *cl, Double_t xyz[3]) const; Double_t GetR() const {return fR;} Double_t GetPhi() const {return fPhi;} Double_t GetYmin() const {return fYmin;} Double_t GetYmax() const {return fYmax;} Double_t GetZmin() const {return fZmin;} Double_t GetZmax() const {return fZmax;} void SetYmin(Double_t min) {fYmin = min;} void SetYmax(Double_t max) {fYmax = max;} void SetZmin(Double_t min) {fZmin = min;} void SetZmax(Double_t max) {fZmax = max;} private: Double_t fR; // polar coordinates Double_t fPhi; // of this detector Double_t fSinPhi; // sin of phi; Double_t fCosPhi; // cos of phi Double_t fYmin; // local y minimal Double_t fYmax; // local max y Double_t fZmin; // local z min Double_t fZmax; // local z max }; class AliITSlayer { friend class AliITStrackerMI; public: AliITSlayer(); AliITSlayer(Double_t r, Double_t p, Double_t z, Int_t nl, Int_t nd); ~AliITSlayer(); Int_t InsertCluster(AliITSRecPoint *c); void SortClusters(); void ResetClusters(); void ResetWeights(); void SelectClusters(Double_t zmi,Double_t zma,Double_t ymi,Double_t yma); const AliITSRecPoint *GetNextCluster(Int_t &ci); void ResetRoad(); Double_t GetRoad() const {return fRoad;} Double_t GetR() const {return fR;} Int_t FindClusterIndex(Float_t z) const; AliITSRecPoint *GetCluster(Int_t i) const {return iGetLabel(); if (tpcLabel<0) return; AliTracker::CookLabel(t,wrong); if (tpcLabel!=TMath::Abs(t->GetLabel())){ t->SetFakeRatio(1.); } if (tpcLabel !=t->GetLabel()) { t->SetLabel(-tpcLabel); } } inline Double_t AliITStrackerMI::NormalizedChi2(AliITStrackMI * track, Int_t layer) { //-------------------------------------------------------------------- //get normalize chi2 //-------------------------------------------------------------------- track->fNormChi2[layer] = 2.*track->fNSkipped+0.25*track->fNDeadZone+track->fdEdxMismatch+track->GetChi2()/ //track->fNormChi2[layer] = 2.*track->fNSkipped+0.25*track->fNDeadZone+track->fdEdxMismatch+track->fChi22/ TMath::Max(double(track->GetNumberOfClusters()-track->fNSkipped), 1./(1.+track->fNSkipped)); return track->fNormChi2[layer]; } inline void AliITStrackerMI::AliITSdetector::GetGlobalXYZ(const AliITSRecPoint *cl, Double_t xyz[3]) const { // // get cluster coordinates in global cooordinate // xyz[2] = cl->GetZ(); xyz[0] = fR*fCosPhi - cl->GetY()*fSinPhi; xyz[1] = fR*fSinPhi + cl->GetY()*fCosPhi; } #endif