]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpSector.cxx
From Laurent
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSector.cxx
index 298c19e2d600c2ac7eabe05dc83cfc25e5749fa5..6d5db82819a006ffd99ed36b178b103b2039e45b 100755 (executable)
@@ -1,4 +1,20 @@
+/**************************************************************************
+ * 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
@@ -33,7 +49,8 @@ AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
     fDirection(direction),
     fMinPadDimensions(TVector2(1.e6, 1.e6))
 {
-//
+/// Standard constructor
+
   fMotifMap = new AliMpMotifMap();
 
 #ifdef WITH_STL
@@ -55,8 +72,10 @@ AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
 
 //_____________________________________________________________________________
 AliMpSector::AliMpSector(const AliMpSector& right) 
-  : TObject(right) {
-// 
+  : TObject(right) 
+{
+/// Protected copy constructor (not provided) 
+
   Fatal("AliMpSector", "Copy constructor not provided.");
 }
 
@@ -71,12 +90,14 @@ AliMpSector::AliMpSector()
     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];
@@ -94,10 +115,12 @@ AliMpSector::~AliMpSector() {
 //_____________________________________________________________________________
 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;  
 }    
@@ -109,6 +132,8 @@ AliMpSector& AliMpSector::operator=(const AliMpSector& right)
 //_____________________________________________________________________________
 AliMpVPadIterator* AliMpSector::CreateIterator() const
 {
+/// Create sector pad iterator
+
   return new AliMpSectorPadIterator(this);
 }
 
@@ -116,9 +141,8 @@ AliMpVPadIterator* AliMpSector::CreateIterator() const
 //_____________________________________________________________________________
 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);
@@ -134,9 +158,8 @@ AliMpVRowSegment* AliMpSector::FindRowSegment(const TVector2& position) const
 //_____________________________________________________________________________
 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();
   
@@ -147,8 +170,7 @@ void  AliMpSector::SetRowOffsets()
 //_____________________________________________________________________________
 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();
@@ -157,9 +179,8 @@ void  AliMpSector::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;
@@ -172,8 +193,7 @@ void  AliMpSector::SetGlobalIndices()
 //_____________________________________________________________________________
 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();
@@ -194,8 +214,7 @@ void  AliMpSector::SetMinPadDimensions()
 //_____________________________________________________________________________
 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);    
@@ -204,9 +223,8 @@ void  AliMpSector::SetRowSegmentOffsets()
 //_____________________________________________________________________________
 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();
@@ -217,8 +235,7 @@ void AliMpSector::Initialize()
 //_____________________________________________________________________________
 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);
@@ -244,9 +261,8 @@ void AliMpSector::PrintGeometry()  const
 //_____________________________________________________________________________
 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();
   
@@ -271,9 +287,8 @@ AliMpRow* AliMpSector::FindRow(const TVector2& position) const
 //_____________________________________________________________________________
 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);
@@ -283,14 +298,12 @@ AliMpVMotif* AliMpSector::FindMotif(const TVector2& position) const
   // 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);
   
@@ -303,9 +316,8 @@ Int_t AliMpSector::FindMotifPositionId(const TVector2& position) const
 //_____________________________________________________________________________
 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);
   
@@ -317,9 +329,8 @@ AliMpRow* AliMpSector::FindRow(Int_t motifPositionId) const
 //_____________________________________________________________________________
 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++) {
 
@@ -342,9 +353,8 @@ AliMpVRowSegment* AliMpSector::FindRowSegment(Int_t motifPositionId) const
 //_____________________________________________________________________________
 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);
 
@@ -359,8 +369,7 @@ TVector2  AliMpSector::FindPosition(Int_t motifPositionId) const
 //_____________________________________________________________________________
 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);
@@ -375,8 +384,7 @@ AliMpZone*  AliMpSector::FindZone(const TVector2& padDimensions) const
 //_____________________________________________________________________________
 TVector2 AliMpSector::Position() const
 {
-// Returns the offset.
-// ---
+/// Return the sector offset.
 
   return fOffset;
 }  
@@ -385,8 +393,7 @@ TVector2 AliMpSector::Position() const
 //_____________________________________________________________________________
 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.;
@@ -417,8 +424,7 @@ TVector2 AliMpSector::Dimensions() const
 //_____________________________________________________________________________
 Int_t AliMpSector::GetNofZones() const
 {    
-// Returns the number of zones.
-// ---
+/// Return the number of zones.
 
 #ifdef WITH_STL
   return fZones.size();
@@ -432,8 +438,7 @@ Int_t AliMpSector::GetNofZones() const
 //_____________________________________________________________________________
 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");
@@ -452,8 +457,7 @@ AliMpZone* AliMpSector::GetZone(Int_t zoneID) const
 //_____________________________________________________________________________
 Int_t AliMpSector::GetNofRows() const
 {
-// Returns the number of rows.
-// ---
+/// Return the number of rows.
 
 #ifdef WITH_STL
   return fRows.size();
@@ -467,8 +471,7 @@ Int_t AliMpSector::GetNofRows() const
 //_____________________________________________________________________________
 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");