]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDseed.h
Add a protection
[u/mrichter/AliRoot.git] / TRD / AliTRDseed.h
1 #ifndef ALITRDSEED_H
2 #define ALITRDSEED_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */ 
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  The TRD track seed                                                    //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #include "TObject.h" 
15
16 class AliTRDcluster;
17
18 class AliTRDseed : public TObject {
19 public:
20         enum {
21     knTimebins = 70 // maximum number of clusters/tracklet
22     ,kNtb = 35       // maximum clusters/pad row
23   };
24
25   AliTRDseed(); 
26   AliTRDseed(const AliTRDseed &s);
27   virtual ~AliTRDseed() {};
28
29   AliTRDseed      &operator=(const AliTRDseed &s)           { *(new(this) AliTRDseed(s)); 
30                                                               return *this;          }
31
32   static  Float_t  FitRiemanTilt(AliTRDseed *seed, Bool_t error);
33           void     UseClusters();
34           void     Update();
35           void     CookLabels();
36           void     UpdateUsed();
37           void     Reset();
38
39           Bool_t   IsOK() const                             { return fN2 > 4;        }
40           Bool_t   IsUsable(Int_t i) const                  { return fUsable[i];     }
41  
42           Float_t  GetTilt() const                          { return fTilt;          }
43           Float_t  GetPadLength() const                     { return fPadLength;     }
44           Float_t  GetX0() const                            { return fX0;            }
45           Float_t  GetY0() const                            { return fYfit[0];       }
46           Float_t  GetZ0() const                            { return fZfit[0];       }
47           Float_t  GetX(Int_t i) const                      { return fX[i];          }
48           Float_t  GetY(Int_t i) const                      { return fY[i];          }
49           Float_t  GetZ(Int_t i) const                      { return fZ[i];          }
50           Int_t    GetIndexes(Int_t i) const                { return fIndexes[i];    }
51   AliTRDcluster   *GetClusters(Int_t i) const               { return fClusters[i];   }
52           Float_t  GetYref(Int_t i) const                   { return fYref[i];       }
53           Float_t  GetZref(Int_t i) const                   { return fZref[i];       }
54           Float_t  GetYfit(Int_t i) const                   { return fYfit[i];       }
55           Float_t  GetYfitR(Int_t i) const                  { return fYfitR[i];      }
56           Float_t  GetZfit(Int_t i) const                   { return fZfit[i];       }
57           Float_t  GetZfitR(Int_t i) const                  { return fZfitR[i];      }
58           Float_t  GetSigmaY() const                        { return fSigmaY;        }
59           Float_t  GetSigmaY2() const                       { return fSigmaY2;       }
60           Float_t  GetMeanz() const                         { return fMeanz;         }
61           Float_t  GetZProb() const                         { return fZProb;         }
62           Int_t    GetLabels(Int_t i) const                 { return fLabels[i];     }
63                 Float_t  GetMPads() const                         { return fMPads;         }
64                 Int_t    GetNbClusters() const                    { return fN;             }
65           Int_t    GetN2() const                            { return fN2;            }
66           Int_t    GetNChange() const                       { return fNChange;       }
67           Int_t    GetNUsed() const                         { return fNUsed;         }
68           Int_t    GetFreq() const                          { return fFreq;          }
69           Float_t  GetC() const                             { return fC;             }
70           Float_t  GetCC() const                            { return fCC;            }
71           Float_t  GetChi2() const                          { return fChi2;          }
72           Float_t  GetChi2Z() const                         { return fChi2Z;         }
73
74                                 
75           void     SetTilt(Float_t tilt)                    { fTilt        = tilt;   }
76           void     SetPadLength(Float_t len)                { fPadLength   = len;    }
77           void     SetX0(Float_t x0)                        { fX0          = x0;     }
78           void     SetX(Int_t i, Float_t x)                 { fX[i]        = x;      } 
79           void     SetY(Int_t i, Float_t y)                 { fY[i]        = y;      }
80           void     SetZ(Int_t i, Float_t z)                 { fZ[i]        = z;      }
81           void     SetIndexes(Int_t i, Int_t idx)           { fIndexes[i]  = idx;    }
82           void     SetClusters(Int_t i, AliTRDcluster * const c)   { fClusters[i] = c;      }
83           void     SetUsable(Int_t i, Bool_t usable)        { fUsable[i]   = usable; }
84           void     SetYref(Int_t i, Float_t yref)           { fYref[i]     = yref;   }
85           void     SetZref(Int_t i, Float_t zref)           { fZref[i]     = zref;   }
86           void     SetYfit(Int_t i, Float_t yfit)           { fYfit[i]     = yfit;   }
87           void     SetYfitR(Int_t i, Float_t yfitr)         { fYfitR[i]    = yfitr;  }
88           void     SetZfit(Int_t i, Float_t zfit)           { fZfit[i]     = zfit;   }
89           void     SetZfitR(Int_t i, Float_t zfitr)         { fZfitR[i]    = zfitr;  }
90           void     SetSigmaY(Float_t sigmay)                { fSigmaY      = sigmay; }
91           void     SetSigmaY2(Float_t sigmay)               { fSigmaY2     = sigmay; }
92           void     SetMeanz(Float_t meanz)                  { fMeanz       = meanz;  }
93           void     SetZProb(Float_t zprob)                  { fZProb       = zprob;  }
94           void     SetLabels(Int_t i, Int_t label)          { fLabels[i]   = label;  }
95           void     SetMPads(Float_t mPads)                  { fMPads       = mPads;  }
96           void     SetN(Int_t n)                            { fN           = n;      }
97           void     SetNChange(Int_t n)                      { fNChange     = n;      }
98           void     SetN2(Int_t n2)                          { fN2          = n2;     }
99           void     SetNUsed(Int_t nused)                    { fNUsed       = nused;  }
100           void     SetFreq(Int_t freq)                      { fFreq        = freq;   }
101           void     SetC(Float_t c)                          { fC           = c;      }
102           void     SetCC(Float_t cc)                        { fCC          = cc;     }
103           void     SetChi2(Float_t chi2)                    { fChi2        = chi2;   }
104           void     SetChi2Z(Float_t chi2z)                  { fChi2Z       = chi2z;  }
105
106  protected:
107
108           void     Copy(TObject &o) const;
109           
110           Float_t        fTilt;                 //  Tilting angle
111           Float_t        fPadLength;            //  Pad length
112           Float_t        fX0;                   //  X0 position
113           Float_t        fX[knTimebins];        //! X position
114           Float_t        fY[knTimebins];        //! Y position
115           Float_t        fZ[knTimebins];        //! Z position
116           Int_t          fIndexes[knTimebins];  //! Indexes
117           AliTRDcluster *fClusters[knTimebins]; // Clusters
118           Bool_t         fUsable[knTimebins];   //  Indication  - usable cluster
119           Float_t        fYref[2];              //  Reference y
120           Float_t        fZref[2];              //  Reference z
121           Float_t        fYfit[2];              //  Y fit position +derivation
122           Float_t        fYfitR[2];             //  Y fit position +derivation
123           Float_t        fZfit[2];              //  Z fit position
124           Float_t        fZfitR[2];             //  Z fit position
125           Float_t        fSigmaY;               //  "Robust" sigma in Y - constant fit
126           Float_t        fSigmaY2;              //  "Robust" sigma in Y - line fit
127           Float_t        fMeanz;                //  Mean vaue of z
128           Float_t        fZProb;                //  Max probbable z
129           Int_t          fLabels[2];            //  Labels
130           Int_t          fN;                    //  Number of associated clusters
131           Int_t          fN2;                   //  Number of not crossed
132           Int_t          fNUsed;                //  Number of used clusters
133           Int_t          fFreq;                 //  Frequency
134           Int_t          fNChange;              //  Change z counter
135           Float_t        fMPads;                //  Mean number of pads per cluster
136
137           Float_t        fC;                    //  Curvature
138           Float_t        fCC;                   //  Curvature with constrain
139           Float_t        fChi2;                 //  Global chi2
140           Float_t        fChi2Z;                //  Global chi2
141
142   ClassDef(AliTRDseed,1)                        //  Seed for a local TRD track
143
144 };
145
146 #endif