CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

AlignableCSCStation Class Reference

#include <AlignableCSCStation.h>

Inheritance diagram for AlignableCSCStation:
AlignableComposite Alignable

List of all members.

Public Member Functions

 AlignableCSCStation (const std::vector< AlignableCSCRing * > cscRings)
 The constructor simply copies the vector of CSC Rings 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 CSC Station structure.
AlignableCSCRingring (int i)
 Return Alignable CSC Ring at given index.
 ~AlignableCSCStation ()
 Clean delete of the vector and its elements.

Private Attributes

std::vector< AlignableCSCRing * > theCSCRings

Friends

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

Detailed Description

Concrete class for muon CSC Station alignable.

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

The alignable muon CSC station.

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

Definition at line 30 of file AlignableCSCStation.h.


Constructor & Destructor Documentation

AlignableCSCStation::AlignableCSCStation ( const std::vector< AlignableCSCRing * >  cscRings)

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

Definition at line 15 of file AlignableCSCStation.cc.

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

   : AlignableComposite(cscRings[0]->id(), align::AlignableCSCStation)
{

  theCSCRings.insert( theCSCRings.end(), cscRings.begin(), cscRings.end() );

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

Clean delete of the vector and its elements.

Definition at line 27 of file AlignableCSCStation.cc.

References theCSCRings.

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

}

Member Function Documentation

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

Return vector of direct components.

Reimplemented from AlignableComposite.

Definition at line 39 of file AlignableCSCStation.h.

References query::result, and theCSCRings.

  {

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

  }
AlignableCSCStation::RotationType AlignableCSCStation::computeOrientation ( )

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

Definition at line 76 of file AlignableCSCStation.cc.

Referenced by computeSurface().

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

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

Definition at line 59 of file AlignableCSCStation.cc.

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

Referenced by computeSurface().

{

  float zz = 0.;

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

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

  return PositionType( 0.0, 0.0, zz );

}
AlignableSurface AlignableCSCStation::computeSurface ( )

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

Definition at line 49 of file AlignableCSCStation.cc.

References computeOrientation(), and computePosition().

Referenced by AlignableCSCStation().

void AlignableCSCStation::dump ( void  )

Recursive printout of the muon CSC Station structure.

Recursive printout of whole CSC Station structure.

Definition at line 106 of file AlignableCSCStation.cc.

References theCSCRings.

{

  edm::LogInfo("AlignableDump") << (*this);
  for ( std::vector<AlignableCSCRing*>::iterator iRing = theCSCRings.begin();
                iRing != theCSCRings.end(); iRing++ )
         edm::LogInfo("AlignableDump")  << (**iRing);

}
AlignableCSCRing & AlignableCSCStation::ring ( int  i)

Return Alignable CSC Ring at given index.

Definition at line 36 of file AlignableCSCStation.cc.

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

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

  return *theCSCRings[i];
  
}

Friends And Related Function Documentation

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

Printout muon CSC Station information (not recursive)

Definition at line 93 of file AlignableCSCStation.cc.

{

  os << "This CSC Station contains " << b.theCSCRings.size() << " CSC rings" << 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