]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUTrackCond.h
Config for stave model22 layout. Modules are 30mm long in Z (works only
[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 #include <TArrayI.h>
7
8 //------------------------------------------------------------------------------
9 //
10 // This class defines a set of hit patterns (conditions) to consider the track reconstructable
11 // Each condidition (few consequitive elements from fConditions array) is set of bit patterns, 
12 // with each element of condition defining a group of layers which must be present in the tracks.
13 // For instance, if we require the track to have contributions from
14 // {lr0 or lr1 or lr2} AND {lr2 or lr 3 or lr 4} AND {lr5 or lr6} then the condition should
15 // be {BIT(0)|BIT(1)|BIT(2), BIT(2)|BIT(3)|BIT(4), BIT(5)|BIT(6)}.
16 // Additionally, each condition may request min number of hits to be present
17 //
18 // Each AliITSUTrackCond should correspond to single track finding pass and may contain multiple
19 // conditions. To consider the track reconstructable it is enough to satisfy 1 condition
20 //
21 //------------------------------------------------------------------------------
22
23
24 class AliITSUTrackCond : public TObject
25 {
26  public:
27   enum {kCondStart,kNGroups,kMinClus,kNAuxSz};
28   enum {kShiftNcl=24};  // the min_Nclusters for each pattern is stored starting from this bit
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        SetClSharing(Int_t lr, Char_t v=0)   {fClSharing[lr] = v;}
38   void        SetMaxBranches(Int_t lr, Int_t mb)   {fMaxBranches[lr] = mb;}
39   void        SetMaxCandidates(Int_t lr, Int_t nc) {fMaxCandidates[lr] = nc;}
40   void        SetID(Int_t id)                      {SetUniqueID(id);}
41   void        AddNewCondition(Int_t minClusters);
42   void        AddGroupPattern(UShort_t patt,Int_t ncl);
43
44   Int_t       GetID()                                  const {return GetUniqueID();}
45   Int_t       GetMaxBranches(Int_t lr)                 const {return fMaxBranches[lr];}
46   Int_t       GetMaxCandidates(Int_t lr)               const {return fMaxCandidates[lr];}
47   Int_t       GetNConditions()                         const {return fNConditions;}
48   UShort_t    GetGroup(Int_t condID,Int_t grID)        const {return fConditions[fAuxData[condID*kNAuxSz+kCondStart]+grID];}
49   Bool_t      CheckPattern(UShort_t patt)    const;
50   //
51   virtual void  Print(Option_t* option = "")           const;
52
53   void        SetMaxITSTPCMatchChi2(Float_t v)               {fMaxITSTPCMatchChi2 = v;}
54   void        SetMaxITSSAChi2(Int_t ncl, Float_t v)          {if (ncl>0&&ncl<=2*fNLayers) fMaxITSSAChi2[ncl-1] = v;}
55   void        SetMaxTr2ClChi2(Int_t lr, Float_t v)           {fMaxTr2ClChi2[lr] = v;}
56   void        SetMaxChi2GloNrm(Int_t lr, Float_t v)          {fMaxChi2GloNrm[lr] = v;}
57   void        SetMissPenalty(Int_t lr,  Float_t v)           {fMissPenalty[lr] = v;}
58   void        SetNSigmaRoadY(Int_t lr,  Float_t v)           {fNSigmaRoadY[lr] = v;}
59   void        SetNSigmaRoadZ(Int_t lr,  Float_t v)           {fNSigmaRoadZ[lr] = v;}
60   void        ExcludeLayer(Int_t lr)                         {fAllowLayers &= ~(0x1<<lr);}
61   //
62   Float_t     GetMaxITSTPCMatchChi2()                  const {return fMaxITSTPCMatchChi2;}
63   Float_t     GetMaxITSSAChi2(Int_t ncl)               const {return fMaxITSSAChi2[ncl-1];}
64   Char_t      GetClSharing(Int_t lr)                   const {return fClSharing[lr];}
65   Float_t     GetMissPenalty(Int_t lr)                 const {return fMissPenalty[lr];}
66   Float_t     GetMaxTr2ClChi2(Int_t lr)                const {return fMaxTr2ClChi2[lr];}
67   Float_t     GetMaxChi2GloNrm(Int_t lr)               const {return fMaxChi2GloNrm[lr];}
68   Float_t     GetNSigmaRoadY(Int_t lr)                 const {return fNSigmaRoadY[lr];}
69   Float_t     GetNSigmaRoadZ(Int_t lr)                 const {return fNSigmaRoadZ[lr];}
70   Bool_t      IsLayerExcluded(Int_t lr)                const {return !(fAllowLayers&(0x1<<lr));}
71   Int_t       GetActiveLrInner()                       const {return fActiveLrInner;}
72   Int_t       GetActiveLrOuter()                       const {return fActiveLrOuter;}
73   UShort_t    GetAllowedLayers()                       const {return fAllowLayers;}
74   //
75   void        Init();
76   Bool_t      IsInitDone()                             const {return fInitDone;}
77   //
78  protected: 
79   //
80   Bool_t      fInitDone;                 // initialization flag
81   Char_t      fActiveLrInner;            // innermost active layer to consider
82   Char_t      fActiveLrOuter;            // outermose active layer to consider
83   UShort_t    fAllowLayers;              // pattern of active layers to be checked
84   Int_t       fNLayers;                  // total number of layers
85   Float_t     fMaxITSTPCMatchChi2;       // max chi2 for ITS/TPC matching
86   Char_t*     fClSharing;                // [fNLayers] is cluster sharing allowed
87   Short_t*    fMaxBranches;              // [fNLayers] max allowed branches per seed on each layer
88   Short_t*    fMaxCandidates;            // [fNLayers] max allowed candidates per TPC seed on each layer
89   Float_t*    fMaxITSSAChi2;             // [fNLayers] max chi2 for ITS standalone fit (backward) vs N cl
90   Float_t*    fMaxTr2ClChi2;             // [fNLayers] max track-to-cluster chi2
91   Float_t*    fMaxChi2GloNrm;            // [fNLayers] max norm global chi2
92   Float_t*    fMissPenalty;              // [fNLayers] chi2 penalty for missing hit on the layer
93   Float_t*    fNSigmaRoadY;              // [fNLayers] number of sigmas in Y
94   Float_t*    fNSigmaRoadZ;              // [fNLayers] number of sigmas in Z
95   //
96   Short_t     fNConditions;              // number of conditions defined
97   TArrayI     fConditions;               // fNConditions  set of conditions
98   TArrayS     fAuxData;                  // condition beginning (1st group), n groups, min clus
99   //
100   static Char_t  fgkClSharing;            // def cl.sharing allowed level
101   static Int_t   fgkMaxBranches;          // def max number of branches per seed on current layer 
102   static Int_t   fgkMaxCandidates;        // def max number of total candidates on current layer 
103   static Float_t fgkMaxTr2ClChi2;         // def track-to-cluster chi2 cut
104   static Float_t fgkMaxChi2GloNrm;        // def global norm chi2 cut
105   static Float_t fgkMissPenalty;          // penalty for missing cluster
106   static Float_t fgkMaxMatchChi2;         // max acceptable matching chi2
107   static Float_t fgkMaxITSSAChi2;         // max acceptable standalone ITS backward fit chi2
108   //
109   ClassDef(AliITSUTrackCond,9)           // set of requirements on track hits pattern
110 };
111
112
113
114 #endif