]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackHyp.h
01eb07504305119df17e920c96d36e8de25c3370
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackHyp.h
1 #ifndef ALIITSUTRACKHYP_H
2 #define ALIITSUTRACKHYP_H
3
4 #include <TObject.h>
5 #include <TObjArray.h>
6 #include "AliKalmanTrack.h"
7 #include "AliITSUSeed.h"
8 class AliESDtrack;
9 class AliCluster;
10
11 // Container for track hypotheses
12
13 class AliITSUTrackHyp: public AliKalmanTrack
14 {
15  public:
16   AliITSUTrackHyp(Int_t nlr=0);
17   AliITSUTrackHyp(const AliITSUTrackHyp& src);
18   AliITSUTrackHyp &operator=(const AliITSUTrackHyp &src);
19   virtual ~AliITSUTrackHyp();
20   //
21   Int_t              GetNLayers()        const {return fNLayers;}
22   Int_t              GetNSeeds(Int_t lr) const {return fLayerSeeds[lr].GetEntriesFast();}
23   AliITSUSeed*       GetSeed(Int_t lr, Int_t id) const {return (AliITSUSeed*)fLayerSeeds[lr].UncheckedAt(id);}
24   AliITSUSeed*       GetWinner()         const;
25   AliESDtrack*       GetESDTrack()       const {return fESDTrack;}
26   Int_t              GetITSLabel()       const {return fITSLabel;}
27   void               DefineWinner(Int_t lr=0, Int_t id=0);
28   const TObjArray*   GetLayerSeeds(Int_t lr) const {return lr<fNLayers ? &fLayerSeeds[lr] : 0;}
29   void               AddSeed(AliITSUSeed* seed, Int_t lr);
30   void               SetESDTrack(AliESDtrack* esdtr) {fESDTrack = esdtr;}
31   void               SetITSLabel(Int_t lb)    {fITSLabel=lb;}
32   Int_t              FetchClusterInfo(Int_t* clIDarr) const;
33   //
34   void               SetChi2(Double_t chi2) {fChi2 = chi2;}
35   Bool_t             Update(const AliCluster* c);
36   //
37   virtual Double_t   GetPredictedChi2(const AliCluster *c) const;
38   virtual Bool_t     PropagateTo(Double_t xr, Double_t x0, Double_t rho);
39   virtual Bool_t     Update(const AliCluster* c, Double_t chi2, Int_t index);
40   virtual Int_t      GetClusterIndex(Int_t)  const { return -1;}
41   virtual Int_t      GetNumberOfTracklets()  const { return 0;}
42   virtual Int_t      GetTrackletIndex(Int_t) const { return -1;}
43   virtual Double_t   GetPIDsignal()          const { return 0;}
44   //
45   virtual void       Print(Option_t* option = "") const;
46   //
47  protected:
48   UChar_t          fNLayers;               // number of layers
49   Int_t            fITSLabel;              // ITS MC Label, the global one (wrt TPC) is fLab
50   AliESDtrack*     fESDTrack;              // reference esd track
51   TObjArray*       fLayerSeeds;            // seeds of given layer
52   //
53   ClassDef(AliITSUTrackHyp,1)
54 };
55
56 //___________________________________________________________________
57 inline void AliITSUTrackHyp::AddSeed(AliITSUSeed* seed, Int_t lr) 
58 {
59   // add seed to hypothesis
60   fLayerSeeds[lr].AddLast(seed);
61   AliITSUSeed* par = (AliITSUSeed*)seed->GetParent();
62   if (par) par->IncChildren();
63 }
64
65 #endif