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