CMS 3D CMS Logo

Public Member Functions

MuonEndcapFrameRotation Class Reference

#include <MuonEndcapFrameRotation.h>

Inheritance diagram for MuonEndcapFrameRotation:
MuonFrameRotation

List of all members.

Public Member Functions

virtual Local3DPoint transformPoint (const Local3DPoint &, const G4Step *) const
virtual ~MuonEndcapFrameRotation ()

Detailed Description

implementation of FrameRotation for the muon endcap

Author:
Arno Straessner, CERN <arno.straessner@cern.ch>

Modification:

Definition at line 18 of file MuonEndcapFrameRotation.h.


Constructor & Destructor Documentation

virtual MuonEndcapFrameRotation::~MuonEndcapFrameRotation ( ) [inline, virtual]

Definition at line 20 of file MuonEndcapFrameRotation.h.

{};

Member Function Documentation

Local3DPoint MuonEndcapFrameRotation::transformPoint ( const Local3DPoint point,
const G4Step *  s = 0 
) const [virtual]

Implements MuonFrameRotation.

Definition at line 6 of file MuonEndcapFrameRotation.cc.

References alignCSCRings::s, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

                                                                                                        {
  if (!s)
    return Local3DPoint(0.,0.,0.);
      
  const G4StepPoint * preStepPoint = s->GetPreStepPoint();
  const G4TouchableHistory * theTouchable = (const G4TouchableHistory *)preStepPoint->GetTouchable();
  const G4ThreeVector trans=theTouchable->GetTranslation();
  
  if (trans.z()<0) {
    //      return Local3DPoint(point.x(),-point.z(),point.y());
    //      return Local3DPoint(-point.x(),point.z(),-point.y());
    return Local3DPoint(-point.x(),-point.z(),-point.y());
  } else {
    //      return Local3DPoint(point.x(),point.z(),-point.y());
    return Local3DPoint(point.x(),point.z(),-point.y());
  }
}