]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackerGlo.h
reco update
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerGlo.h
1 #ifndef ALIITSTRACKERU_H
2 #define ALIITSTRACKERU_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //-------------------------------------------------------------------------
7 //                ITS upgrade tracker base class
8 //-------------------------------------------------------------------------
9
10 #include "AliTracker.h"
11 #include "AliESDEvent.h"
12 #include "AliITSUSeed.h"
13 #include "AliITSUTrackCond.h"
14 #include "AliITSUTrackHyp.h"
15
16 class AliITSUReconstructor;
17 class AliITSURecoDet;
18 class AliITSUClusterPix;
19 class AliESDtrack;
20
21 class TTree;
22
23
24 //-------------------------------------------------------------------------
25 class AliITSUTrackerGlo : public AliTracker {
26
27   public:
28   enum {kClus2Tracks,kPropBack,kRefitInw};   // tracking phases
29   enum { // info from track extrapolation to layer for cluster check
30     kTrXIn ,kTrYIn ,kTrZIn ,kTrPhiIn , // entrance (outer) point on the layer from above 
31     kTrXOut,kTrYOut,kTrZOut,kTrPhiOut, // exit (inner) point on the layer
32     kTrPhi0, kTrDPhi, kTrZ0, kTrDZ,     // mean phi,dPhi, mean z, dZ (don't change this order)
33     kNTrImpData};
34   //
35   enum {kMissingCluster=0  // no cluster found on this layer
36         ,kTransportFailed=1  // seed did not reach target layer
37         ,kRWCheckFailed =2  // failed to rotate the seed to frame of the layer impact point
38   };
39   enum {kStopSearchOnSensor,kClusterNotMatching,kClusterMatching}; // flags for track-to-cluster checks
40
41   AliITSUTrackerGlo(AliITSUReconstructor* rec);
42   virtual ~AliITSUTrackerGlo();
43
44   virtual Int_t          Clusters2Tracks(AliESDEvent *event);
45   virtual Int_t          PropagateBack(AliESDEvent *event);
46   virtual Int_t          RefitInward(AliESDEvent *event);
47   virtual Int_t          LoadClusters(TTree * treeRP=0);
48   virtual void           UnloadClusters();
49   virtual AliCluster*    GetCluster(Int_t index) const;
50   //------------------------------------
51   AliITSURecoDet*        GetITSInterface()       const {return fITS;}
52   //
53   //------------------------------------
54   Bool_t                 NeedToProlong(AliESDtrack* estTr);
55   void                   Init(AliITSUReconstructor* rec);
56   void                   FindTrack(AliESDtrack* esdTr, Int_t esdID);
57   Bool_t                 InitHypothesis(AliESDtrack *esdTr, Int_t esdID);
58   Bool_t                 TransportToLayer(AliITSUSeed* seed, Int_t lFrom, Int_t lTo);
59   Bool_t                 TransportToLayer(AliExternalTrackParam* seed, Int_t lFrom, Int_t lTo);
60   Bool_t                 PropagateSeed(AliITSUSeed *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
61   Bool_t                 PropagateSeed(AliExternalTrackParam *seed, Double_t xToGo, Double_t mass, Double_t maxStep=1.0, Bool_t matCorr=kTRUE);
62   Bool_t                 RefitTrack(AliITSUTrackHyp* trc, Double_t r);
63   //
64   Bool_t                 NeedToKill(AliITSUSeed* seed, Int_t flag);
65   Bool_t                 GetRoadWidth(AliITSUSeed* seed, int ilrA);
66   Int_t                  CheckCluster(AliITSUSeed* seed, Int_t lr, Int_t clID);
67   void                   AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr);
68   //
69   AliITSUSeed*           NewSeedFromPool(const AliITSUSeed* src=0);
70   AliITSUTrackHyp*       GetTrackHyp(Int_t id)               const  {return (AliITSUTrackHyp*)fHypStore.UncheckedAt(id);}
71   void                   SetTrackHyp(AliITSUTrackHyp* hyp,Int_t id) {fHypStore.AddAtAndExpand(hyp,id);}
72   void                   DeleteLastSeedFromPool()                   {fSeedsPool.RemoveLast();}
73   void                   SaveCurrentTrackHypotheses();
74   void                   FinalizeHypotheses();
75   void                   UpdateESDTrack(AliITSUTrackHyp* hyp);
76  //
77
78  private:
79   
80   AliITSUTrackerGlo(const AliITSUTrackerGlo&);
81   AliITSUTrackerGlo &operator=(const AliITSUTrackerGlo &tr);
82   //
83  protected:
84   AliITSUReconstructor*           fReconstructor;  // ITS global reconstructor 
85   AliITSURecoDet*                 fITS;            // interface to ITS
86   AliESDtrack*                    fCurrESDtrack;   // current esd track in processing
87   Double_t                        fCurrMass;       // current track mass
88   Double_t                        fTrImpData[kNTrImpData];  // data on track impact on the layer
89   //
90   // the seeds management to be optimized
91   TObjArray                       fHypStore;       // storage for tracks hypotheses
92   AliITSUTrackHyp*                fCurrHyp;        // hypotheses container for current track
93   TClonesArray                    fSeedsPool;      // pool for seeds
94   //
95   AliITSUTrackCond                fTrCond;         // tmp, to be moved to recoparam
96   Int_t                           fTrackPhase;     // tracking phase
97   //
98   ClassDef(AliITSUTrackerGlo,1)   //ITS upgrade tracker
99     
100 };
101
102 //_________________________________________________________________________
103 inline void AliITSUTrackerGlo::AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr)
104 {
105   // add new seed prolongation hypothesis 
106   fCurrHyp->AddSeed(seed,lr);
107   printf("*** Adding: "); seed->Print();
108 }
109
110
111 #endif
112