CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

AlignableDTStation Class Reference

#include <AlignableDTStation.h>

Inheritance diagram for AlignableDTStation:
AlignableComposite Alignable

List of all members.

Public Member Functions

 AlignableDTStation (const std::vector< AlignableDTChamber * > dtChambers)
 The constructor simply copies the vector of DT Chambers and computes the surface from them.
AlignableDTChamberchamber (int i)
 Return Alignable DT Chamber at given index.
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 Station structure.
 ~AlignableDTStation ()
 Clean delete of the vector and its elements.

Private Attributes

std::vector< AlignableDTChamber * > theDTChambers

Friends

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

Detailed Description

Concrete class for muon DT Station alignable.

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

The alignable muon DT station.

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

Definition at line 29 of file AlignableDTStation.h.


Constructor & Destructor Documentation

AlignableDTStation::AlignableDTStation ( const std::vector< AlignableDTChamber * >  dtChambers)

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

Definition at line 15 of file AlignableDTStation.cc.

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

   : AlignableComposite(dtChambers[0]->id(), align::AlignableDTStation)
{

  theDTChambers.insert( theDTChambers.end(), dtChambers.begin(), dtChambers.end() );

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

Clean delete of the vector and its elements.

Definition at line 27 of file AlignableDTStation.cc.

References theDTChambers.

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

}

Member Function Documentation

AlignableDTChamber & AlignableDTStation::chamber ( int  i)

Return Alignable DT Chamber at given index.

Definition at line 36 of file AlignableDTStation.cc.

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

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

  return *theDTChambers[i];
  
}
virtual std::vector<Alignable*> AlignableDTStation::components ( ) const [inline, virtual]

Return vector of direct components.

Reimplemented from AlignableComposite.

Definition at line 38 of file AlignableDTStation.h.

References query::result, and theDTChambers.

  {

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

  }
AlignableDTStation::RotationType AlignableDTStation::computeOrientation ( )

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

Definition at line 76 of file AlignableDTStation.cc.

Referenced by computeSurface().

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

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

Definition at line 59 of file AlignableDTStation.cc.

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

Referenced by computeSurface().

{

  float zz = 0.;

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

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

  return PositionType( 0.0, 0.0, zz );

}
AlignableSurface AlignableDTStation::computeSurface ( )

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

Definition at line 49 of file AlignableDTStation.cc.

References computeOrientation(), and computePosition().

Referenced by AlignableDTStation().

void AlignableDTStation::dump ( void  )

Recursive printout of the muon DT Station structure.

Recursive printout of whole DT Station structure.

Definition at line 97 of file AlignableDTStation.cc.

References theDTChambers.

{

  edm::LogInfo("AlignableDump") << (*this);
  for ( std::vector<AlignableDTChamber*>::iterator iChamber = theDTChambers.begin();
                iChamber != theDTChambers.end(); iChamber++ )
        edm::LogInfo("AlignableDump") << (**iChamber);

}

Friends And Related Function Documentation

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

Printout muon DT Station information (not recursive)

Definition at line 84 of file AlignableDTStation.cc.

{

  os << "This DT Station contains " << b.theDTChambers.size() << " DT chambers" << 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