CMS 3D CMS Logo

Public Member Functions

DDDividedTubsZ Class Reference

#include <DDDividedTubs.h>

Inheritance diagram for DDDividedTubsZ:
DDDividedGeometryObject

List of all members.

Public Member Functions

 DDDividedTubsZ (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 ~DDDividedTubsZ ()

Detailed Description

Definition at line 50 of file DDDividedTubs.h.


Constructor & Destructor Documentation

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

Definition at line 205 of file DDDividedTubs.cc.

{}

Member Function Documentation

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

Reimplemented from DDDividedGeometryObject.

Definition at line 209 of file DDDividedTubs.cc.

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

{
  DDTubs msol = (DDTubs)(div_.parent().solid());
  return 2*msol.zhalf();

}
DDLogicalPart DDDividedTubsZ::makeDDLogicalPart ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 239 of file DDDividedTubs.cc.

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

{
  DDMaterial usemat(div_.parent().material());
  DDTubs msol = (DDTubs) (div_.parent().solid());
  DDLogicalPart ddlp;

  DDName solname(div_.parent().ddname().name() + "_DIVCHILD", div_.parent().ddname().ns());
  DDSolid ddtubs(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 = compWidth_/2.;
    double pSPhi = msol.startPhi();
    double pDPhi = msol.deltaPhi();
    ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi);
    ddlp = DDLogicalPart(solname, usemat, ddtubs);
  }
  else {
    ddlp = DDLogicalPart(solname);
  }

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

Reimplemented from DDDividedGeometryObject.

Definition at line 217 of file DDDividedTubs.cc.

References DCOUT_V.

{
  DDRotation myddrot; // sets to identity.
  DCOUT_V ('P', "DDDividedTubsZ::makeDDRotation made a rotation: " << myddrot);
  return myddrot;
}
DDTranslation DDDividedTubsZ::makeDDTranslation ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 225 of file DDDividedTubs.cc.

References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, DDAxesNames::name(), DDDivision::offset(), DDDivision::parent(), DDLogicalPart::solid(), and DDTubs::zhalf().

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

  DDTubs msol = (DDTubs)(div_.parent().solid());
  double posi = - msol.zhalf() + div_.offset() + compWidth_/2 + copyNo*compWidth_;
  translation.SetZ(posi);
  
  DCOUT_V ('P', " DDDividedTubsZ " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis()));
  return translation;
}