]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliStrLine.h
incresed the LOG_BUFFER_SIZE from 100 to 512 bytes
[u/mrichter/AliRoot.git] / STEER / AliStrLine.h
1 #ifndef ALISTRLINE_H
2 #define ALISTRLINE_H
3 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 ///////////////////////////////////////////////////////////////////
7 //                                                               //
8 // A straight line is coded as a point (3 Double_t) and           //
9 // 3 direction cosines                                           //
10 //                                                               //
11 ///////////////////////////////////////////////////////////////////
12
13
14 class AliStrLine : public TObject {
15
16  public:
17     AliStrLine();        // default constructor
18     AliStrLine(Double_t *point, Double_t *cd, Bool_t twopoints=kFALSE);  // standard constructor
19     AliStrLine(Float_t *pointf, Float_t *cdf, Bool_t twopoints=kFALSE); 
20     virtual ~AliStrLine(); // destructor
21     void PrintStatus() const;
22     void SetP0(Double_t *point) {for(Int_t i=0;i<3;i++)fP0[i]=point[i];}
23     void SetCd(Double_t *cd) {for(Int_t i=0;i<3;i++)fCd[i]=cd[i];}
24     void SetDebug(Int_t dbfl = 0){fDebug = dbfl; }  
25     void GetP0(Double_t *point) const {for(Int_t i=0;i<3;i++)point[i]=fP0[i];}
26     void GetCd(Double_t *cd) const {for(Int_t i=0;i<3;i++)cd[i]=fCd[i];}
27     void GetCurrentPoint(Double_t *point) const;
28     Int_t IsParallelTo(AliStrLine *line) const;
29     Int_t Crossrphi(AliStrLine *line);
30     Int_t CrossPoints(AliStrLine *line, Double_t *point1, Double_t *point2);
31     Int_t Cross(AliStrLine *line, Double_t *point);
32     Double_t GetDCA(AliStrLine *line) const;
33     Double_t GetDistFromPoint(Double_t *point) const;
34  protected:
35     void InitDirection(Double_t *point, Double_t *cd);
36     void InitTwoPoints(Double_t *pA, Double_t *pB);
37     Double_t fP0[3];           // given point
38     Double_t fCd[3];           // direction cosines
39     Double_t fTpar;            //! parameter 
40     Int_t   fDebug;           //! debug flag - verbose printing if >0
41  private:
42     void SetPar(Double_t par){fTpar = par;}
43
44   ClassDef(AliStrLine,1);
45 };
46
47 #endif