CMS 3D CMS Logo

Public Member Functions | Private Attributes

MuonRpcFrameRotation Class Reference

#include <MuonRpcFrameRotation.h>

Inheritance diagram for MuonRpcFrameRotation:
MuonFrameRotation

List of all members.

Public Member Functions

 MuonRpcFrameRotation (const DDCompactView &cpv)
virtual Local3DPoint transformPoint (const Local3DPoint &, const G4Step *) const
virtual ~MuonRpcFrameRotation ()

Private Attributes

MuonG4Numberingg4numbering
int theRegion

Detailed Description

implementation of FrameRotation for the muon rpc

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

Modification:

Definition at line 21 of file MuonRpcFrameRotation.h.


Constructor & Destructor Documentation

MuonRpcFrameRotation::MuonRpcFrameRotation ( const DDCompactView cpv)

Definition at line 9 of file MuonRpcFrameRotation.cc.

References g4numbering, MuonDDDConstants::getValue(), and theRegion.

                                                                   : MuonFrameRotation::MuonFrameRotation(cpv) {
  g4numbering = new MuonG4Numbering(cpv);
  MuonDDDConstants muonConstants(cpv);
  int theLevelPart=muonConstants.getValue("level");
  theRegion=muonConstants.getValue("mr_region")/theLevelPart;
}
MuonRpcFrameRotation::~MuonRpcFrameRotation ( ) [virtual]

Definition at line 16 of file MuonRpcFrameRotation.cc.

References g4numbering.

                                           {
  delete g4numbering;
}

Member Function Documentation

Local3DPoint MuonRpcFrameRotation::transformPoint ( const Local3DPoint point,
const G4Step *  aStep = 0 
) const [virtual]

Implements MuonFrameRotation.

Definition at line 20 of file MuonRpcFrameRotation.cc.

References g4numbering, MuonBaseNumber::getSuperNo(), MuonG4Numbering::PhysicalVolumeToBaseNumber(), point, theRegion, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

                                                                                                         {
  if (!aStep)
    return Local3DPoint(0.,0.,0.);  

  //check if endcap
  MuonBaseNumber num = g4numbering->PhysicalVolumeToBaseNumber(aStep);
  bool endcap_muon = (num.getSuperNo(theRegion)!=1);
  if (endcap_muon){
    return Local3DPoint(point.x(),point.z(),-point.y());
  } else {
    return point; 
  }
}

Member Data Documentation

Definition at line 28 of file MuonRpcFrameRotation.h.

Referenced by MuonRpcFrameRotation(), and transformPoint().