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"
22 #include "AliHLTITSTrack.h"
25 //-------------------------------------------------------------------------
26 class AliITStrackerHLT : public AliTracker {
30 void LoadClusters( std::vector<AliITSRecPoint> clusters );
31 void Reconstruct( std::vector<AliExternalTrackParam> tracksTPC );
32 std::vector< AliHLTITSTrack > &Tracks(){ return fTracks;}
34 Bool_t TransportToX( AliExternalTrackParam *t, double x ) const;
35 Bool_t TransportToPhiX( AliExternalTrackParam *t, double phi, double x ) const;
37 void GetClusterErrors2( Int_t layer, const AliITSRecPoint *cluster, AliHLTITSTrack* track, double &err2Y, double &err2Z ) const ;
40 AliITStrackerHLT(const Char_t *geom);
41 virtual ~AliITStrackerHLT();
42 AliCluster *GetCluster(Int_t index) const;
43 virtual Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
44 virtual Bool_t GetTrackPointTrackingError(Int_t index,
45 AliTrackPoint& p, const AliESDtrack *t);
46 AliITSRecPoint *GetClusterLayer(Int_t layn, Int_t ncl) const
47 {return fgLayers[layn].GetCluster(ncl);}
48 Int_t GetNumberOfClustersLayer(Int_t layn) const
49 {return fgLayers[layn].GetNumberOfClusters();}
50 Int_t LoadClusters(TTree *cf);
51 void UnloadClusters();
53 Int_t Clusters2Tracks(AliESDEvent *event);
54 Int_t PropagateBack(AliESDEvent *event);
55 Int_t RefitInward(AliESDEvent *event);
57 void SetLayersNotToSkip(const Int_t *l);
59 Double_t GetPredictedChi2MI(AliHLTITSTrack* track, const AliITSRecPoint *cluster,Int_t layer);
60 Int_t UpdateMI(AliHLTITSTrack* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
61 void SetDetTypeRec(const AliITSDetTypeRec *detTypeRec) {fkDetTypeRec = detTypeRec; ReadBadFromDetTypeRec(); }
63 TTreeSRedirector *GetDebugStreamer() {return fDebugStreamer;}
64 static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliHLTITSTrack *t);
67 AliHLTITSLayer & GetLayer(Int_t layer) const;
68 AliHLTITSDetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); }
70 void FollowProlongationTree(AliHLTITSTrack * otrack);
76 Bool_t ComputeRoad(AliHLTITSTrack* track,Int_t ilayer,Int_t idet,Double_t &zmin,Double_t &zmax,Double_t &ymin,Double_t &ymax) const;
79 void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
80 void CookLabel(AliHLTITSTrack *t,Float_t wrong) const;
82 void SignDeltas(const TObjArray *clusterArray, Float_t zv);
83 void BuildMaterialLUT(TString material);
85 Int_t CorrectForPipeMaterial(AliHLTITSTrack *t, TString direction="inward");
86 Int_t CorrectForShieldMaterial(AliHLTITSTrack *t, TString shield, TString direction="inward");
87 Int_t CorrectForLayerMaterial(AliHLTITSTrack *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
88 void UpdateESDtrack(AliESDtrack *tESD,AliHLTITSTrack* track, ULong_t flags) const;
89 void ReadBadFromDetTypeRec();
91 Int_t CheckDeadZone(AliHLTITSTrack *track,Int_t ilayer,Int_t idet,Double_t dz,Double_t dy,Bool_t noClusters=kFALSE) const;
92 Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliHLTITSTrack *track,
93 Float_t &xloc,Float_t &zloc) const;
94 // method to be used for Plane Efficiency evaluation
98 static AliHLTITSLayer fgLayers[AliITSgeomTGeo::kNLayers];// ITS layers
100 AliESDEvent * fEsd; //! pointer to the ESD event
101 Double_t fSPDdetzcentre[4]; // centres of SPD modules in z
103 Int_t fUseTGeo; // use TGeo to get material budget
105 Float_t fxOverX0Pipe; // material budget
106 Float_t fxTimesRhoPipe; // material budget
107 Float_t fxOverX0Shield[2]; // material budget
108 Float_t fxTimesRhoShield[2]; // material budget
109 Float_t fxOverX0Layer[6]; // material budget
110 Float_t fxTimesRhoLayer[6]; // material budget
112 TTreeSRedirector *fDebugStreamer; //!debug streamer
113 AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD
114 const AliITSDetTypeRec *fkDetTypeRec; //! ITS det type rec, from AliITSReconstructor
115 std::vector< AliHLTITSTrack > fTracks;
118 AliITStrackerHLT(const AliITStrackerHLT &tracker);
119 AliITStrackerHLT & operator=(const AliITStrackerHLT &tracker);
120 ClassDef(AliITStrackerHLT,0) //HLT ITS tracker
126 /////////////////////////////////////////////////////////
127 /////////////////////////////////////////////////////////
128 /////////////////////////////////////////////////////////
134 inline void AliITStrackerHLT::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
135 //--------------------------------------------------------------------
136 //This function "cooks" a track label. If label<0, this track is fake.
137 //--------------------------------------------------------------------
138 Int_t tpcLabel=t->GetLabel();
139 if (tpcLabel<0) return;
140 AliTracker::CookLabel(t,wrong);
141 if (tpcLabel!=TMath::Abs(t->GetLabel())){
144 if (tpcLabel !=t->GetLabel()) {
145 t->SetLabel(-tpcLabel);