CMS 3D CMS Logo

Public Member Functions

DDDividedTubsPhi Class Reference

#include <DDDividedTubs.h>

Inheritance diagram for DDDividedTubsPhi:
DDDividedGeometryObject

List of all members.

Public Member Functions

 DDDividedTubsPhi (const DDDivision &div, DDCompactView *cpv)
virtual double getMaxParameter () const
virtual DDLogicalPart makeDDLogicalPart (const int copyNo) const
virtual DDRotation makeDDRotation (const int copyNo) const
virtual DDTranslation makeDDTranslation (const int copyNo) const
virtual ~DDDividedTubsPhi ()

Detailed Description

Definition at line 32 of file DDDividedTubs.h.


Constructor & Destructor Documentation

DDDividedTubsPhi::DDDividedTubsPhi ( const DDDivision div,
DDCompactView cpv 
)
DDDividedTubsPhi::~DDDividedTubsPhi ( void  ) [virtual]

Definition at line 123 of file DDDividedTubs.cc.

{}

Member Function Documentation

double DDDividedTubsPhi::getMaxParameter ( void  ) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 127 of file DDDividedTubs.cc.

References DDTubs::deltaPhi(), DDDividedGeometryObject::div_, DDDivision::parent(), and DDLogicalPart::solid().

{
  DDTubs msol = (DDTubs)(div_.parent().solid());
  return msol.deltaPhi();
}
DDLogicalPart DDDividedTubsPhi::makeDDLogicalPart ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 160 of file DDDividedTubs.cc.

References DDDividedGeometryObject::compWidth_, DCOUT_V, ddtubs, DDDividedGeometryObject::div_, DDLogicalPart::material(), DDBase< N, C >::name(), DDDivision::offset(), DDDivision::parent(), DDLogicalPart::solid(), and DDSolidFactory::tubs().

{
  DDName solname(div_.name());
  //-  DDName solname(div_.parent().ddname().name() + "_DIVCHILD", div_.parent().ddname().ns());
  DDSolid ddtubs(solname);
  DDMaterial usemat(div_.parent().material());
  DDTubs msol = (DDTubs) (div_.parent().solid());
  DDLogicalPart ddlp(solname);

  if (!ddtubs.isDefined().second)  // only if it is not defined, make new dimensions and solid.
  {
    double pRMin = msol.rIn();
    double pRMax = msol.rOut();
    double pDz = msol.zhalf();
    double pSPhi = msol.startPhi()+div_.offset(); 
    double pDPhi = compWidth_;  
    ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi);
    ddlp = DDLogicalPart(solname, usemat, ddtubs);
  }

  DCOUT_V ('P', " DDDividedTubsPhi::computeDimensions() lp:" << ddlp);
  return ddlp;
}
DDRotation DDDividedTubsPhi::makeDDRotation ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 134 of file DDDividedTubs.cc.

References DDDividedGeometryObject::changeRotMatrix(), DDDividedGeometryObject::compWidth_, DDBase< N, C >::ddname(), DDrot(), DDDividedGeometryObject::div_, DDXMLElement::itostr(), DDName::name(), DDName::ns(), and DDDivision::parent().

{
  DDRotation myddrot; // sets to identity.
  double posi = ( copyNo - 1 ) * compWidth_; // This should put the first one at the 0 of the parent.
  DDRotationMatrix * rotMat = changeRotMatrix( posi );
  // how to name the rotation??
  // i hate this crap :-)
  DDName ddrotname(div_.parent().ddname().name() + "_DIVCHILD_ROT"
                   + DDXMLElement::itostr(copyNo)
                   , div_.parent().ddname().ns());
  myddrot = DDrot(ddrotname, rotMat);

  return myddrot;
}
DDTranslation DDDividedTubsPhi::makeDDTranslation ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 150 of file DDDividedTubs.cc.

References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, and DDAxesNames::name().

{
  //----- translation 
  DDTranslation translation;

  DCOUT_V ('P', " DDDividedTubsPhi " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis()));
  return translation;
}