]> 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
14 class AliITSUReconstructor;
15 class AliITSURecoDet;
16 class AliITSUClusterPix;
17 class AliESDtrack;
18
19 class TTree;
20
21
22 //-------------------------------------------------------------------------
23 class AliITSUTrackerGlo : public AliTracker {
24
25   public:
26   enum { // info from track extrapolation to layer for cluster check
27     kTrXIn ,kTrYIn ,kTrZIn ,kTrPhiIn , // entrance (outer) point on the layer from above 
28     kTrXOut,kTrYOut,kTrZOut,kTrPhiOut, // exit (inner) point on the layer
29     kTrPhi0, kTrDPhi, kTrZ0, kTrDZ,     // mean phi,dPhi, mean z, dZ (don't change this order)
30     kNTrImpData};
31   //
32   enum {kMissingCluster=0  // no cluster found on this layer
33         ,kTransportFailed=1  // seed did not reach target layer
34         ,kRWCheckFailed =2  // failed to rotate the seed to frame of the layer impact point
35   };
36   enum {kStopSearchOnSensor,kClusterNotMatching,kClusterMatching}; // flags for track-to-cluster checks
37
38   AliITSUTrackerGlo(AliITSUReconstructor* rec);
39   virtual ~AliITSUTrackerGlo();
40
41   virtual Int_t          Clusters2Tracks(AliESDEvent *event);
42   virtual Int_t          PropagateBack(AliESDEvent *event);
43   virtual Int_t          RefitInward(AliESDEvent *event);
44   virtual Int_t          LoadClusters(TTree * treeRP=0);
45   virtual void           UnloadClusters();
46   virtual AliCluster*    GetCluster(Int_t index) const;
47   //------------------------------------
48   AliITSURecoDet*        GetITSInterface()       const {return fITS;}
49   //
50   //------------------------------------
51   Bool_t                 NeedToProlong(AliESDtrack* estTr);
52   void                   Init(AliITSUReconstructor* rec);
53   void                   FindTrack(AliESDtrack* esdTr);
54   Bool_t                 InitSeed(AliESDtrack *esdTr);
55   Int_t                  GetNSeeds(Int_t lr)              const {return fSeedsLr[lr].GetEntriesFast();} //RS TOCHECK
56   AliITSUSeed*           GetSeed(Int_t lr, Int_t sID)     const {return (AliITSUSeed*)fSeedsLr[lr].UncheckedAt(sID);} //RS TOCHECK
57   Bool_t                 TransportToLayer(AliITSUSeed* seed, Int_t lFrom, Int_t lTo);
58   Bool_t                 NeedToKill(AliITSUSeed* seed, Int_t flag) {return kFALSE;} // todo
59   void                   KillSeed(Int_t ilr, Int_t id) {} // todo
60   Bool_t                 GetRoadWidth(AliITSUSeed* seed, int ilrA);
61   Int_t                  CheckCluster(AliITSUSeed* seed, Int_t lr, Int_t clID);
62   void                   AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr);
63   //
64   AliITSUSeed*           NewSeedFromPool(const AliITSUSeed* src=0);
65   void                   DeleteLastSeedFromPool()               {fSeedsPool.RemoveLast();}
66   void                   ResetSeedTree();  // RS TOCHECK
67   //
68  private:
69   
70   AliITSUTrackerGlo(const AliITSUTrackerGlo&);
71   AliITSUTrackerGlo &operator=(const AliITSUTrackerGlo &tr);
72   //
73  protected:
74   AliITSUReconstructor*           fReconstructor;  // ITS global reconstructor 
75   AliITSURecoDet*                 fITS;            // interface to ITS
76   AliESDtrack*                    fCurrESDtrack;   // current esd track in processing
77   Double_t                        fCurrMass;       // current track mass
78   Double_t                        fTrImpData[kNTrImpData];  // data on track impact on the layer
79   //
80   // the seeds management to be optimized
81   TObjArray*                      fSeedsLr;        // seeds at each layer
82   TClonesArray                    fSeedsPool;      // pool for seeds
83
84   ClassDef(AliITSUTrackerGlo,1)   //ITS upgrade tracker
85     
86 };
87
88 //_________________________________________________________________________
89 inline void AliITSUTrackerGlo::AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr)
90 {
91   // add new seed prolongation hypothesis 
92   fSeedsLr[lr].AddLast(seed);
93   seed->Print("par");
94 }
95
96
97 #endif
98