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 (Local3DPoint &, 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 ( Local3DPoint point,
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) {
    G4StepPoint * preStepPoint = s->GetPreStepPoint();
    G4TouchableHistory * theTouchable=(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());
    }
  } else {
    return Local3DPoint(0.,0.,0.);
  }
}