#include <DDDividedTubs.h>
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 () |
Definition at line 50 of file DDDividedTubs.h.
DDDividedTubsZ::DDDividedTubsZ | ( | const DDDivision & | div, |
DDCompactView * | cpv | ||
) |
Definition at line 184 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(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), DDDivision::width(), and DDTubs::zhalf().
: DDDividedGeometryObject::DDDividedGeometryObject( div, cpv ) { checkParametersValidity(); DDTubs msol = (DDTubs)(div_.parent().solid()); setType( "DivisionTubsZ" ); if( divisionType_ == DivWIDTH ) { compNDiv_ = calculateNDiv( 2*msol.zhalf(), div_.width(), div_.offset() ); } else if( divisionType_ == DivNDIV ) { compWidth_ = calculateWidth( 2*msol.zhalf(), div_.nReplicas(), div_.offset() ); } DCOUT_V ('P', " DDDividedTubsZ - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_); }
DDDividedTubsZ::~DDDividedTubsZ | ( | void | ) | [virtual] |
Definition at line 205 of file DDDividedTubs.cc.
{}
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().
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; }