#include <DDDividedPolycone.h>
Public Member Functions | |
virtual void | checkParametersValidity () |
DDDividedPolyconePhi (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 | ~DDDividedPolyconePhi () |
Definition at line 37 of file DDDividedPolycone.h.
DDDividedPolyconePhi::DDDividedPolyconePhi | ( | const DDDivision & | div, |
DDCompactView * | cpv | ||
) |
Definition at line 146 of file DDDividedPolycone.cc.
References DDDividedGeometryObject::calculateNDiv(), DDDividedGeometryObject::calculateWidth(), checkParametersValidity(), DDDividedGeometryObject::compNDiv_, DDDividedGeometryObject::compWidth_, DCOUT_V, DDPolycone::deltaPhi(), DDDividedGeometryObject::div_, DDDividedGeometryObject::divisionType_, DivNDIV, DivWIDTH, DDDivision::nReplicas(), DDDivision::offset(), DDDivision::parent(), DDDividedGeometryObject::setType(), DDLogicalPart::solid(), and DDDivision::width().
: DDDividedGeometryObject::DDDividedGeometryObject( div, cpv ) { checkParametersValidity(); DDPolycone msol = (DDPolycone)(div_.parent().solid()); setType( "DivisionPolyconePhi" ); // this is the g4. what do we keep??? I think it is deltaPhi // double deltaPhi = msol->GetEndPhi() - msol->GetStartPhi(); if( divisionType_ == DivWIDTH ) { //If you divide a tube of 360 degrees the offset displaces the starting angle, but you still fill the 360 degrees if( msol.deltaPhi() == 360.*deg ) { compNDiv_ = calculateNDiv( msol.deltaPhi(), div_.width(), 0. ); }else { compNDiv_ = calculateNDiv( msol.deltaPhi(), div_.width(), div_.offset() ); } } else if( divisionType_ == DivNDIV ) { if( msol.deltaPhi() == 360.*deg ) { compWidth_ = calculateWidth( msol.deltaPhi(), div_.nReplicas(), 0. ); }else { compWidth_ = calculateWidth( msol.deltaPhi(), div_.nReplicas(), div_.offset() ); } } DCOUT_V ('P', " DDDividedPolyconePhi - # divisions " << compNDiv_ << " = " << div_.nReplicas() << "/n Offset " << div_.offset() << " Width " << compWidth_ << " = " << div_.width() << "\n"); }
DDDividedPolyconePhi::~DDDividedPolyconePhi | ( | void | ) | [virtual] |
Definition at line 175 of file DDDividedPolycone.cc.
{}
void DDDividedPolyconePhi::checkParametersValidity | ( | void | ) | [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 179 of file DDDividedPolycone.cc.
Referenced by DDDividedPolyconePhi().
double DDDividedPolyconePhi::getMaxParameter | ( | void | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 185 of file DDDividedPolycone.cc.
References DDPolycone::deltaPhi(), DDDividedGeometryObject::div_, DDDivision::parent(), and DDLogicalPart::solid().
{ DDPolycone msol = (DDPolycone)(div_.parent().solid()); return msol.deltaPhi(); }
DDLogicalPart DDDividedPolyconePhi::makeDDLogicalPart | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 215 of file DDDividedPolycone.cc.
References DDDividedGeometryObject::compWidth_, DCOUT_V, DDBase< N, C >::ddname(), DDDividedGeometryObject::div_, DDBase< N, C >::isDefined(), DDLogicalPart::material(), DDName::name(), DDName::ns(), DDDivision::offset(), DDDivision::parent(), DDSolidFactory::polycone(), DDPolycone::rMaxVec(), and DDLogicalPart::solid().
{ DDName solname; DDSolid ddpolycone; DDMaterial usemat(div_.parent().material()); DDPolycone msol = (DDPolycone)(div_.parent().solid()); std::vector<double> localrMaxVec = msol.rMaxVec(); std::vector<double> localrMinVec = msol.rMinVec(); std::vector<double> localzVec = msol.zVec(); solname = DDName(div_.parent().ddname().name() + "_DIVCHILD", div_.parent().ddname().ns()); DDSolid sol( solname ); if( !sol.isDefined().second ) { ddpolycone = DDSolidFactory::polycone( solname, msol.startPhi()+div_.offset(), compWidth_, localzVec, localrMinVec, localrMaxVec ); } DDLogicalPart ddlp( solname ); if( !ddlp.isDefined().second ) { ddlp = DDLogicalPart( solname, usemat, ddpolycone ); } DCOUT_V( 'P', " DDDividedPolyconePhi::makeDDLogicalPart() lp:" << ddlp ); return ddlp; }
DDRotation DDDividedPolyconePhi::makeDDRotation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 192 of file DDDividedPolycone.cc.
References DDDividedGeometryObject::changeRotMatrix(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDBase< N, C >::ddname(), DDrot(), DDDividedGeometryObject::div_, DDXMLElement::itostr(), DDName::name(), DDName::ns(), and DDDivision::parent().
{ DDRotation myddrot; // sets to identity. double posi = ( copyNo - 1 ) * compWidth_; DDRotationMatrix* rotMat = changeRotMatrix( posi ); // how to name the rotation?? // i do not like this DDName ddrotname( div_.parent().ddname().name() + "_DIVCHILD_ROT" + DDXMLElement::itostr( copyNo ), div_.parent().ddname().ns()); myddrot = DDrot( ddrotname, rotMat ); DCOUT_V( 'P', "DDDividedPolyconePhi::makeDDRotation : " << myddrot ); return myddrot; }
DDTranslation DDDividedPolyconePhi::makeDDTranslation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 208 of file DDDividedPolycone.cc.
{ DDTranslation translation; return translation; }