]>
Commit | Line | Data |
---|---|---|
85fec35d | 1 | #ifndef ALI_MP_SLAT_ZONE_PAD_ITERATOR_H |
2 | #define ALI_MP_SLAT_ZONE_PAD_ITERATOR_H | |
3 | ||
dee1d5f1 | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | // $MpId: AliMpSlatZonePadIterator.h,v 1.3 2005/08/26 15:42:32 ivana Exp $ | |
9 | ||
10 | /// \ingroup slat | |
11 | /// \class AliMpSlatZonePadIterator | |
85fec35d | 12 | /// \brief Iterates over slat pads within a region of constant pad size. |
13 | /// \author Laurent Aphecetche | |
dee1d5f1 | 14 | |
15 | #include "AliMpVPadIterator.h" | |
16 | #include "AliMpArea.h" | |
17 | #include "TVector2.h" | |
18 | ||
19 | class AliMpSlat; | |
20 | class AliMpSlatSegmentation; | |
21 | ||
22 | class AliMpSlatZonePadIterator : public AliMpVPadIterator | |
23 | { | |
24 | public: | |
25 | AliMpSlatZonePadIterator(const AliMpSlat* slat, const AliMpArea& area); | |
26 | virtual ~AliMpSlatZonePadIterator(); | |
27 | ||
28 | void First(); | |
29 | void Next(); | |
30 | Bool_t IsDone() const; | |
31 | AliMpPad CurrentItem() const; | |
32 | void Invalidate(); | |
33 | ||
884a73f1 | 34 | protected: |
35 | AliMpSlatZonePadIterator(const AliMpSlatZonePadIterator& right); | |
36 | AliMpSlatZonePadIterator& operator = (const AliMpSlatZonePadIterator& right); | |
37 | ||
dee1d5f1 | 38 | private: |
39 | Bool_t CropArea(); | |
40 | Bool_t GetNextPosition(Double_t& x, Double_t& y); | |
41 | void SetPad(AliMpPad& pad, const TVector2& pos); | |
42 | ||
43 | private: | |
85fec35d | 44 | const AliMpSlat* fkSlat; //! the slat we're iterating over |
45 | AliMpSlatSegmentation* fSlatSegmentation; //! segmentation pointer | |
46 | AliMpArea fArea; //! area we're iterating over | |
47 | TVector2 fOffset; //! current position (relative to bottom-left of area) | |
48 | TVector2 fStep; //! step sizes | |
49 | AliMpPad fCurrentPad; //! current pad | |
50 | Bool_t fIsDone; //! whether we've finished or not | |
51 | ||
52 | static const Double_t fgkDmax; // maximum double | |
53 | static const Double_t fgkEpsilon; // comparison precision | |
dee1d5f1 | 54 | |
55 | ClassDef(AliMpSlatZonePadIterator,1) // Pad iterator for a zone of constant density, for St345. | |
56 | }; | |
57 | ||
58 | #endif |