1 #ifndef ALIITSTRACKERHLT_H
2 #define ALIITSTRACKERHLT_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 class TTreeSRedirector;
12 class AliITSChannelStatus;
13 class AliITSDetTypeRec;
14 #include "AliHLTITSTrack.h"
15 #include "AliHLTITSDetector.h"
16 #include "AliHLTITSLayer.h"
18 #include <TObjArray.h>
20 #include "AliITSRecPoint.h"
21 #include "AliTracker.h"
24 //-------------------------------------------------------------------------
25 class AliITStrackerHLT : public AliTracker {
27 Bool_t TransportToX( AliExternalTrackParam *t, double x ) const;
28 Bool_t TransportToPhiX( AliExternalTrackParam *t, double phi, double x ) const;
29 Bool_t UpdateMy( AliExternalTrackParam *t, double y, double z, double err2y, double err2z ) const;
30 void GetClusterErrors2( Int_t layer, const AliITSRecPoint *cluster, AliHLTITSTrack* track, double &err2Y, double &err2Z ) const ;
33 AliITStrackerHLT(const Char_t *geom);
34 virtual ~AliITStrackerHLT();
35 AliCluster *GetCluster(Int_t index) const;
36 virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
37 virtual Bool_t GetTrackPointTrackingError(Int_t index,
38 AliTrackPoint& p, const AliESDtrack *t);
39 AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const
40 {return fgLayers[layn].GetCluster(ncl);}
41 Int_t GetNumberOfClustersLayer(Int_t layn) const
42 {return fgLayers[layn].GetNumberOfClusters();}
43 Int_t LoadClusters(TTree *cf);
44 void UnloadClusters();
46 Int_t Clusters2Tracks(AliESDEvent *event);
47 Int_t PropagateBack(AliESDEvent *event);
48 Int_t RefitInward(AliESDEvent *event);
50 void SetLayersNotToSkip(const Int_t *l);
52 Double_t GetPredictedChi2MI(AliHLTITSTrack* track, const AliITSRecPoint *cluster,Int_t layer);
53 Int_t UpdateMI(AliHLTITSTrack* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
54 void SetDetTypeRec(const AliITSDetTypeRec *detTypeRec) {fkDetTypeRec = detTypeRec; ReadBadFromDetTypeRec(); }
56 TTreeSRedirector *GetDebugStreamer() {return fDebugStreamer;}
57 static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliHLTITSTrack *t);
60 AliHLTITSLayer & GetLayer(Int_t layer) const;
61 AliHLTITSDetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); }
63 void FollowProlongationTree(AliHLTITSTrack * otrack);
66 Bool_t ComputeRoad(AliHLTITSTrack* track,Int_t ilayer,Int_t idet,Double_t &zmin,Double_t &zmax,Double_t &ymin,Double_t &ymax) const;
69 void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
70 void CookLabel(AliHLTITSTrack *t,Float_t wrong) const;
72 void SignDeltas(const TObjArray *clusterArray, Float_t zv);
73 void BuildMaterialLUT(TString material);
75 Int_t CorrectForPipeMaterial(AliHLTITSTrack *t, TString direction="inward");
76 Int_t CorrectForShieldMaterial(AliHLTITSTrack *t, TString shield, TString direction="inward");
77 Int_t CorrectForLayerMaterial(AliHLTITSTrack *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
78 void UpdateESDtrack(AliHLTITSTrack* track, ULong_t flags) const;
79 void ReadBadFromDetTypeRec();
81 Int_t CheckDeadZone(AliHLTITSTrack *track,Int_t ilayer,Int_t idet,Double_t dz,Double_t dy,Bool_t noClusters=kFALSE) const;
82 Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliHLTITSTrack *track,
83 Float_t &xloc,Float_t &zloc) const;
84 // method to be used for Plane Efficiency evaluation
88 static AliHLTITSLayer fgLayers[AliITSgeomTGeo::kNLayers];// ITS layers
90 AliESDEvent * fEsd; //! pointer to the ESD event
91 Double_t fSPDdetzcentre[4]; // centres of SPD modules in z
93 Int_t fUseTGeo; // use TGeo to get material budget
95 Float_t fxOverX0Pipe; // material budget
96 Float_t fxTimesRhoPipe; // material budget
97 Float_t fxOverX0Shield[2]; // material budget
98 Float_t fxTimesRhoShield[2]; // material budget
99 Float_t fxOverX0Layer[6]; // material budget
100 Float_t fxTimesRhoLayer[6]; // material budget
102 TTreeSRedirector *fDebugStreamer; //!debug streamer
103 AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD
104 const AliITSDetTypeRec *fkDetTypeRec; //! ITS det type rec, from AliITSReconstructor
107 AliITStrackerHLT(const AliITStrackerHLT &tracker);
108 AliITStrackerHLT & operator=(const AliITStrackerHLT &tracker);
109 ClassDef(AliITStrackerHLT,0) //HLT ITS tracker
115 /////////////////////////////////////////////////////////
116 /////////////////////////////////////////////////////////
117 /////////////////////////////////////////////////////////
123 inline void AliITStrackerHLT::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
124 //--------------------------------------------------------------------
125 //This function "cooks" a track label. If label<0, this track is fake.
126 //--------------------------------------------------------------------
127 Int_t tpcLabel=t->GetLabel();
128 if (tpcLabel<0) return;
129 AliTracker::CookLabel(t,wrong);
130 if (tpcLabel!=TMath::Abs(t->GetLabel())){
133 if (tpcLabel !=t->GetLabel()) {
134 t->SetLabel(-tpcLabel);