]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackCond.h
Tracking conditions may introduce limits on seed splitting and total number of
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUTrackCond.h
1 #ifndef ALIITSUTRACKCOND_H
2 #define ALIITSUTRACKCOND_H
3
4 #include <TObject.h>
5 #include <TArrayS.h>
6
7 //------------------------------------------------------------------------------
8 //
9 // This class defines a set of hit patterns (conditions) to consider the track reconstructable
10 // Each condidition (few consequitive elements from fConditions array) is set of bit patterns, 
11 // with each element of condition defining a group of layers which must be present in the tracks.
12 // For instance, if we require the track to have contributions from
13 // {lr0 or lr1 or lr2} AND {lr2 or lr 3 or lr 4} AND {lr5 or lr6} then the condition should
14 // be {BIT(0)|BIT(1)|BIT(2), BIT(2)|BIT(3)|BIT(4), BIT(5)|BIT(6)}.
15 // Additionally, each condition may request min number of hits to be present
16 //
17 // Each AliITSUTrackCond should correspond to single track finding pass and may contain multiple
18 // conditions. To consider the track reconstructable it is enough to satisfy 1 condition
19 //
20 //------------------------------------------------------------------------------
21
22
23 class AliITSUTrackCond : public TObject
24 {
25  public:
26   enum {kCondStart,kNGroups,kMinClus,kNAuxSz};
27   enum {kMaxBranches=50,kMaxCandidates=500};     // max number of branches one can create for single seed on any layer (except branch w/o cl. attached)
28   
29
30   AliITSUTrackCond(Int_t nLayers=0);
31   AliITSUTrackCond(const AliITSUTrackCond& src);
32   AliITSUTrackCond &operator=(const AliITSUTrackCond& src);
33
34   ~AliITSUTrackCond() {}
35   
36   void        SetNLayers(Int_t nl);
37   void        SetMaxBranches(Int_t lr, Int_t mb)   {fMaxBranches[lr] = mb;}
38   void        SetMaxCandidates(Int_t lr, Int_t nc) {fMaxCandidates[lr] = nc;}
39   void        SetID(Int_t id)                      {SetUniqueID(id);}
40   void        AddNewCondition(Int_t minClusters);
41   void        AddGroupPattern(UShort_t patt);
42
43   Int_t       GetID()                                  const {return GetUniqueID();}
44   Int_t       GetMaxBranches(Int_t lr)                 const {return fMaxBranches[lr];}
45   Int_t       GetMaxCandidates(Int_t lr)               const {return fMaxCandidates[lr];}
46   Int_t       GetNConditions()                         const {return fNConditions;}
47   UShort_t    GetGroup(Int_t condID,Int_t grID)        const {return fConditions[fAuxData[condID*kNAuxSz+kCondStart]+grID];}
48   Bool_t      CheckPattern(UShort_t patt)    const;
49   //
50   virtual void  Print(Option_t* option = "")           const;
51
52  protected:
53   //
54   Int_t       fNLayers;                  // total number of layers
55   Short_t*    fMaxBranches;              // [fNLayers] max allowed branches per seed on each layer
56   Short_t*    fMaxCandidates;            // [fNLayers] max allowed candidates per TPC seed on each layer
57   Short_t     fNConditions;              // number of conditions defined
58   TArrayS     fConditions;               // fNConditions  set of conditions
59   TArrayS     fAuxData;                  // condition beginning (1st group), n groups, min clus
60   //
61   ClassDef(AliITSUTrackCond,2)           // set of requirements on track hits pattern
62 };
63
64
65
66 #endif