#include <DetectorDescription/Parser/src/DDDividedTubs.h>
Public Member Functions | |
DDDividedTubsRho (const DDDivision &div) | |
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 | ) |
Definition at line 25 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().
00026 : DDDividedGeometryObject::DDDividedGeometryObject( div ) 00027 { 00028 checkParametersValidity(); 00029 setType( "DivisionTubsRho" ); 00030 DDTubs msol = (DDTubs)(div_.parent().solid()); 00031 00032 if( divisionType_ == DivWIDTH ) 00033 { 00034 compNDiv_ = calculateNDiv( msol.rIn() - msol.rOut(), 00035 div_.width(), div_.offset() ); 00036 } 00037 else if( divisionType_ == DivNDIV ) 00038 { 00039 compWidth_ = calculateWidth( msol.rIn() - msol.rOut(), 00040 div_.nReplicas(), div_.offset() ); 00041 } 00042 00043 DCOUT_V ('P', " DDDividedTubsRho - no divisions " << compNDiv_ << " = " << div_.nReplicas() << "\n Offset " << div_.offset() << "\n Width " << compWidth_ << " = " << div_.width() << "\n DivType " << divisionType_); 00044 00045 }
DDDividedTubsRho::~DDDividedTubsRho | ( | ) | [virtual] |
double DDDividedTubsRho::getMaxParameter | ( | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 53 of file DDDividedTubs.cc.
References DDDividedGeometryObject::div_, DDDivision::parent(), DDTubs::rIn(), DDTubs::rOut(), and DDLogicalPart::solid().
00054 { 00055 DDTubs msol = (DDTubs)(div_.parent().solid()); 00056 return msol.rOut() - msol.rIn(); 00057 00058 }
DDLogicalPart DDDividedTubsRho::makeDDLogicalPart | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 78 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().
00079 { 00080 // must always make new name and new solid 00081 DDName solname(div_.parent().ddname().name() + "_DIVCHILD" 00082 + DDXMLElement::itostr(copyNo) 00083 , div_.parent().ddname().ns()); 00084 DDSolid ddtubs(solname); 00085 DDMaterial usemat(div_.parent().material()); 00086 DDTubs msol = (DDTubs) (div_.parent().solid()); 00087 DDLogicalPart ddlp; 00088 00089 double pRMin = msol.rIn() + div_.offset() + compWidth_ * copyNo; 00090 double pRMax = msol.rIn() + div_.offset() + compWidth_ * (copyNo+1); 00091 double pDz = msol.zhalf(); 00092 double pSPhi = msol.startPhi(); 00093 double pDPhi = msol.deltaPhi(); 00094 ddtubs = DDSolidFactory::tubs(DDName(solname), pDz, pRMin, pRMax, pSPhi, pDPhi); 00095 ddlp = DDLogicalPart(solname, usemat, ddtubs); 00096 00097 DCOUT_V ('P', " DDDividedTubsRho::computeDimensions() lp:" << ddlp); 00098 return ddlp; 00099 00100 }
DDRotation DDDividedTubsRho::makeDDRotation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 60 of file DDDividedTubs.cc.
References DCOUT_V.
00061 { 00062 DDRotation myddrot; // sets to identity. 00063 DCOUT_V ('P', "DDDividedTubsRho::makeDDRotation made a rotation: " << myddrot); 00064 return myddrot; 00065 }
DDTranslation DDDividedTubsRho::makeDDTranslation | ( | const int | copyNo | ) | const [virtual] |
Reimplemented from DDDividedGeometryObject.
Definition at line 68 of file DDDividedTubs.cc.
References DDDivision::axis(), DDDividedGeometryObject::compWidth_, DCOUT_V, DDDividedGeometryObject::div_, and DDAxesNames::name().
00069 { 00070 //----- translation 00071 DDTranslation translation; 00072 00073 DCOUT_V ('P', " DDDividedTubsRho " << "\n\t Position: " << translation << " - Width: " << compWidth_ << " - Axis " << DDAxesNames::name(div_.axis())); 00074 return translation; 00075 }