]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackHyp.h
ffeb2d008ca52d1271b3ef03ba23c6e17cb23fde
[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 "AliITSUSeed.h"
7
8
9 // Container for track hypotheses
10
11 class AliITSUTrackHyp: public TObject
12 {
13  public:
14   AliITSUTrackHyp(Int_t nlr=0);
15   AliITSUTrackHyp(const AliITSUTrackHyp& src);
16   AliITSUTrackHyp &operator=(const AliITSUTrackHyp &src);
17   virtual ~AliITSUTrackHyp();
18   //
19   Int_t              GetNLayers()        const {return fNLayers;}
20   Int_t              GetNSeeds(Int_t lr) const {return lr<fNLayers ? fLayerSeeds[lr].GetEntriesFast() : 1;}
21   AliITSUSeed*       GetSeed(Int_t lr, Int_t id) const;
22   AliITSUSeed*       GetESDSeed()        const {return fESDSeed;}
23   const TObjArray*   GetLayerSeeds(Int_t lr) const {return lr<fNLayers ? &fLayerSeeds[lr] : 0;}
24   void               AddSeed(AliITSUSeed* seed, Int_t lr);
25   void               SetESDSeed(AliITSUSeed* seed) {fESDSeed = seed;}
26   //
27   
28   //
29   virtual void       Print(Option_t* option = "") const;
30   //
31  protected:
32   UChar_t          fNLayers;               // number of layers
33   AliITSUSeed*     fESDSeed;               // bare esd (TPC) seed
34   TObjArray*       fLayerSeeds;            // seeds of given layer
35   //
36   ClassDef(AliITSUTrackHyp,1)
37 };
38
39 //___________________________________________________________________
40 inline AliITSUSeed* AliITSUTrackHyp::GetSeed(Int_t lr, Int_t id) const
41 {
42   //return requested seed of given layer, no check is done on seed index
43   return lr<fNLayers ? (AliITSUSeed*)fLayerSeeds[lr].UncheckedAt(id) : fESDSeed;
44 }
45
46 //___________________________________________________________________
47 inline void AliITSUTrackHyp::AddSeed(AliITSUSeed* seed, Int_t lr)
48 {
49   //return requested seed of given layer, no check is done
50   if (lr<fNLayers) fLayerSeeds[lr].AddLast(seed);
51   else             fESDSeed = seed;
52 }
53
54 #endif