#include <DDDividedCons.h>
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 () |
Definition at line 14 of file DDDividedCons.h.
DDDividedConsRho::DDDividedConsRho | ( | const DDDivision & | div, |
DDCompactView * | cpv | ||
) |
Definition at line 20 of file DDDividedCons.cc.
References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), DDDividedGeometryObject::checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, gather_cfg::cout, DCOUT_V, DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rInPlusZ(), DDCons::rOutMinusZ(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().
: DDDividedGeometryObject::DDDividedGeometryObject( div, cpv ) { checkParametersValidity(); setType( "DivisionConsRho" ); DDCons msol = (DDCons)(div_.parent().solid()); if( msol.rInPlusZ() == 0. ) { std::cout << "WARNING - DDDividedConsRho, rOutMinusZ = 0. " << std::endl << " Width is calculated as that of rOutMinusZ !" << std::endl; } if( divisionType_ == DivWIDTH ) { compNDiv_ = calculateNDiv( msol.rOutMinusZ() - msol.rInMinusZ(), div_.width(), div_.offset() ); } else if( divisionType_ == DivNDIV ) { DDCons msol = (DDCons)(div_.parent().solid()); compWidth_ = calculateWidth( msol.rOutMinusZ() - msol.rInMinusZ() , div_.nReplicas() , div_.offset() ); } DCOUT_V( 'P', " DDDividedConsRho - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_); }
DDDividedConsRho::~DDDividedConsRho | ( | void | ) | [virtual] |
Definition at line 54 of file DDDividedCons.cc.
{}
double DDDividedConsRho::getMaxParameter | ( | void | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 58 of file DDDividedCons.cc.
References DDDividedGeometryObject::div_, DDDivision::parent(), DDCons::rInMinusZ(), DDCons::rOutMinusZ(), and DDLogicalPart::solid().
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; }