1 #ifndef ALITRDSTACKLAYER_H
2 #define ALITRDSTACKLAYER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ////////////////////////////////////////////////////////////////////////////
11 // A TRD layer in a single stack //
13 ////////////////////////////////////////////////////////////////////////////
15 #ifndef ALITRDPROPAGATIONLAYER_H
16 #include "AliTRDpropagationLayer.h"
19 #ifndef ALITRDCLUSTER_H
20 #include "AliTRDcluster.h"
23 class AliTRDrecoParam;
25 class AliTRDstackLayer : public AliTRDpropagationLayer
29 kMaxClustersLayer = 150,
33 AliTRDstackLayer(Double_t z0 = 0., Double_t zLength = 0., UChar_t stackNr = 0
34 , AliTRDrecoParam *p=0x0);
35 AliTRDstackLayer(const AliTRDpropagationLayer &layer, Double_t z0
36 , Double_t zLength, UChar_t stackNr, AliTRDrecoParam *p = 0x0);
37 AliTRDstackLayer(const AliTRDpropagationLayer &layer);
38 AliTRDstackLayer(const AliTRDstackLayer &layer);
40 AliTRDstackLayer &operator=(const AliTRDpropagationLayer &myLayer);
41 AliTRDstackLayer &operator=(const AliTRDstackLayer &myLayer);
42 AliTRDcluster *operator[](const Int_t i) const {
43 return ((i < fN) && (i >= 0)) ? fClusters[i] : 0x0;
46 void BuildIndices(Int_t iter = 0);
47 void BuildCond(AliTRDcluster *cl, Double_t *cond, UChar_t Layer, Double_t theta=0., Double_t phi=0.);
48 AliTRDcluster* GetCluster(Int_t index) const {return index < fN ? fClusters[index] : 0x0;}
49 Int_t GetGlobalIndex(const Int_t index) const {return ((index < fN) && (index >= 0)) ? fIndex[index] : 0; }
50 void GetClusters(Double_t *cond, Int_t *index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer);
51 AliTRDcluster* GetNearestCluster(Double_t *cond);
53 Double_t GetZ0() const { return fZ0; }
54 Double_t GetDZ0() const { return fZLength; }
55 Int_t GetNClusters() const { return fN; }
56 UInt_t GetStackNr() const { return fStackNr; }
58 Bool_t IsT0() const {return TestBit(1);}
60 void PrintClusters() const;
61 Int_t SearchNearestCluster(const Double_t y, const Double_t z, const Double_t Roady, const Double_t Roadz) const;
62 void SetRange(Float_t z0, Float_t zLength);
63 void SetNRows(const Int_t nRows){ fNRows = nRows; }
64 void SetStackNr(const UInt_t stackNr){ fStackNr = stackNr; }
65 void SetOwner(Bool_t own = kTRUE) {fOwner = own;}
66 void SetClustersArray(AliTRDcluster **cl, Int_t nClusters){fClusters = cl; fN = nClusters;}
67 void SetIndexArray(UInt_t *indexArray){fIndex = indexArray;}
68 void SetDebugStream(TTreeSRedirector *debug) {fDebugStream = debug;}
69 void SetRecoParam(AliTRDrecoParam *p) {fRecoParam = p;}
70 void SetT0(Bool_t set=kTRUE) {SetBit(1, set);}
73 void Copy(TObject &o) const;
74 Int_t FindYPosition(Double_t y, UChar_t z, Int_t nClusters) const;
75 Int_t FindNearestYCluster(Double_t y, UChar_t z) const;
78 Bool_t fOwner; // owner of the clusters
79 UChar_t fStackNr; // stack number in supermodule
80 UChar_t fNRows; // number of pad rows in the chamber
81 UChar_t fPositions[kMaxRows]; // starting index of clusters in pad row
82 Double_t fZ0; // starting position of the layer in Z direction
83 Double_t fZLength; // length of the layer in Z direction
84 AliTRDrecoParam *fRecoParam; //! reconstruction parameters
85 TTreeSRedirector *fDebugStream; //! debug streamer
87 ClassDef(AliTRDstackLayer, 1) // stack propagation layer
90 #endif // ALITRDSTACKLAYER_H_