1) coverity fix
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackerGlo.h
CommitLineData
32d38de2 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"
f8832015 12#include "AliITSUSeed.h"
c8d1f258 13#include "AliITSUTrackCond.h"
32d38de2 14
15class AliITSUReconstructor;
16class AliITSURecoDet;
c61e50c3 17class AliITSUClusterPix;
0091e9f0 18class AliESDtrack;
c61e50c3 19
32d38de2 20class TTree;
21
c61e50c3 22
32d38de2 23//-------------------------------------------------------------------------
24class 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)
c61e50c3 31 kNTrImpData};
32d38de2 32 //
f8832015 33 enum {kMissingCluster=0 // no cluster found on this layer
34 ,kTransportFailed=1 // seed did not reach target layer
32d38de2 35 ,kRWCheckFailed =2 // failed to rotate the seed to frame of the layer impact point
36 };
f8832015 37 enum {kStopSearchOnSensor,kClusterNotMatching,kClusterMatching}; // flags for track-to-cluster checks
32d38de2 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;
0091e9f0 48 //------------------------------------
49 AliITSURecoDet* GetITSInterface() const {return fITS;}
50 //
32d38de2 51 //------------------------------------
52 Bool_t NeedToProlong(AliESDtrack* estTr);
53 void Init(AliITSUReconstructor* rec);
54 void FindTrack(AliESDtrack* esdTr);
55 Bool_t InitSeed(AliESDtrack *esdTr);
c61e50c3 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
32d38de2 58 Bool_t TransportToLayer(AliITSUSeed* seed, Int_t lFrom, Int_t lTo);
c8d1f258 59 Bool_t NeedToKill(AliITSUSeed* seed, Int_t flag);
c61e50c3 60 Bool_t GetRoadWidth(AliITSUSeed* seed, int ilrA);
f8832015 61 Int_t CheckCluster(AliITSUSeed* seed, Int_t lr, Int_t clID);
62 void AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr);
c61e50c3 63 //
64 AliITSUSeed* NewSeedFromPool(const AliITSUSeed* src=0);
65 void DeleteLastSeedFromPool() {fSeedsPool.RemoveLast();}
66 void ResetSeedTree(); // RS TOCHECK
32d38de2 67 //
32d38de2 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
0091e9f0 76 AliESDtrack* fCurrESDtrack; // current esd track in processing
32d38de2 77 Double_t fCurrMass; // current track mass
c61e50c3 78 Double_t fTrImpData[kNTrImpData]; // data on track impact on the layer
32d38de2 79 //
c61e50c3 80 // the seeds management to be optimized
81 TObjArray* fSeedsLr; // seeds at each layer
32d38de2 82 TClonesArray fSeedsPool; // pool for seeds
c8d1f258 83 //
84 AliITSUTrackCond fTrCond; // tmp, to be moved to recoparam
85 //
32d38de2 86 ClassDef(AliITSUTrackerGlo,1) //ITS upgrade tracker
87
88};
f8832015 89
90//_________________________________________________________________________
91inline void AliITSUTrackerGlo::AddProlongationHypothesis(AliITSUSeed* seed, Int_t lr)
92{
93 // add new seed prolongation hypothesis
94 fSeedsLr[lr].AddLast(seed);
c8d1f258 95 printf("*** Adding: "); seed->Print();
f8832015 96}
97
98
32d38de2 99#endif
100