+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
// $Id$
+// $MpId: AliMpSector.cxx,v 1.9 2005/09/02 10:01:09 ivana Exp $
// Category: sector
//
// Class AliMpSector
fDirection(direction),
fMinPadDimensions(TVector2(1.e6, 1.e6))
{
-//
+/// Standard constructor
+
fMotifMap = new AliMpMotifMap();
#ifdef WITH_STL
//_____________________________________________________________________________
AliMpSector::AliMpSector(const AliMpSector& right)
- : TObject(right) {
-//
+ : TObject(right)
+{
+/// Protected copy constructor (not provided)
+
Fatal("AliMpSector", "Copy constructor not provided.");
}
fDirection(kX),
fMinPadDimensions(TVector2(0., 0.))
{
-//
+/// Default constructor
}
//_____________________________________________________________________________
-AliMpSector::~AliMpSector() {
-//
+AliMpSector::~AliMpSector()
+{
+/// Destructor
+
// deletes
for (Int_t izone = 0; izone<GetNofZones(); izone++)
delete fZones[izone];
//_____________________________________________________________________________
AliMpSector& AliMpSector::operator=(const AliMpSector& right)
{
- // check assignement to self
+/// Protected assignment operator (not provided)
+
+ // check assignment to self
if (this == &right) return *this;
- Fatal("operator =", "Assignement operator not provided.");
+ Fatal("operator =", "Assignment operator not provided.");
return *this;
}
//_____________________________________________________________________________
AliMpVPadIterator* AliMpSector::CreateIterator() const
{
+/// Create sector pad iterator
+
return new AliMpSectorPadIterator(this);
}
//_____________________________________________________________________________
AliMpVRowSegment* AliMpSector::FindRowSegment(const TVector2& position) const
{
-// Finds the row segment in the specified position.
-// Returns 0 if no motif is found.
-// ---
+/// Find the row segment in the specified position. \n
+/// Return if no motif is found.
// Find row
AliMpRow* row = FindRow(position);
//_____________________________________________________________________________
void AliMpSector::SetRowOffsets()
{
-// For each row checks consitency of the row segments
-// and calculates the row offset.
-// ---
+/// For each row check consitency of the row segments
+/// and calculate the row offset.
Double_t offset = fOffset.Y();
//_____________________________________________________________________________
void AliMpSector::SetMotifPositions()
{
-// Creates motif positions objects and fills them in the motif map.
-// ---
+/// Create motif positions objects and fills them in the motif map.
for (Int_t i=0; i<GetNofRows(); i++)
GetRow(i)->SetMotifPositions();
//_____________________________________________________________________________
void AliMpSector::SetGlobalIndices()
{
-// Set the indices limits to all indexed elements
-// (row, row segment, motif positions).
-// ---
+/// Set the indices limits to all indexed elements
+/// (row, row segment, motif positions).
AliMpIntPair indices(0,0);
AliMpRow* rowBefore=0;
//_____________________________________________________________________________
void AliMpSector::SetMinPadDimensions()
{
-// Sets the minimal pad dimensions.
-// ---
+/// Set the minimal pad dimensions.
for (Int_t i=1; i<GetNofZones()+1; i++) {
TVector2 padDimensions = GetZone(i)->GetPadDimensions();
//_____________________________________________________________________________
void AliMpSector::SetRowSegmentOffsets()
{
-// For all rows sets offset to all row segments.
-// ---
+/// For all rows set the offset to all row segments.
for (Int_t irow=0; irow<GetNofRows(); irow++)
GetRow(irow)->SetRowSegmentOffsets(fOffset);
//_____________________________________________________________________________
void AliMpSector::Initialize()
{
-// Makes needed settings after sector is read from
-// data files.
-// ---
+/// Make needed settings after sector is read from
+/// data files.
SetRowOffsets();
SetMotifPositions();
//_____________________________________________________________________________
void AliMpSector::PrintGeometry() const
{
-// Prints the positions of rows, rows segments
-// ---
+/// Print the positions of rows, rows segments
for (Int_t i=0; i<GetNofRows(); i++) {
AliMpRow* row = GetRow(i);
//_____________________________________________________________________________
AliMpRow* AliMpSector::FindRow(const TVector2& position) const
{
-// Finds the row for the specified y position.
-// If y is on border the lowest row is returned.
-// ---
+/// Find the row for the specified y position. \n
+/// If y is on border the lowest row is returned.
Double_t y = position.Y();
//_____________________________________________________________________________
AliMpVMotif* AliMpSector::FindMotif(const TVector2& position) const
{
-// Finds the motif in the specified position.
-// Returns 0 if no motif is found.
-// ---
+/// Find the motif in the specified position. \n
+/// Return 0 if no motif is found.
// Find the row segment
AliMpVRowSegment* rowSegment = FindRowSegment(position);
// Find motif
return rowSegment->FindMotif(position);
}
-
//_____________________________________________________________________________
Int_t AliMpSector::FindMotifPositionId(const TVector2& position) const
{
-// Finds the motif position ID in the specified position.
-// Returns 0 if no motif is found.
-// ---
-
+/// Find the motif position ID in the specified position. \n
+/// Return 0 if no motif is found.
+
// Find the row segment
AliMpVRowSegment* rowSegment = FindRowSegment(position);
//_____________________________________________________________________________
AliMpRow* AliMpSector::FindRow(Int_t motifPositionId) const
{
-// Finds the row with the the specified motif position.
-// Returns 0 if no row is found.
-// ---
+/// Find the row with the the specified motif position. \n
+/// Return 0 if no row is found.
AliMpVRowSegment* segment = FindRowSegment(motifPositionId);
//_____________________________________________________________________________
AliMpVRowSegment* AliMpSector::FindRowSegment(Int_t motifPositionId) const
{
-// Finds the row segment with the the specified motif position.
-// Returns 0 if no row segment is found.
-// ---
+/// Find the row segment with the the specified motif position. \n
+/// Return 0 if no row segment is found.
for (Int_t irow=0; irow<GetNofRows(); irow++) {
//_____________________________________________________________________________
TVector2 AliMpSector::FindPosition(Int_t motifPositionId) const
{
-// Finds the position of the motif specified by its position Id.
-// Returns 0 if no row segment is found.
-// ---
+/// Find the position of the motif specified by its position Id. \n
+/// Return 0 if no row segment is found.
AliMpVRowSegment* segment = FindRowSegment(motifPositionId);
//_____________________________________________________________________________
AliMpZone* AliMpSector::FindZone(const TVector2& padDimensions) const
{
-// Finds the zone with specified padDimensions.
-// ---
+/// Find the zone with specified padDimensions.
for (Int_t i=0; i<GetNofZones(); i++) {
AliMpZone* zone = GetZone(i+1);
//_____________________________________________________________________________
TVector2 AliMpSector::Position() const
{
-// Returns the offset.
-// ---
+/// Return the sector offset.
return fOffset;
}
//_____________________________________________________________________________
TVector2 AliMpSector::Dimensions() const
{
-// Returns the maximum halflength in x, y.
-// ---
+/// Return the maximum halflengths in x, y.
Double_t x = 0.;
Double_t y = 0.;
//_____________________________________________________________________________
Int_t AliMpSector::GetNofZones() const
{
-// Returns the number of zones.
-// ---
+/// Return the number of zones.
#ifdef WITH_STL
return fZones.size();
//_____________________________________________________________________________
AliMpZone* AliMpSector::GetZone(Int_t zoneID) const
{
-// Returns zone with specified ID.
-// ---
+/// Return zone with specified ID.
if (zoneID < 1 || zoneID > GetNofZones()) {
Warning("GetZone", "Index outside range");
//_____________________________________________________________________________
Int_t AliMpSector::GetNofRows() const
{
-// Returns the number of rows.
-// ---
+/// Return the number of rows.
#ifdef WITH_STL
return fRows.size();
//_____________________________________________________________________________
AliMpRow* AliMpSector::GetRow(Int_t rowID) const
{
-// Returns row with specified ID.
-// ---
+/// Return row with specified ID.
if (rowID < 0 || rowID >= GetNofRows()) {
Warning("GetRow", "Index outside range");