]>
Commit | Line | Data |
---|---|---|
eb38ed55 | 1 | #ifndef ALITRDCHAMBERTIMEBIN_H |
2 | #define ALITRDCHAMBERTIMEBIN_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3a039a31 | 5 | * See cxx source for full Copyright notice */ |
eb38ed55 | 6 | |
7 | /* $Id: AliTRDchamberTimeBin.h 22646 2007-11-29 18:13:40Z cblume $ */ | |
8 | ||
9 | //////////////////////////////////////////////////////////////////////////// | |
10 | // // | |
11 | // A TRD layer in a single stack // | |
12 | // // | |
13 | //////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | #include "TObject.h" | |
17 | #endif | |
18 | ||
19 | #ifndef ALITRDCLUSTER_H | |
20 | #include "AliTRDcluster.h" | |
21 | #endif | |
22 | ||
3a039a31 | 23 | class AliTRDReconstructor; |
eb38ed55 | 24 | class AliTRDchamberTimeBin : public TObject |
25 | { | |
26 | public: | |
ac1dec3b | 27 | enum AliTRDchamberTimeBinStatus { |
28 | kT0 = BIT(14) // is the T0 time bin | |
29 | ,kOwner = BIT(15) // is owner of the clusters | |
30 | }; | |
3a039a31 | 31 | enum{ |
ac1dec3b | 32 | kMaxClustersLayer = 150 |
3a039a31 | 33 | ,kMaxRows = 16 |
34 | }; | |
eb38ed55 | 35 | |
3a039a31 | 36 | AliTRDchamberTimeBin(Int_t plane=-1, Int_t stack=-1, Int_t sector=-1, Double_t z0=-1., Double_t zLength=-1.); |
37 | //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer, Double_t z0, Double_t zLength, UChar_t stackNr); | |
38 | //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer); | |
39 | AliTRDchamberTimeBin(const AliTRDchamberTimeBin &layer); | |
40 | ~AliTRDchamberTimeBin(); | |
ac1dec3b | 41 | operator Int_t() const { return fN; } |
42 | AliTRDchamberTimeBin& | |
43 | operator=(const AliTRDchamberTimeBin &myLayer); | |
44 | AliTRDcluster* operator[](const Int_t i) const { | |
3a039a31 | 45 | return ((i < fN) && (i >= 0)) ? fClusters[i] : 0x0; |
46 | } | |
eb38ed55 | 47 | |
ac1dec3b | 48 | void Bootstrap(const AliTRDReconstructor *rec, Int_t det); |
3a039a31 | 49 | void BuildIndices(Int_t iter = 0); |
50 | void BuildCond(AliTRDcluster *cl, Double_t *cond, UChar_t Layer, Double_t theta=0., Double_t phi=0.); | |
d611c74f | 51 | void Clear(const Option_t *opt = 0x0); |
eb38ed55 | 52 | AliTRDcluster* GetCluster(Int_t index) const {return index < fN && index >= 0 ? fClusters[index] : 0x0;} |
8368e0ee | 53 | Int_t GetGlobalIndex(Int_t index) const {return ((index < fN) && (index >= 0)) ? fIndex[index] : 0; } |
3a039a31 | 54 | void GetClusters(Double_t *cond, Int_t *index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer); |
55 | AliTRDcluster* GetNearestCluster(Double_t *cond); | |
56 | Double_t GetX() const { | |
57 | return fX; } | |
58 | Double_t GetZ0() const { return fZ0; } | |
59 | Double_t GetDZ0() const { return fZLength;} | |
60 | Int_t GetNClusters() const { return fN; } | |
61 | Int_t GetPlane() const { return fPlane; } | |
62 | Int_t GetStack() const { return fStack; } | |
63 | Int_t GetSector() const { return fSector; } | |
64 | void InsertCluster(AliTRDcluster *c, UInt_t index); | |
eb38ed55 | 65 | |
ac1dec3b | 66 | Bool_t IsT0() const {return TestBit(kT0);} |
67 | Bool_t IsOwner() const {return TestBit(kOwner);} | |
68 | ||
6c207d50 | 69 | void Print(Option_t *opt=0x0) const; |
8368e0ee | 70 | Int_t SearchNearestCluster(Double_t y, Double_t z, Double_t Roady, Double_t Roadz) const; |
3a039a31 | 71 | void SetRange(Float_t z0, Float_t zLength); |
8368e0ee | 72 | void SetNRows(Int_t nRows){ fNRows = nRows; } |
3a039a31 | 73 | void SetPlane(Int_t plane){ fPlane = plane; } |
74 | void SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;} | |
75 | void SetStack(Int_t stack){ fStack = stack; } | |
76 | void SetSector(Int_t sector){ fSector = sector; } | |
ac1dec3b | 77 | void SetOwner(Bool_t copy=kTRUE); |
78 | void SetT0(Bool_t set=kTRUE) {SetBit(kT0, set);} | |
3a039a31 | 79 | void SetX(Double_t x) {fX = x;} |
eb38ed55 | 80 | private: |
3a039a31 | 81 | void Copy(TObject &o) const; |
82 | Int_t Find(Float_t y) const; | |
83 | Int_t FindYPosition(Double_t y, UChar_t z, Int_t nClusters) const; | |
84 | Int_t FindNearestYCluster(Double_t y, UChar_t z) const; | |
eb38ed55 | 85 | |
86 | private: | |
ac1dec3b | 87 | const AliTRDReconstructor *fReconstructor; //! |
88 | Char_t fPlane; //! Plane number | |
89 | Char_t fStack; //! stack number in supermodule | |
90 | Char_t fSector; //! Sector mumber | |
91 | Char_t fNRows; //! number of pad rows in the chamber | |
92 | UChar_t fPositions[kMaxRows]; //! starting index of clusters in pad row | |
93 | Int_t fN; //! number of clusters | |
3a039a31 | 94 | AliTRDcluster *fClusters[kMaxClustersLayer]; //Array of pointers to clusters |
ac1dec3b | 95 | UInt_t fIndex[kMaxClustersLayer]; //!Array of cluster indexes |
96 | Double_t fX; //! radial position of tb | |
3a039a31 | 97 | |
98 | // obsolete !! | |
99 | Double_t fZ0; // starting position of the layer in Z direction | |
100 | Double_t fZLength; // length of the layer in Z direction | |
101 | ||
102 | ClassDef(AliTRDchamberTimeBin, 2) // tracking propagation layer for one time bin in chamber | |
eb38ed55 | 103 | |
104 | }; | |
105 | ||
eb38ed55 | 106 | #endif // ALITRDCHAMBERTIMEBIN_H |
107 |