GetClusterFast function implemented (No getter before) (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCTrackHits.h
CommitLineData
cf98c13f 1#ifndef ALITPCTRACKHITS_H
2#define ALITPCTRACKHITS_H
b6895dd8 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
2289aadd 6/* $Id$ */
cf98c13f 7////////////////////////////////////////////////
8// Manager class for TPC clusters //
9////////////////////////////////////////////////
10
6d171107 11class TClonesArray;
12
cf98c13f 13#include "AliCTypes.h"
cf98c13f 14#include "TArrayOfArray.h"
15
cf98c13f 16class AliTPChit;
17class AliTPCTempHitInfo;
18class AliTPCCurrentHit;
835b3d81 19class AliObjectArray;
cf98c13f 20
835b3d81 21class AliTrackHitsInfo {
22 friend class AliTPCTrackHits;
23 friend class AliTPC;
783ce8a7 24
982aff31 25 public:
783ce8a7 26 AliTrackHitsInfo();
cf98c13f 27 ~AliTrackHitsInfo(){fgCounter1--;}
783ce8a7 28
29private:
cf98c13f 30 Int_t fTrackID; //track ID
31 Int_t fVolumeID; //volume ID
32 UInt_t fHitParamIndex; //corresponding index
835b3d81 33 static Int_t fgCounter1; //counter
34 static Int_t fgCounter2; //counter
35
cf98c13f 36 LClassDef(AliTrackHitsInfo,1)
37};
38
39
40class AliTrackHitsParam {
835b3d81 41 friend class AliTPCTrackHits;
6d171107 42 friend class AliTPCTempHitInfo;
982aff31 43 public:
783ce8a7 44 AliTrackHitsParam();
cf98c13f 45 ~AliTrackHitsParam(){fgCounter1--;}
835b3d81 46 private:
cf98c13f 47 Float_t fR; //radius
48 Float_t fZ; //z position
49 Float_t fFi; //radial angle
50 Float_t fAn; //angle with the radial vector
51 Float_t fAd; //derivation of angle
52 Float_t fTheta; //theta angle
53 Float_t fThetaD; //theta angle derivation
835b3d81 54 static Int_t fgCounter1; //counter
55 static Int_t fgCounter2; //counter
56
cf98c13f 57 LClassDef(AliTrackHitsParam,1)
58};
59
60
61class AliHitInfo {
835b3d81 62 friend class AliTPCTrackHits;
6d171107 63 friend class AliTPCTempHitInfo;
cf98c13f 64public:
783ce8a7 65 AliHitInfo() : fHitDistance(0), fCharge(0) {fgCounter1++;fgCounter2++;}
cf98c13f 66 ~AliHitInfo(){fgCounter1--;}
835b3d81 67 private:
cf98c13f 68 Short_t fHitDistance; //distance to previous hit
69 Short_t fCharge; //deponed charge
e61fd20d 70 Short_t fTime; //hit time
835b3d81 71 static Int_t fgCounter1; //counter
72 static Int_t fgCounter2; //counter
73
e61fd20d 74 LClassDef(AliHitInfo,2)
cf98c13f 75};
76
77
78
79class AliTPCTrackHits : public TObject{
835b3d81 80 friend class AliTPC;
6d171107 81 friend class AliTPCTempHitInfo;
cf98c13f 82public:
83 AliTPCTrackHits();
84 ~AliTPCTrackHits();
e15899a0 85 AliTPCTrackHits(const AliTPCTrackHits& r);
86 AliTPCTrackHits & operator=(const AliTPCTrackHits& r);
87
cf98c13f 88 void Clear();
89 void AddHitKartez(Int_t volumeID, Int_t trackID, Double_t x,
e61fd20d 90 Double_t y, Double_t z,Int_t q, Float_t time);
cf98c13f 91 void AddHit(Int_t volumeID, Int_t trackID, Double_t r,
e61fd20d 92 Double_t z, Double_t fi,Int_t q,Float_t time);
cf98c13f 93
94 Bool_t First(); //set current hit to first hit
25419831 95 Bool_t Next(Int_t id = -1); //set current hit to next
835b3d81 96 AliTPChit * GetHit() const;
cf98c13f 97 AliTrackHitsParam * GetParam();
98 AliHitInfo * GetHitInfo();
99 Int_t GetEntriesFast() { return fHitsPosAndQ ? fHitsPosAndQ->ArraySize():0;}
100 void SetHitPrecision(Double_t prec) {fPrecision=prec;}
101 void SetStepPrecision(Double_t prec) {fStep=prec;}
102 void SetMaxDistance(UInt_t distance) {fMaxDistance = distance;}
103 Bool_t FlushHitStack(Bool_t force=kTRUE); //
835b3d81 104private:
cf98c13f 105 void FlushHitStack2(Int_t index1, Int_t index2); //
106 AliObjectArray * fTrackHitsInfo; //quick information about track
107 AliObjectArray * fTrackHitsParam; //hit information
633d3715 108 TArrayOfArrayVStack * fHitsPosAndQ; //position information
cf98c13f 109
110 Double_t fPrecision; // required precision
111 Double_t fStep; //unit step size
112 UInt_t fMaxDistance; //maximal distance between two connected hits
113 AliTPCTempHitInfo * fTempInfo; //!information about track
114 AliTPCCurrentHit * fCurrentHit; //!information about current hit
115 static const Double_t fgkPrecision; //precision
116 static const Double_t fgkPrecision2; //precision
e61fd20d 117 static const Double_t fgkTimePrecision; //hit time precision
982aff31 118 static Int_t fgCounter1; // counter1
119 static Int_t fgCounter2; // counter2
835b3d81 120
e61fd20d 121 ClassDef(AliTPCTrackHits,2)
cf98c13f 122};
123
124
125#endif //ALITPCTRACKHITS_H