ROOT logo
/**************************************************************************
 * 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: AliMpPadRowRSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $
// Category: sector

//-----------------------------------------------------------------------------
// Class AliMpPadRowRSegment
// -------------------------
// Class describing a pad row segment composed of the 
// the identic pads;
// the pads are placed from the offset (defined in the base class)
// to the right.
//
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
//-----------------------------------------------------------------------------

#include "AliMpPadRowRSegment.h"
#include "AliMpPadRow.h"
#include "AliMpMotif.h"
#include "AliMpMotifType.h"

/// \cond CLASSIMP
ClassImp(AliMpPadRowRSegment)
/// \endcond

//______________________________________________________________________________
AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif, 
                                         Int_t motifPositionId, Int_t nofPads)
  : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
{
/// Standard constructor 
}

//______________________________________________________________________________
AliMpPadRowRSegment::AliMpPadRowRSegment() 
  : AliMpVPadRowSegment()
{
/// Default constructor
}

//______________________________________________________________________________
AliMpPadRowRSegment::~AliMpPadRowRSegment() 
{
/// Destructor  
}

//
// private methods  
//

//______________________________________________________________________________
Double_t AliMpPadRowRSegment::FirstPadCenterX() const
{
/// Return the x coordinate of the first (the most left) pad center
/// in the global coordinate system.

  return GetOffsetX() + GetMotif()->GetPadDimensionX();
}  

//______________________________________________________________________________
Double_t AliMpPadRowRSegment::LastPadCenterX() const
{
/// Return the x coordinate of the last (the most right) pad center
/// in the global coordinate system.                                             \n
/// !! numbering of pads is in (-x) direction

  return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensionX();
}

//______________________________________________________________________________
Double_t AliMpPadRowRSegment::FirstPadBorderX() const
{
/// Return the x coordinate of the left border of the first (the most left) 
/// pad in the global coordinate system.

  return GetOffsetX();
         // Also could be
         // return FirstPadCenterX() + GetMotif()->GetPadDimensionX();
}  

//______________________________________________________________________________
Double_t AliMpPadRowRSegment::LastPadBorderX() const
{
/// Return the x coordinate of the right border of the last (the most right)
/// pad in the global coordinate system.

  return LastPadCenterX() + GetMotif()->GetPadDimensionX();
}  

//
// public methods  
//

//______________________________________________________________________________
Double_t  AliMpPadRowRSegment::LeftBorderX() const
{
/// Return the x coordinate of the left row segment border
/// in the global coordinate system.

  return FirstPadBorderX();
}

//______________________________________________________________________________
Double_t  AliMpPadRowRSegment::RightBorderX() const
{
/// Return the x coordinate of the right row segment border
/// in the global coordinate system.

  return LastPadBorderX();
}

 AliMpPadRowRSegment.cxx:1
 AliMpPadRowRSegment.cxx:2
 AliMpPadRowRSegment.cxx:3
 AliMpPadRowRSegment.cxx:4
 AliMpPadRowRSegment.cxx:5
 AliMpPadRowRSegment.cxx:6
 AliMpPadRowRSegment.cxx:7
 AliMpPadRowRSegment.cxx:8
 AliMpPadRowRSegment.cxx:9
 AliMpPadRowRSegment.cxx:10
 AliMpPadRowRSegment.cxx:11
 AliMpPadRowRSegment.cxx:12
 AliMpPadRowRSegment.cxx:13
 AliMpPadRowRSegment.cxx:14
 AliMpPadRowRSegment.cxx:15
 AliMpPadRowRSegment.cxx:16
 AliMpPadRowRSegment.cxx:17
 AliMpPadRowRSegment.cxx:18
 AliMpPadRowRSegment.cxx:19
 AliMpPadRowRSegment.cxx:20
 AliMpPadRowRSegment.cxx:21
 AliMpPadRowRSegment.cxx:22
 AliMpPadRowRSegment.cxx:23
 AliMpPadRowRSegment.cxx:24
 AliMpPadRowRSegment.cxx:25
 AliMpPadRowRSegment.cxx:26
 AliMpPadRowRSegment.cxx:27
 AliMpPadRowRSegment.cxx:28
 AliMpPadRowRSegment.cxx:29
 AliMpPadRowRSegment.cxx:30
 AliMpPadRowRSegment.cxx:31
 AliMpPadRowRSegment.cxx:32
 AliMpPadRowRSegment.cxx:33
 AliMpPadRowRSegment.cxx:34
 AliMpPadRowRSegment.cxx:35
 AliMpPadRowRSegment.cxx:36
 AliMpPadRowRSegment.cxx:37
 AliMpPadRowRSegment.cxx:38
 AliMpPadRowRSegment.cxx:39
 AliMpPadRowRSegment.cxx:40
 AliMpPadRowRSegment.cxx:41
 AliMpPadRowRSegment.cxx:42
 AliMpPadRowRSegment.cxx:43
 AliMpPadRowRSegment.cxx:44
 AliMpPadRowRSegment.cxx:45
 AliMpPadRowRSegment.cxx:46
 AliMpPadRowRSegment.cxx:47
 AliMpPadRowRSegment.cxx:48
 AliMpPadRowRSegment.cxx:49
 AliMpPadRowRSegment.cxx:50
 AliMpPadRowRSegment.cxx:51
 AliMpPadRowRSegment.cxx:52
 AliMpPadRowRSegment.cxx:53
 AliMpPadRowRSegment.cxx:54
 AliMpPadRowRSegment.cxx:55
 AliMpPadRowRSegment.cxx:56
 AliMpPadRowRSegment.cxx:57
 AliMpPadRowRSegment.cxx:58
 AliMpPadRowRSegment.cxx:59
 AliMpPadRowRSegment.cxx:60
 AliMpPadRowRSegment.cxx:61
 AliMpPadRowRSegment.cxx:62
 AliMpPadRowRSegment.cxx:63
 AliMpPadRowRSegment.cxx:64
 AliMpPadRowRSegment.cxx:65
 AliMpPadRowRSegment.cxx:66
 AliMpPadRowRSegment.cxx:67
 AliMpPadRowRSegment.cxx:68
 AliMpPadRowRSegment.cxx:69
 AliMpPadRowRSegment.cxx:70
 AliMpPadRowRSegment.cxx:71
 AliMpPadRowRSegment.cxx:72
 AliMpPadRowRSegment.cxx:73
 AliMpPadRowRSegment.cxx:74
 AliMpPadRowRSegment.cxx:75
 AliMpPadRowRSegment.cxx:76
 AliMpPadRowRSegment.cxx:77
 AliMpPadRowRSegment.cxx:78
 AliMpPadRowRSegment.cxx:79
 AliMpPadRowRSegment.cxx:80
 AliMpPadRowRSegment.cxx:81
 AliMpPadRowRSegment.cxx:82
 AliMpPadRowRSegment.cxx:83
 AliMpPadRowRSegment.cxx:84
 AliMpPadRowRSegment.cxx:85
 AliMpPadRowRSegment.cxx:86
 AliMpPadRowRSegment.cxx:87
 AliMpPadRowRSegment.cxx:88
 AliMpPadRowRSegment.cxx:89
 AliMpPadRowRSegment.cxx:90
 AliMpPadRowRSegment.cxx:91
 AliMpPadRowRSegment.cxx:92
 AliMpPadRowRSegment.cxx:93
 AliMpPadRowRSegment.cxx:94
 AliMpPadRowRSegment.cxx:95
 AliMpPadRowRSegment.cxx:96
 AliMpPadRowRSegment.cxx:97
 AliMpPadRowRSegment.cxx:98
 AliMpPadRowRSegment.cxx:99
 AliMpPadRowRSegment.cxx:100
 AliMpPadRowRSegment.cxx:101
 AliMpPadRowRSegment.cxx:102
 AliMpPadRowRSegment.cxx:103
 AliMpPadRowRSegment.cxx:104
 AliMpPadRowRSegment.cxx:105
 AliMpPadRowRSegment.cxx:106
 AliMpPadRowRSegment.cxx:107
 AliMpPadRowRSegment.cxx:108
 AliMpPadRowRSegment.cxx:109
 AliMpPadRowRSegment.cxx:110
 AliMpPadRowRSegment.cxx:111
 AliMpPadRowRSegment.cxx:112
 AliMpPadRowRSegment.cxx:113
 AliMpPadRowRSegment.cxx:114
 AliMpPadRowRSegment.cxx:115
 AliMpPadRowRSegment.cxx:116
 AliMpPadRowRSegment.cxx:117
 AliMpPadRowRSegment.cxx:118
 AliMpPadRowRSegment.cxx:119
 AliMpPadRowRSegment.cxx:120
 AliMpPadRowRSegment.cxx:121
 AliMpPadRowRSegment.cxx:122
 AliMpPadRowRSegment.cxx:123
 AliMpPadRowRSegment.cxx:124
 AliMpPadRowRSegment.cxx:125
 AliMpPadRowRSegment.cxx:126