]>
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: | |
3a039a31 | 27 | enum{ |
28 | kMaxClustersLayer = 150 | |
29 | ,kMaxRows = 16 | |
30 | }; | |
eb38ed55 | 31 | |
3a039a31 | 32 | AliTRDchamberTimeBin(Int_t plane=-1, Int_t stack=-1, Int_t sector=-1, Double_t z0=-1., Double_t zLength=-1.); |
33 | //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer, Double_t z0, Double_t zLength, UChar_t stackNr); | |
34 | //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer); | |
35 | AliTRDchamberTimeBin(const AliTRDchamberTimeBin &layer); | |
36 | ~AliTRDchamberTimeBin(); | |
37 | //AliTRDchamberTimeBin &operator=(const AliTRDpropagationLayer &myLayer); | |
eb38ed55 | 38 | operator Int_t() const { return fN; } |
3a039a31 | 39 | AliTRDchamberTimeBin &operator=(const AliTRDchamberTimeBin &myLayer); |
40 | AliTRDcluster *operator[](const Int_t i) const { | |
41 | return ((i < fN) && (i >= 0)) ? fClusters[i] : 0x0; | |
42 | } | |
eb38ed55 | 43 | |
3a039a31 | 44 | void BuildIndices(Int_t iter = 0); |
45 | void BuildCond(AliTRDcluster *cl, Double_t *cond, UChar_t Layer, Double_t theta=0., Double_t phi=0.); | |
d611c74f | 46 | void Clear(const Option_t *opt = 0x0); |
eb38ed55 | 47 | AliTRDcluster* GetCluster(Int_t index) const {return index < fN && index >= 0 ? fClusters[index] : 0x0;} |
3a039a31 | 48 | Int_t GetGlobalIndex(const Int_t index) const {return ((index < fN) && (index >= 0)) ? fIndex[index] : 0; } |
49 | void GetClusters(Double_t *cond, Int_t *index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer); | |
50 | AliTRDcluster* GetNearestCluster(Double_t *cond); | |
51 | Double_t GetX() const { | |
52 | return fX; } | |
53 | Double_t GetZ0() const { return fZ0; } | |
54 | Double_t GetDZ0() const { return fZLength;} | |
55 | Int_t GetNClusters() const { return fN; } | |
56 | Int_t GetPlane() const { return fPlane; } | |
57 | Int_t GetStack() const { return fStack; } | |
58 | Int_t GetSector() const { return fSector; } | |
59 | void InsertCluster(AliTRDcluster *c, UInt_t index); | |
eb38ed55 | 60 | |
3a039a31 | 61 | Bool_t IsT0() const {return TestBit(1);} |
62 | ||
63 | void PrintClusters() const; | |
64 | Int_t SearchNearestCluster(const Double_t y, const Double_t z, const Double_t Roady, const Double_t Roadz) const; | |
65 | void SetRange(Float_t z0, Float_t zLength); | |
66 | void SetNRows(const Int_t nRows){ fNRows = nRows; } | |
67 | void SetPlane(Int_t plane){ fPlane = plane; } | |
68 | void SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;} | |
69 | void SetStack(Int_t stack){ fStack = stack; } | |
70 | void SetSector(Int_t sector){ fSector = sector; } | |
71 | void SetOwner(Bool_t own = kTRUE) {fOwner = own;} | |
72 | void SetT0(Bool_t set=kTRUE) {SetBit(1, set);} | |
73 | void SetX(Double_t x) {fX = x;} | |
eb38ed55 | 74 | private: |
3a039a31 | 75 | void Copy(TObject &o) const; |
76 | Int_t Find(Float_t y) const; | |
77 | Int_t FindYPosition(Double_t y, UChar_t z, Int_t nClusters) const; | |
78 | Int_t FindNearestYCluster(Double_t y, UChar_t z) const; | |
eb38ed55 | 79 | |
80 | private: | |
3a039a31 | 81 | const AliTRDReconstructor *fReconstructor; // |
82 | Bool_t fOwner; // owner of the clusters | |
83 | Char_t fPlane; // Plane number | |
84 | Char_t fStack; // stack number in supermodule | |
85 | Char_t fSector; // Sector mumber | |
86 | Char_t fNRows; // number of pad rows in the chamber | |
87 | UChar_t fPositions[kMaxRows]; // starting index of clusters in pad row | |
88 | Int_t fN; // number of clusters | |
89 | AliTRDcluster *fClusters[kMaxClustersLayer]; //Array of pointers to clusters | |
90 | UInt_t fIndex[kMaxClustersLayer]; //Array of cluster indexes | |
91 | Double_t fX; // radial position of tb | |
92 | ||
93 | // obsolete !! | |
94 | Double_t fZ0; // starting position of the layer in Z direction | |
95 | Double_t fZLength; // length of the layer in Z direction | |
96 | ||
97 | ClassDef(AliTRDchamberTimeBin, 2) // tracking propagation layer for one time bin in chamber | |
eb38ed55 | 98 | |
99 | }; | |
100 | ||
eb38ed55 | 101 | |
102 | #endif // ALITRDCHAMBERTIMEBIN_H | |
103 |