CMS 3D CMS Logo

Public Member Functions

DDDividedConsRho Class Reference

#include <DDDividedCons.h>

Inheritance diagram for DDDividedConsRho:
DDDividedGeometryObject

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 14 of file DDDividedCons.h.


Constructor & Destructor Documentation

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

Definition at line 54 of file DDDividedCons.cc.

{}

Member Function Documentation

double DDDividedConsRho::getMaxParameter ( void  ) const [virtual]
DDLogicalPart DDDividedConsRho::makeDDLogicalPart ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 83 of file DDDividedCons.cc.

References DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DDSolidFactory::cons(), DCOUT_V, ddcons, DDBase< N, C >::ddname(), DDDividedGeometryObject::div_, DDXMLElement::itostr(), DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), DDCons::rInMinusZ(), and DDLogicalPart::solid().

{ 
  DDName solname(div_.parent().ddname().name() + "_DIVCHILD" 
                 + DDXMLElement::itostr(copyNo) 
                 , div_.parent().ddname().ns());
  DDSolid ddcons(solname);
  DDMaterial usemat(div_.parent().material());
  DDCons msol = (DDCons)(div_.parent().solid());

  double pRMin1 = msol.rInMinusZ() + div_.offset() + compWidth_ * copyNo;
  double pRMax1 = msol.rInMinusZ() + div_.offset() + compWidth_ * (copyNo+1);
 
  //width at Z Plus
  //- double compWidth_Plus =
  //   compWidth_ * ( msol.rOutPlusZ()/ msol.rInPlusZ())
  //-         / ( msol.rOutMinusZ() - msol.rInMinusZ());
  double compWidth_Plus = calculateWidth( msol.rOutPlusZ()
                                          - msol.rInPlusZ(), compNDiv_, div_.offset() );
  double pRMin2 = msol.rInPlusZ()
                  + div_.offset() + compWidth_Plus * copyNo;
  double pRMax2 = msol.rInPlusZ()
                  + div_.offset() + compWidth_Plus * (copyNo+1);
  double pDz = msol.zhalf();

  double pSPhi = msol.phiFrom();
  double pDPhi = msol.deltaPhi();

  ddcons = DDSolidFactory::cons(DDName(solname), pDz, pRMin1, pRMax1
                                , pRMin2, pRMax2, pSPhi, pDPhi);      
  
  DDLogicalPart ddlp = DDLogicalPart(solname, usemat, ddcons);
  DCOUT_V( 'P', " DDDividedConsRho::makeDDLogicalPart() lp:" << ddlp );
  return ddlp;
}
DDRotation DDDividedConsRho::makeDDRotation ( const int  copyNo) const [virtual]

Reimplemented from DDDividedGeometryObject.

Definition at line 66 of file DDDividedCons.cc.

References DCOUT_V.

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

Reimplemented from DDDividedGeometryObject.

Definition at line 74 of file DDDividedCons.cc.

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

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