]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpSlatZonePadIterator.h
Generates realistic DDL sharing and buspatch number calculated from DDL (Christian)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSlatZonePadIterator.h
CommitLineData
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$
13985652 8// $MpId: AliMpSlatZonePadIterator.h,v 1.7 2006/05/24 13:58:24 ivana Exp $
dee1d5f1 9
10/// \ingroup slat
11/// \class AliMpSlatZonePadIterator
85fec35d 12/// \brief Iterates over slat pads within a region of constant pad size.
13985652 13///
14// Author: Laurent Aphecetche
dee1d5f1 15
16#include "AliMpVPadIterator.h"
17#include "AliMpArea.h"
18#include "TVector2.h"
19
20class AliMpSlat;
21class AliMpSlatSegmentation;
22
23class AliMpSlatZonePadIterator : public AliMpVPadIterator
24{
25 public:
26 AliMpSlatZonePadIterator(const AliMpSlat* slat, const AliMpArea& area);
27 virtual ~AliMpSlatZonePadIterator();
28
29 void First();
30 void Next();
31 Bool_t IsDone() const;
32 AliMpPad CurrentItem() const;
33 void Invalidate();
34
884a73f1 35 protected:
36 AliMpSlatZonePadIterator(const AliMpSlatZonePadIterator& right);
37 AliMpSlatZonePadIterator& operator = (const AliMpSlatZonePadIterator& right);
38
dee1d5f1 39 private:
40 Bool_t CropArea();
41 Bool_t GetNextPosition(Double_t& x, Double_t& y);
42 void SetPad(AliMpPad& pad, const TVector2& pos);
43
44 private:
829425a5 45 const AliMpSlat* fkSlat; //!< the slat we're iterating over
46 AliMpSlatSegmentation* fSlatSegmentation; //!< segmentation pointer
47 AliMpArea fArea; //!< area we're iterating over
48 TVector2 fOffset; //!< current position (relative to bottom-left of area)
49 TVector2 fStep; //!< step sizes
50 AliMpPad fCurrentPad; //!< current pad
51 Bool_t fIsDone; //!< whether we've finished or not
52
53 static const Double_t fgkDmax; ///< maximum double
54 static const Double_t fgkEpsilon; ///< comparison precision
dee1d5f1 55
56 ClassDef(AliMpSlatZonePadIterator,1) // Pad iterator for a zone of constant density, for St345.
57};
58
59#endif