CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
MuonGemFrameRotation Class Reference

#include <MuonGemFrameRotation.h>

Inheritance diagram for MuonGemFrameRotation:
MuonFrameRotation

Public Member Functions

 MuonGemFrameRotation (const DDCompactView &cpv)
 
virtual Local3DPoint transformPoint (const Local3DPoint &, const G4Step *) const
 
virtual ~MuonGemFrameRotation ()
 
- Public Member Functions inherited from MuonFrameRotation
 MuonFrameRotation (const DDCompactView &cpv)
 
 MuonFrameRotation ()
 
virtual ~MuonFrameRotation ()
 

Private Attributes

MuonG4Numberingg4numbering
 
int theSectorLevel
 

Detailed Description

implementation of FrameRotation for the muon gem

Author
Arno Straessner, CERN arno..nosp@m.stra.nosp@m.essne.nosp@m.r@ce.nosp@m.rn.ch

Modification:

Definition at line 21 of file MuonGemFrameRotation.h.

Constructor & Destructor Documentation

MuonGemFrameRotation::MuonGemFrameRotation ( const DDCompactView cpv)

Definition at line 10 of file MuonGemFrameRotation.cc.

References gather_cfg::cout, g4numbering, MuonDDDConstants::getValue(), and theSectorLevel.

11  g4numbering = new MuonG4Numbering(cpv);
12  MuonDDDConstants muonConstants(cpv);
13  int theLevelPart= muonConstants.getValue("level");
14  theSectorLevel = muonConstants.getValue("mg_sector")/theLevelPart;
15 #ifdef LOCAL_DEBUG
16  std::cout << "MuonGemFrameRotation: theSectorLevel " << theSectorLevel
17  << std::endl;
18 #endif
19 }
MuonG4Numbering * g4numbering
tuple cout
Definition: gather_cfg.py:121
MuonGemFrameRotation::~MuonGemFrameRotation ( )
virtual

Definition at line 21 of file MuonGemFrameRotation.cc.

References g4numbering.

21  {
22  delete g4numbering;
23 }
MuonG4Numbering * g4numbering

Member Function Documentation

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(), pileupDistInMC::num, MuonG4Numbering::PhysicalVolumeToBaseNumber(), theSectorLevel, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

25  {
26  if (!aStep) return Local3DPoint(0.,0.,0.);
27 
28  //check if it is rotated
29 #ifdef LOCAL_DEBUG
30  std::cout << "Position " << aStep->GetPreStepPoint()->GetPosition() << std::endl;
31 #endif
33  bool rotated = (num.getBaseNo(theSectorLevel)>=50);
34 #ifdef LOCAL_DEBUG
35  std::cout << "MuonGemFrameRotation num " << num.getBaseNo(theSectorLevel)
36  << " Rotation " << rotated << std::endl;
37 #endif
38  if (rotated) {
39  return Local3DPoint(-point.x(),point.z(),point.y());
40  } else {
41  return Local3DPoint(point.x(),point.z(),-point.y());
42  }
43 }
MuonG4Numbering * g4numbering
int getBaseNo(int level) const
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
MuonBaseNumber PhysicalVolumeToBaseNumber(const G4Step *aStep)
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

MuonG4Numbering* MuonGemFrameRotation::g4numbering
private
int MuonGemFrameRotation::theSectorLevel
private

Definition at line 30 of file MuonGemFrameRotation.h.

Referenced by MuonGemFrameRotation(), and transformPoint().