6 // Class describing a zone composed of the zone segments.
7 // The zone contains pads of the same dimensions.
8 // Included in AliRoot: 2003/05/02
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
11 #include "AliMpZone.h"
12 #include "AliMpSubZone.h"
16 //_____________________________________________________________________________
17 AliMpZone::AliMpZone(Int_t id)
20 fPadDimensions(TVector2())
25 //_____________________________________________________________________________
26 AliMpZone::AliMpZone()
29 fPadDimensions(TVector2())
34 //_____________________________________________________________________________
35 AliMpZone::~AliMpZone() {
38 for (Int_t i=0; i<GetNofSubZones(); i++)
46 //_____________________________________________________________________________
47 void AliMpZone::AddSubZone(AliMpSubZone* subZone)
53 fSubZones.push_back(subZone);
57 fSubZones.Add(subZone);
61 //_____________________________________________________________________________
62 AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
64 // Finds a subzone with a specified motif;
65 // returns 0 if not found.
68 for (Int_t i=0; i<GetNofSubZones(); i++) {
69 AliMpSubZone* subZone = GetSubZone(i);
70 if (subZone->GetMotif() == motif) return subZone;
76 //_____________________________________________________________________________
77 Int_t AliMpZone::GetNofSubZones() const
79 // Returns number of row segments.
83 return fSubZones.size();
87 return fSubZones.GetEntriesFast();
91 //_____________________________________________________________________________
92 AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const
94 // Returns i-th sub zone.
97 if (i<0 || i>=GetNofSubZones()) {
98 Warning("GetSubZone", "Index outside range");
107 return (AliMpSubZone*)fSubZones[i];