1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 // $MpId: AliMpZone.cxx,v 1.7 2006/05/24 13:58:46 ivana Exp $
20 //-----------------------------------------------------------------------------
23 // Class describing a zone composed of the zone segments.
24 // The zone contains pads of the same dimensions.
25 // Included in AliRoot: 2003/05/02
26 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
27 //-----------------------------------------------------------------------------
29 #include "AliMpZone.h"
30 #include "AliMpSubZone.h"
36 //_____________________________________________________________________________
37 AliMpZone::AliMpZone(Int_t id)
41 fPadDimensions(TVector2())
43 /// Standard constructor
46 //_____________________________________________________________________________
47 AliMpZone::AliMpZone()
51 fPadDimensions(TVector2())
53 /// Default constructor
56 //_____________________________________________________________________________
57 AliMpZone::~AliMpZone()
61 for (Int_t i=0; i<GetNofSubZones(); i++)
69 //_____________________________________________________________________________
70 void AliMpZone::AddSubZone(AliMpSubZone* subZone)
75 fSubZones.push_back(subZone);
79 fSubZones.Add(subZone);
83 //_____________________________________________________________________________
84 AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
86 /// Find a subzone with a specified motif;
87 /// return 0 if not found.
89 for (Int_t i=0; i<GetNofSubZones(); i++) {
90 AliMpSubZone* subZone = GetSubZone(i);
91 if (subZone->GetMotif() == motif) return subZone;
97 //_____________________________________________________________________________
98 Int_t AliMpZone::GetNofSubZones() const
100 /// Return number of row segments.
103 return fSubZones.size();
107 return fSubZones.GetEntriesFast();
111 //_____________________________________________________________________________
112 AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const
114 /// Return i-th sub zone.
116 if (i<0 || i>=GetNofSubZones()) {
117 Warning("GetSubZone", "Index outside range");
126 return (AliMpSubZone*)fSubZones[i];