CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

AlignableDTWheel Class Reference

#include <AlignableDTWheel.h>

Inheritance diagram for AlignableDTWheel:
AlignableComposite Alignable

List of all members.

Public Member Functions

 AlignableDTWheel (const std::vector< AlignableDTStation * > dtStations)
 The constructor simply copies the vector of stations and computes the surface from them.
virtual std::vector< Alignable * > components () const
 Return vector of direct components.
RotationType computeOrientation ()
 Just initialize to default given by default constructor of a RotationType.
PositionType computePosition ()
 Compute average z position from all components (x and y forced to 0)
AlignableSurface computeSurface ()
void dump (void)
 Recursive printout of the muon DT wheel structure.
AlignableDTStationstation (int i)
 Return Alignable DT Station at given index.
 ~AlignableDTWheel ()
 Clean delete of the vector and its elements.

Private Attributes

std::vector< AlignableDTStation * > theDTStations

Friends

std::ostream & operator<< (std::ostream &, const AlignableDTWheel &)
 Printout muon DT wheel information (not recursive)

Detailed Description

Concrete class for muon DT Wheel alignable.

Misalignment can be de-/reactivated (forwarded to components).

The alignable muon DT wheel.

Date:
2008/04/15 16:05:53
Revision:
1.10
Author:
Andre Sznajder - UERJ(Brazil)

Definition at line 29 of file AlignableDTWheel.h.


Constructor & Destructor Documentation

AlignableDTWheel::AlignableDTWheel ( const std::vector< AlignableDTStation * >  dtStations)

The constructor simply copies the vector of stations and computes the surface from them.

Definition at line 15 of file AlignableDTWheel.cc.

References computeSurface(), AlignableComposite::setSurface(), and theDTStations.

   : AlignableComposite(dtStations[0]->id(), align::AlignableDTWheel)
{

  theDTStations.insert( theDTStations.end(), dtStations.begin(), dtStations.end() );

  setSurface( computeSurface() );
   
}
AlignableDTWheel::~AlignableDTWheel ( )

Clean delete of the vector and its elements.

Definition at line 27 of file AlignableDTWheel.cc.

References theDTStations.

{
  for ( std::vector<AlignableDTStation*>::iterator iter = theDTStations.begin(); 
        iter != theDTStations.end(); iter++)
    delete *iter;

}

Member Function Documentation

virtual std::vector<Alignable*> AlignableDTWheel::components ( ) const [inline, virtual]

Return vector of direct components.

Reimplemented from AlignableComposite.

Definition at line 38 of file AlignableDTWheel.h.

References query::result, and theDTStations.

  {

        std::vector<Alignable*> result;
        result.insert( result.end(), theDTStations.begin(), theDTStations.end() );
        return result;

  }
AlignableDTWheel::RotationType AlignableDTWheel::computeOrientation ( )

Just initialize to default given by default constructor of a RotationType.

Definition at line 76 of file AlignableDTWheel.cc.

Referenced by computeSurface().

{
  return RotationType();
}
AlignableDTWheel::PositionType AlignableDTWheel::computePosition ( )

Compute average z position from all components (x and y forced to 0)

Definition at line 59 of file AlignableDTWheel.cc.

References theDTStations, and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeSurface().

{

  float zz = 0.;

  for ( std::vector<AlignableDTStation*>::iterator ilayer = theDTStations.begin();
                ilayer != theDTStations.end(); ilayer++ )
    zz += (*ilayer)->globalPosition().z();

  zz /= static_cast<float>(theDTStations.size());

  return PositionType( 0.0, 0.0, zz );

}
AlignableSurface AlignableDTWheel::computeSurface ( )

Returns surface corresponding to current position and orientation, as given by average on all components

Definition at line 49 of file AlignableDTWheel.cc.

References computeOrientation(), and computePosition().

Referenced by AlignableDTWheel().

void AlignableDTWheel::dump ( void  )

Recursive printout of the muon DT wheel structure.

Recursive printout of whole DT Wheel structure.

Definition at line 96 of file AlignableDTWheel.cc.

References theDTStations.

{

  edm::LogInfo("AlignableDump") << (*this);
  for ( std::vector<AlignableDTStation*>::iterator iStation = theDTStations.begin();
                iStation != theDTStations.end(); iStation++ )
        (*iStation)->dump();

}
AlignableDTStation & AlignableDTWheel::station ( int  i)

Return Alignable DT Station at given index.

Definition at line 36 of file AlignableDTWheel.cc.

References Exception, i, Alignable::size(), and theDTStations.

{
  
  if (i >= size() ) 
        throw cms::Exception("LogicError") << "Station index (" << i << ") out of range";

  return *theDTStations[i];
  
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AlignableDTWheel b 
) [friend]

Printout muon DT wheel information (not recursive)

Definition at line 83 of file AlignableDTWheel.cc.

{

  os << "This DTWheel contains " << b.theDTStations.size() << " DT stations" << std::endl;
  os << "(phi, r, z) =  (" << b.globalPosition().phi() << "," 
     << b.globalPosition().perp() << "," << b.globalPosition().z();
  os << "),  orientation:" << std::endl<< b.globalRotation() << std::endl;
  return os;

}

Member Data Documentation