]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackHyp.h
Temporary store in the AliESDtrack::fITSSharedMap the bit pattern of eventual wron...
[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   enum {kSkip=BIT(14)};
17   AliITSUTrackHyp(Int_t nlr=0);
18   AliITSUTrackHyp(const AliITSUTrackHyp& src);
19   AliITSUTrackHyp &operator=(const AliITSUTrackHyp &src);
20   virtual ~AliITSUTrackHyp();
21   //
22   void               InitFrom(const AliITSUTrackHyp *src);
23   Int_t              GetNLayers()        const {return fNLayers;}
24   Int_t              GetNSeeds(Int_t lr) const {return fLayerSeeds[lr].GetEntriesFast();}
25   AliITSUSeed*       GetSeed(Int_t lr, Int_t id) const {return (AliITSUSeed*)fLayerSeeds[lr].UncheckedAt(id);}
26   AliITSUSeed*       RemoveSeed(Int_t lr, Int_t id) const {return (AliITSUSeed*)fLayerSeeds[lr].RemoveAt(id);}
27   AliITSUSeed*       GetWinner()         const;
28   AliESDtrack*       GetESDTrack()       const {return fESDTrack;}
29   Int_t              GetITSLabel()       const {return fITSLabel;}
30   AliITSUSeed*       DefineWinner(Int_t lr=0, Int_t id=0);
31   void               SetWinner(AliITSUSeed* w) {fWinner = w;}
32   const TObjArray*   GetLayerSeeds(Int_t lr) const {return lr<fNLayers ? &fLayerSeeds[lr] : 0;}
33   void               AddSeed(AliITSUSeed* seed, Int_t lr);
34   void               SetESDTrack(AliESDtrack* esdtr) {fESDTrack = esdtr;}
35   void               SetITSLabel(Int_t lb)    {fITSLabel=lb;}
36   Int_t              FetchClusterInfo(Int_t* clIDarr) const;
37   //
38   void               SetChi2(Double_t chi2) {fChi2 = chi2;}
39   Double_t           Update(const AliCluster* c);
40   AliExternalTrackParam* GetTPCSeed() const {return fTPCSeed;}
41   void               SetTPCSeed(AliExternalTrackParam* seed) {fTPCSeed = seed;}
42   //
43   virtual Double_t   GetPredictedChi2(const AliCluster *c) const;
44   virtual Bool_t     PropagateTo(Double_t xr, Double_t x0, Double_t rho);
45   virtual Bool_t     Update(const AliCluster* c, Double_t chi2, Int_t index);
46   virtual Int_t      GetNumberOfClusters()   const;
47   virtual Int_t      GetClusterIndex(Int_t ind)  const;
48   //  virtual Int_t      GetTrackletIndex(Int_t) const { return -1;}
49   virtual Double_t   GetPIDsignal()          const { return 0;}
50   //
51   virtual void       Print(Option_t* option = "") const;
52   //
53   Bool_t             GetSkip()               const {return TestBit(kSkip);}
54   void               SetSkip(Bool_t v=kTRUE)       {SetBit(kSkip,v);}
55   //
56  protected:
57   UChar_t          fNLayers;               // number of layers
58   Int_t            fITSLabel;              // ITS MC Label, the global one (wrt TPC) is fLab
59   AliESDtrack*     fESDTrack;              // reference esd track
60   AliITSUSeed*     fWinner;                // winner seed
61   AliExternalTrackParam* fTPCSeed;         // kinematics of TPC track at outer radius
62   TObjArray*       fLayerSeeds;            // seeds of given layer
63   //
64   ClassDef(AliITSUTrackHyp,1)
65 };
66
67 //___________________________________________________________________
68 inline void AliITSUTrackHyp::AddSeed(AliITSUSeed* seed, Int_t lr) 
69 {
70   // add seed to hypothesis
71   fLayerSeeds[lr].AddLast(seed);
72   AliITSUSeed* par = (AliITSUSeed*)seed->GetParent();
73   if (par) par->IncChildren();
74 }
75
76 #endif