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 $
22 // Class describing a zone composed of the zone segments.
23 // The zone contains pads of the same dimensions.
24 // Included in AliRoot: 2003/05/02
25 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
27 #include "AliMpZone.h"
28 #include "AliMpSubZone.h"
34 //_____________________________________________________________________________
35 AliMpZone::AliMpZone(Int_t id)
39 fPadDimensions(TVector2())
41 /// Standard constructor
44 //_____________________________________________________________________________
45 AliMpZone::AliMpZone()
49 fPadDimensions(TVector2())
51 /// Default constructor
54 //_____________________________________________________________________________
55 AliMpZone::~AliMpZone()
59 for (Int_t i=0; i<GetNofSubZones(); i++)
67 //_____________________________________________________________________________
68 void AliMpZone::AddSubZone(AliMpSubZone* subZone)
73 fSubZones.push_back(subZone);
77 fSubZones.Add(subZone);
81 //_____________________________________________________________________________
82 AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
84 /// Find a subzone with a specified motif;
85 /// return 0 if not found.
87 for (Int_t i=0; i<GetNofSubZones(); i++) {
88 AliMpSubZone* subZone = GetSubZone(i);
89 if (subZone->GetMotif() == motif) return subZone;
95 //_____________________________________________________________________________
96 Int_t AliMpZone::GetNofSubZones() const
98 /// Return number of row segments.
101 return fSubZones.size();
105 return fSubZones.GetEntriesFast();
109 //_____________________________________________________________________________
110 AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const
112 /// Return i-th sub zone.
114 if (i<0 || i>=GetNofSubZones()) {
115 Warning("GetSubZone", "Index outside range");
124 return (AliMpSubZone*)fSubZones[i];