]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCTrackHitsV2.h
Set the branch address only once
[u/mrichter/AliRoot.git] / TPC / AliTPCTrackHitsV2.h
1 #ifndef ALITPCTRACKHITSV2_H
2 #define ALITPCTRACKHITSV2_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 //  Manager class for TPC   hits                   //
9 ////////////////////////////////////////////////
10 //
11
12 #include "TObject.h"
13
14 class TClonesArray;
15 class AliArrayS;
16 class AliTPChit;
17 class AliTPCTempHitInfoV2;
18 class AliTPCCurrentHitV2;
19 class AliHit;
20
21 class AliTrackHitsParamV2 : public TObject {
22   friend class   AliTPC;
23   friend class   AliTRD;
24   friend class   AliTPCTrackHitsV2;
25   friend class   AliTPCTempHitInfoV2;
26   friend class   AliTRDtrackHits;
27
28 public:
29   
30   AliTrackHitsParamV2();
31   ~AliTrackHitsParamV2();
32  private:
33   Int_t fTrackID; // ID of the track
34   Short_t fVolumeID;// volume ID
35   Float_t fR;  //radius
36   Float_t fZ;  //z position
37   Float_t fFi; //radial angle
38   Float_t fAn; //angle with  the radial vector
39   Float_t fAd; //derivation of angle
40   Float_t fTheta; //theta angle
41   Float_t fThetaD; //theta angle derivation
42   Int_t   fNHits; //nuber of thits
43   Short_t * fHitDistance; //[fNHits] array of hits distances
44   Short_t * fCharge; //[fNHits] array of charges
45   static Int_t fgCounter1;
46   static Int_t fgCounter2;  
47   ClassDef(AliTrackHitsParamV2,1)  
48 };
49
50
51
52 class AliTPCTrackHitsV2 : public TObject {
53   friend class AliTPCTempHitInfoV2;
54 public:
55   AliTPCTrackHitsV2(); 
56   ~AliTPCTrackHitsV2();
57   void Clear();
58   void AddHitKartez(Int_t volumeID, Int_t trackID, Double_t x, 
59                     Double_t y, Double_t z,Int_t q);
60   void AddHit(Int_t volumeID, Int_t trackID, Double_t r, 
61               Double_t z, Double_t fi,Int_t q);
62  
63   Bool_t First(); //set current hit to first hit 
64   Bool_t Next();  //set current hit to next
65   AliHit * GetHit();
66   AliTrackHitsParamV2 * GetParam();
67
68   TClonesArray * GetArray(){return fArray;}
69   Int_t  GetEntriesFast() { return fSize;}
70   void SetHitPrecision(Double_t prec) {fPrecision=prec;}
71   void SetStepPrecision(Double_t prec) {fStep=prec;}
72   void SetMaxDistance(UInt_t distance) {fMaxDistance = distance;}
73   Bool_t  FlushHitStack(Bool_t force=kTRUE);    //
74   Int_t *  GetVolumes(){ return fVolumes;}
75   Int_t GetNVolumes(){return fNVolumes;}
76 public:
77   void AddVolume(Int_t volume); //add volumes to tthe list of volumes
78   void FlushHitStack2(Int_t index1, Int_t index2);   //
79  protected:
80   TClonesArray * fArray;  //array of compressed hits
81   Int_t fSize;            //total number of hits in track
82   Double_t fPrecision;  // required precision
83   Double_t fStep;       //unit step size
84   UInt_t fMaxDistance;   //maximal distance between two connected hits 
85   Int_t fNVolumes;      //number of volumes in track  
86   Int_t *  fVolumes;    //[fNVolumes] list of volumes
87   AliTPCTempHitInfoV2 * fTempInfo; //!information about track
88   AliTPCCurrentHitV2  * fCurrentHit; //!information about current hit 
89   AliHit * fHit;                     //! current hit information
90   static const Double_t fgkPrecision;  //precision 
91   static const Double_t fgkPrecision2;  //precision
92   static Int_t fgCounter1;
93   static Int_t fgCounter2;  
94   ClassDef(AliTPCTrackHitsV2,1) 
95 };
96
97 struct AliTPCCurrentHitV2 {
98   Int_t   fParamIndex;//  - current param pointer
99   Int_t   fStackIndex; // - current hit stack index
100   Double_t fR;   //current Radius
101   Bool_t  fStatus; //current status    
102 };   
103
104
105
106 #endif //ALITPCTRACKHITSV2_H