#include <DDDividedTubs.h>
Public Member Functions | |
DDDividedTubsRho (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 | ~DDDividedTubsRho () |
Definition at line 14 of file DDDividedTubs.h.
DDDividedTubsRho::DDDividedTubsRho | ( | const DDDivision & | div, |
DDCompactView * | cpv | ||
) |
Definition at line 20 of file DDDividedTubs.cc.
References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDTubs::rIn(), DDTubs::rOut(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().
: DDDividedGeometryObject::DDDividedGeometryObject( div, cpv ) { checkParametersValidity(); setType( "DivisionTubsRho" ); DDTubs msol = (DDTubs)(div_.parent().solid()); if( divisionType_ == DivWIDTH ) { compNDiv_ = calculateNDiv( msol.rIn() - msol.rOut(), div_.width(), div_.offset() ); } else if( divisionType_ == DivNDIV ) { compWidth_ = calculateWidth( msol.rIn() - msol.rOut(), div_.nReplicas(), div_.offset() ); } DCOUT_V ('P', " DDDividedTubsRho - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_); }
DDDividedTubsRho::~DDDividedTubsRho | ( | void | ) | [virtual] |
Definition at line 42 of file DDDividedTubs.cc.
{}
double DDDividedTubsRho::getMaxParameter | ( | void | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 46 of file DDDividedTubs.cc.
References DDDividedGeometryObject::div_, DDDivision::parent(), DDTubs::rIn(), DDTubs::rOut(), and DDLogicalPart::solid().
DDLogicalPart DDDividedTubsRho::makeDDLogicalPart | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 73 of file DDDividedTubs.cc.
References DDDividedGeometryObject::compWidth_, DCOUT_V, DDBase< N, C >::ddname(), ddtubs, DDDividedGeometryObject::div_, DDXMLElement::itostr(), DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), DDLogicalPart::solid(), and DDSolidFactory::tubs().
{ // must always make new name and new solid DDName solname(div_.parent().ddname().name() + "_DIVCHILD" + DDXMLElement::itostr(copyNo) , div_.parent().ddname().ns()); DDSolid ddtubs(solname); DDMaterial usemat(div_.parent().material()); DDTubs msol = (DDTubs) (div_.parent().solid()); DDLogicalPart ddlp; double pRMin = msol.rIn() + div_.offset() + compWidth_ * copyNo; double pRMax = msol.rIn() + div_.offset() + compWidth_ * (copyNo+1); double pDz = msol.zhalf(); double pSPhi = msol.startPhi(); double pDPhi = msol.deltaPhi(); ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi); ddlp = DDLogicalPart(solname, usemat, ddtubs); DCOUT_V ('P', " DDDividedTubsRho::computeDimensions() lp:" << ddlp); return ddlp; }
DDRotation DDDividedTubsRho::makeDDRotation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 54 of file DDDividedTubs.cc.
References DCOUT_V.
{ DDRotation myddrot; // sets to identity. DCOUT_V ('P', "DDDividedTubsRho::makeDDRotation made a rotation: " << myddrot); return myddrot; }
DDTranslation DDDividedTubsRho::makeDDTranslation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 63 of file DDDividedTubs.cc.
References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, and DDAxesNames::name().
{ //----- translation DDTranslation translation; DCOUT_V ('P', " DDDividedTubsRho " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis())); return translation; }