#include <MuonGemFrameRotation.h>
Public Member Functions | |
MuonGemFrameRotation (const DDCompactView &cpv) | |
virtual Local3DPoint | transformPoint (const Local3DPoint &, const G4Step *) const |
virtual | ~MuonGemFrameRotation () |
Private Attributes | |
MuonG4Numbering * | g4numbering |
int | theSectorLevel |
implementation of FrameRotation for the muon gem
Modification:
Definition at line 21 of file MuonGemFrameRotation.h.
MuonGemFrameRotation::MuonGemFrameRotation | ( | const DDCompactView & | cpv | ) |
Definition at line 10 of file MuonGemFrameRotation.cc.
References gather_cfg::cout, g4numbering, MuonDDDConstants::getValue(), and theSectorLevel.
: MuonFrameRotation::MuonFrameRotation(cpv) { g4numbering = new MuonG4Numbering(cpv); MuonDDDConstants muonConstants(cpv); int theLevelPart= muonConstants.getValue("level"); theSectorLevel = muonConstants.getValue("mg_sector")/theLevelPart; #ifdef LOCAL_DEBUG std::cout << "MuonGemFrameRotation: theSectorLevel " << theSectorLevel << std::endl; #endif }
MuonGemFrameRotation::~MuonGemFrameRotation | ( | ) | [virtual] |
Definition at line 21 of file MuonGemFrameRotation.cc.
References g4numbering.
{ delete g4numbering; }
Local3DPoint MuonGemFrameRotation::transformPoint | ( | const Local3DPoint & | point, |
const G4Step * | aStep = 0 |
||
) | const [virtual] |
Implements MuonFrameRotation.
Definition at line 25 of file MuonGemFrameRotation.cc.
References gather_cfg::cout, g4numbering, MuonBaseNumber::getBaseNo(), MuonG4Numbering::PhysicalVolumeToBaseNumber(), theSectorLevel, 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 it is rotated #ifdef LOCAL_DEBUG std::cout << "Position " << aStep->GetPreStepPoint()->GetPosition() << std::endl; #endif MuonBaseNumber num = g4numbering->PhysicalVolumeToBaseNumber(aStep); bool rotated = (num.getBaseNo(theSectorLevel)>=50); #ifdef LOCAL_DEBUG std::cout << "MuonGemFrameRotation num " << num.getBaseNo(theSectorLevel) << " Rotation " << rotated << std::endl; #endif if (rotated) { return Local3DPoint(-point.x(),point.z(),point.y()); } else { return Local3DPoint(point.x(),point.z(),-point.y()); } }
MuonG4Numbering* MuonGemFrameRotation::g4numbering [private] |
Definition at line 29 of file MuonGemFrameRotation.h.
Referenced by MuonGemFrameRotation(), transformPoint(), and ~MuonGemFrameRotation().
int MuonGemFrameRotation::theSectorLevel [private] |
Definition at line 30 of file MuonGemFrameRotation.h.
Referenced by MuonGemFrameRotation(), and transformPoint().