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.6 2005/08/26 15:43:36 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"
32 //_____________________________________________________________________________
33 AliMpZone::AliMpZone(Int_t id)
36 fPadDimensions(TVector2())
38 /// Standard constructor
41 //_____________________________________________________________________________
42 AliMpZone::AliMpZone()
45 fPadDimensions(TVector2())
47 /// Default constructor
50 //_____________________________________________________________________________
51 AliMpZone::~AliMpZone()
55 for (Int_t i=0; i<GetNofSubZones(); i++)
63 //_____________________________________________________________________________
64 void AliMpZone::AddSubZone(AliMpSubZone* subZone)
69 fSubZones.push_back(subZone);
73 fSubZones.Add(subZone);
77 //_____________________________________________________________________________
78 AliMpSubZone* AliMpZone::FindSubZone(AliMpVMotif* motif) const
80 /// Find a subzone with a specified motif;
81 /// return 0 if not found.
83 for (Int_t i=0; i<GetNofSubZones(); i++) {
84 AliMpSubZone* subZone = GetSubZone(i);
85 if (subZone->GetMotif() == motif) return subZone;
91 //_____________________________________________________________________________
92 Int_t AliMpZone::GetNofSubZones() const
94 /// Return number of row segments.
97 return fSubZones.size();
101 return fSubZones.GetEntriesFast();
105 //_____________________________________________________________________________
106 AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const
108 /// Return i-th sub zone.
110 if (i<0 || i>=GetNofSubZones()) {
111 Warning("GetSubZone", "Index outside range");
120 return (AliMpSubZone*)fSubZones[i];