]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/ITS/tracking/AliITStrackerHLT.h
unused SetLayersNotToSkip() removed
[u/mrichter/AliRoot.git] / HLT / ITS / tracking / AliITStrackerHLT.h
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                               */
5
6
7 class TTree;
8 class TTreeSRedirector;
9 class AliESDEvent;
10 class AliESDtrack;
11
12 class AliITSChannelStatus;
13 class AliITSDetTypeRec;
14 #include "AliHLTITSTrack.h" 
15 #include "AliHLTITSDetector.h"
16 #include "AliHLTITSLayer.h"
17
18 #include <TObjArray.h>
19
20 #include "AliITSRecPoint.h"
21 #include "AliTracker.h"
22 #include "AliHLTITSTrack.h"
23 #include <vector>
24
25 //-------------------------------------------------------------------------
26 class AliITStrackerHLT : public AliTracker {
27 public:
28
29   
30   void LoadClusters( std::vector<AliITSRecPoint> clusters );
31   void Reconstruct( std::vector<AliExternalTrackParam> tracksTPC );
32   std::vector< AliHLTITSTrack > &Tracks(){ return fTracks;}
33
34   Bool_t TransportToX( AliExternalTrackParam *t, double x ) const;
35   Bool_t TransportToPhiX( AliExternalTrackParam *t, double phi, double x ) const;
36   
37   void GetClusterErrors2( Int_t layer, const AliITSRecPoint *cluster, AliHLTITSTrack* track, double &err2Y, double &err2Z ) const ;
38
39   AliITStrackerHLT();
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();
52   
53   Int_t Clusters2Tracks(AliESDEvent *event);
54   Int_t PropagateBack(AliESDEvent *event);
55   Int_t RefitInward(AliESDEvent *event);
56   
57
58   Double_t GetPredictedChi2MI(AliHLTITSTrack* track, const AliITSRecPoint *cluster,Int_t layer);
59   Int_t UpdateMI(AliHLTITSTrack* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;  
60   void SetDetTypeRec(const AliITSDetTypeRec *detTypeRec) {fkDetTypeRec = detTypeRec; ReadBadFromDetTypeRec(); }
61
62   TTreeSRedirector *GetDebugStreamer() {return fDebugStreamer;}
63   static Int_t CorrectForTPCtoITSDeadZoneMaterial(AliHLTITSTrack *t);
64
65
66   AliHLTITSLayer    & GetLayer(Int_t layer) const;
67   AliHLTITSDetector & GetDetector(Int_t layer, Int_t n) const {return GetLayer(layer).GetDetector(n); }
68  
69   void FollowProlongationTree(AliHLTITSTrack * otrack);
70
71
72
73 protected:
74
75   Bool_t ComputeRoad(AliHLTITSTrack* track,Int_t ilayer,Int_t idet,Double_t &zmin,Double_t &zmax,Double_t &ymin,Double_t &ymax) const;
76   
77   
78   void CookLabel(AliKalmanTrack *t,Float_t wrong) const;
79   void CookLabel(AliHLTITSTrack *t,Float_t wrong) const;
80
81   void       SignDeltas(const TObjArray *clusterArray, Float_t zv);
82   void BuildMaterialLUT(TString material);
83   
84   Int_t CorrectForPipeMaterial(AliHLTITSTrack *t, TString direction="inward");
85   Int_t CorrectForShieldMaterial(AliHLTITSTrack *t, TString shield, TString direction="inward");
86   Int_t CorrectForLayerMaterial(AliHLTITSTrack *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
87   void UpdateESDtrack(AliESDtrack *tESD,AliHLTITSTrack* track, ULong_t flags) const;
88   void ReadBadFromDetTypeRec();
89   
90   Int_t CheckDeadZone(AliHLTITSTrack *track,Int_t ilayer,Int_t idet,Double_t dz,Double_t dy,Bool_t noClusters=kFALSE) const;
91   Bool_t LocalModuleCoord(Int_t ilayer,Int_t idet,const AliHLTITSTrack *track,
92                           Float_t &xloc,Float_t &zloc) const;
93 // method to be used for Plane Efficiency evaluation
94
95   // 
96
97   static AliHLTITSLayer fgLayers[AliITSgeomTGeo::kNLayers];// ITS layers
98   
99   AliESDEvent  * fEsd;                   //! pointer to the ESD event
100   Double_t fSPDdetzcentre[4];            // centres of SPD modules in z
101   
102   Int_t fUseTGeo;                        // use TGeo to get material budget
103
104   Float_t fxOverX0Pipe;                  // material budget
105   Float_t fxTimesRhoPipe;                // material budget
106   Float_t fxOverX0Shield[2];             // material budget
107   Float_t fxTimesRhoShield[2];           // material budget
108   Float_t fxOverX0Layer[6];              // material budget
109   Float_t fxTimesRhoLayer[6];            // material budget
110
111   TTreeSRedirector *fDebugStreamer;      //!debug streamer
112   AliITSChannelStatus *fITSChannelStatus;//! bitmaps with channel status for SPD and SDD
113   const AliITSDetTypeRec *fkDetTypeRec;         //! ITS det type rec, from AliITSReconstructor
114   std::vector< AliHLTITSTrack > fTracks;
115
116 private:
117   AliITStrackerHLT(const AliITStrackerHLT &tracker);
118   AliITStrackerHLT & operator=(const AliITStrackerHLT &tracker);  
119   ClassDef(AliITStrackerHLT,0)   //HLT ITS tracker
120 };
121
122
123
124
125 /////////////////////////////////////////////////////////
126 /////////////////////////////////////////////////////////
127 /////////////////////////////////////////////////////////
128
129
130
131
132
133 inline void AliITStrackerHLT::CookLabel(AliKalmanTrack *t,Float_t wrong) const {
134   //--------------------------------------------------------------------
135   //This function "cooks" a track label. If label<0, this track is fake.
136   //--------------------------------------------------------------------
137    Int_t tpcLabel=t->GetLabel();
138    if (tpcLabel<0) return;
139    AliTracker::CookLabel(t,wrong);
140    if (tpcLabel!=TMath::Abs(t->GetLabel())){
141      t->SetFakeRatio(1.);
142    }
143    if (tpcLabel !=t->GetLabel()) {
144      t->SetLabel(-tpcLabel);      
145    }
146 }
147
148
149
150 #endif